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
|
---|---|---|---|---|---|
/*
* DateJS Culture String File
* Country Code: ar-LB
* Name: Arabic (Lebanon)
* Format: "key" : "value"
* Key is the en-US term, Value is the Key in the current language.
*/
Date.CultureStrings = Date.CultureStrings || {};
Date.CultureStrings["ar-LB"] = {
"name": "ar-LB",
"englishName": "Arabic (Lebanon)",
"nativeName": "العربية (لبنان)",
"Sunday": "الاحد",
"Monday": "الاثنين",
"Tuesday": "الثلاثاء",
"Wednesday": "الاربعاء",
"Thursday": "الخميس",
"Friday": "الجمعة",
"Saturday": "السبت",
"Sun": "الاحد",
"Mon": "الاثنين",
"Tue": "الثلاثاء",
"Wed": "الاربعاء",
"Thu": "الخميس",
"Fri": "الجمعة",
"Sat": "السبت",
"Su": "أ",
"Mo": "ا",
"Tu": "ث",
"We": "أ",
"Th": "خ",
"Fr": "ج",
"Sa": "س",
"S_Sun_Initial": "أ",
"M_Mon_Initial": "ا",
"T_Tue_Initial": "ث",
"W_Wed_Initial": "أ",
"T_Thu_Initial": "خ",
"F_Fri_Initial": "ج",
"S_Sat_Initial": "س",
"January": "كانون الثاني",
"February": "شباط",
"March": "آذار",
"April": "نيسان",
"May": "أيار",
"June": "حزيران",
"July": "تموز",
"August": "آب",
"September": "أيلول",
"October": "تشرين الأول",
"November": "تشرين الثاني",
"December": "كانون الأول",
"Jan_Abbr": "كانون الثاني",
"Feb_Abbr": "شباط",
"Mar_Abbr": "آذار",
"Apr_Abbr": "نيسان",
"May_Abbr": "أيار",
"Jun_Abbr": "حزيران",
"Jul_Abbr": "تموز",
"Aug_Abbr": "آب",
"Sep_Abbr": "أيلول",
"Oct_Abbr": "تشرين الأول",
"Nov_Abbr": "تشرين الثاني",
"Dec_Abbr": "كانون الأول",
"AM": "ص",
"PM": "م",
"firstDayOfWeek": 1,
"twoDigitYearMax": 2029,
"mdy": "dmy",
"M/d/yyyy": "dd/MM/yyyy",
"dddd, MMMM dd, yyyy": "dd MMMM, yyyy",
"h:mm tt": "hh:mm tt",
"h:mm:ss tt": "hh:mm:ss tt",
"dddd, MMMM dd, yyyy h:mm:ss tt": "dd MMMM, yyyy hh:mm:ss tt",
"yyyy-MM-ddTHH:mm:ss": "yyyy-MM-ddTHH:mm:ss",
"yyyy-MM-dd HH:mm:ssZ": "yyyy-MM-dd HH:mm:ssZ",
"ddd, dd MMM yyyy HH:mm:ss": "ddd, dd MMM yyyy HH:mm:ss",
"MMMM dd": "dd MMMM",
"MMMM, yyyy": "MMMM, yyyy",
"/jan(uary)?/": "كانون الثاني",
"/feb(ruary)?/": "شباط",
"/mar(ch)?/": "آذار",
"/apr(il)?/": "نيسان",
"/may/": "أيار",
"/jun(e)?/": "حزيران",
"/jul(y)?/": "تموز",
"/aug(ust)?/": "آب",
"/sep(t(ember)?)?/": "أيلول",
"/oct(ober)?/": "تشرين الأول",
"/nov(ember)?/": "تشرين الثاني",
"/dec(ember)?/": "كانون الأول",
"/^su(n(day)?)?/": "^الاحد",
"/^mo(n(day)?)?/": "^ا(1)?",
"/^tu(e(s(day)?)?)?/": "^الثلاثاء",
"/^we(d(nesday)?)?/": "^الاربعاء",
"/^th(u(r(s(day)?)?)?)?/": "^الخميس",
"/^fr(i(day)?)?/": "^الجمعة",
"/^sa(t(urday)?)?/": "^السبت",
"/^next/": "^next",
"/^last|past|prev(ious)?/": "^last|past|prev(ious)?",
"/^(\\+|aft(er)?|from|hence)/": "^(\\+|aft(er)?|from|hence)",
"/^(\\-|bef(ore)?|ago)/": "^(\\-|bef(ore)?|ago)",
"/^yes(terday)?/": "^yes(terday)?",
"/^t(od(ay)?)?/": "^t(od(ay)?)?",
"/^tom(orrow)?/": "^tom(orrow)?",
"/^n(ow)?/": "^n(ow)?",
"/^ms|milli(second)?s?/": "^ms|milli(second)?s?",
"/^sec(ond)?s?/": "^sec(ond)?s?",
"/^mn|min(ute)?s?/": "^mn|min(ute)?s?",
"/^h(our)?s?/": "^h(our)?s?",
"/^w(eek)?s?/": "^w(eek)?s?",
"/^m(onth)?s?/": "^m(onth)?s?",
"/^d(ay)?s?/": "^d(ay)?s?",
"/^y(ear)?s?/": "^y(ear)?s?",
"/^(a|p)/": "^(a|p)",
"/^(a\\.?m?\\.?|p\\.?m?\\.?)/": "^(a\\.?m?\\.?|p\\.?m?\\.?)",
"/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/": "^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)",
"/^\\s*(st|nd|rd|th)/": "^\\s*(st|nd|rd|th)",
"/^\\s*(\\:|a(?!u|p)|p)/": "^\\s*(\\:|a(?!u|p)|p)",
"LINT": "LINT",
"TOT": "TOT",
"CHAST": "CHAST",
"NZST": "NZST",
"NFT": "NFT",
"SBT": "SBT",
"AEST": "AEST",
"ACST": "ACST",
"JST": "JST",
"CWST": "CWST",
"CT": "CT",
"ICT": "ICT",
"MMT": "MMT",
"BIOT": "BST",
"NPT": "NPT",
"IST": "IST",
"PKT": "PKT",
"AFT": "AFT",
"MSK": "MSK",
"IRST": "IRST",
"FET": "FET",
"EET": "EET",
"CET": "CET",
"UTC": "UTC",
"GMT": "GMT",
"CVT": "CVT",
"GST": "GST",
"BRT": "BRT",
"NST": "NST",
"AST": "AST",
"EST": "EST",
"CST": "CST",
"MST": "MST",
"PST": "PST",
"AKST": "AKST",
"MIT": "MIT",
"HST": "HST",
"SST": "SST",
"BIT": "BIT",
"CHADT": "CHADT",
"NZDT": "NZDT",
"AEDT": "AEDT",
"ACDT": "ACDT",
"AZST": "AZST",
"IRDT": "IRDT",
"EEST": "EEST",
"CEST": "CEST",
"BST": "BST",
"PMDT": "PMDT",
"ADT": "ADT",
"NDT": "NDT",
"EDT": "EDT",
"CDT": "CDT",
"MDT": "MDT",
"PDT": "PDT",
"AKDT": "AKDT",
"HADT": "HADT"
};
Date.CultureStrings.lang = "ar-LB";
| grazerjink/PhatHanhSach | PhatHanhSach.Web/Assets/vendors/DateJS/build/i18n/ar-LB.js | JavaScript | mit | 5,934 |
/*
* DateJS Culture String File
* Country Code: ns-ZA
* Name: Northern Sotho (South Africa)
* Format: "key" : "value"
* Key is the en-US term, Value is the Key in the current language.
*/
Date.CultureStrings = Date.CultureStrings || {};
Date.CultureStrings["ns-ZA"] = {
"name": "ns-ZA",
"englishName": "Northern Sotho (South Africa)",
"nativeName": "Sesotho sa Leboa (Afrika Borwa)",
"Sunday": "Lamorena",
"Monday": "Mošupologo",
"Tuesday": "Labobedi",
"Wednesday": "Laboraro",
"Thursday": "Labone",
"Friday": "Labohlano",
"Saturday": "Mokibelo",
"Sun": "Sun",
"Mon": "Mon",
"Tue": "Tue",
"Wed": "Wed",
"Thu": "Thu",
"Fri": "Fri",
"Sat": "Sat",
"Su": "Sun",
"Mo": "Mon",
"Tu": "Tue",
"We": "Wed",
"Th": "Thu",
"Fr": "Fri",
"Sa": "Sat",
"S_Sun_Initial": "S",
"M_Mon_Initial": "M",
"T_Tue_Initial": "T",
"W_Wed_Initial": "W",
"T_Thu_Initial": "T",
"F_Fri_Initial": "F",
"S_Sat_Initial": "S",
"January": "Pherekgong",
"February": "Hlakola",
"March": "Mopitlo",
"April": "Moranang",
"May": "Mosegamanye",
"June": "Ngoatobošego",
"July": "Phuphu",
"August": "Phato",
"September": "Lewedi",
"October": "Diphalana",
"November": "Dibatsela",
"December": "Manthole",
"Jan_Abbr": "Jan",
"Feb_Abbr": "Feb",
"Mar_Abbr": "Mar",
"Apr_Abbr": "Apr",
"May_Abbr": "May",
"Jun_Abbr": "Jun",
"Jul_Abbr": "Jul",
"Aug_Abbr": "Aug",
"Sep_Abbr": "Sep",
"Oct_Abbr": "Oct",
"Nov_Abbr": "Nov",
"Dec_Abbr": "Dec",
"AM": "AM",
"PM": "PM",
"firstDayOfWeek": 0,
"twoDigitYearMax": 2029,
"mdy": "ymd",
"M/d/yyyy": "yyyy/MM/dd",
"dddd, MMMM dd, yyyy": "dd MMMM yyyy",
"h:mm tt": "hh:mm:ss tt",
"h:mm:ss tt": "hh:mm:ss tt",
"dddd, MMMM dd, yyyy h:mm:ss tt": "dd MMMM yyyy hh:mm:ss tt",
"yyyy-MM-ddTHH:mm:ss": "yyyy-MM-ddTHH:mm:ss",
"yyyy-MM-dd HH:mm:ssZ": "yyyy-MM-dd HH:mm:ssZ",
"ddd, dd MMM yyyy HH:mm:ss": "ddd, dd MMM yyyy HH:mm:ss",
"MMMM dd": "MMMM dd",
"MMMM, yyyy": "MMMM yyyy",
"/jan(uary)?/": "pherekgong",
"/feb(ruary)?/": "hlakola",
"/mar(ch)?/": "mopitlo",
"/apr(il)?/": "moranang",
"/may/": "mosegamanye",
"/jun(e)?/": "ngoatobošego",
"/jul(y)?/": "phuphu",
"/aug(ust)?/": "phato",
"/sep(t(ember)?)?/": "lewedi",
"/oct(ober)?/": "diphalana",
"/nov(ember)?/": "dibatsela",
"/dec(ember)?/": "manthole",
"/^su(n(day)?)?/": "^lamorena",
"/^mo(n(day)?)?/": "^mošupologo",
"/^tu(e(s(day)?)?)?/": "^labobedi",
"/^we(d(nesday)?)?/": "^laboraro",
"/^th(u(r(s(day)?)?)?)?/": "^labone",
"/^fr(i(day)?)?/": "^labohlano",
"/^sa(t(urday)?)?/": "^mokibelo",
"/^next/": "^next",
"/^last|past|prev(ious)?/": "^last|past|prev(ious)?",
"/^(\\+|aft(er)?|from|hence)/": "^(\\+|aft(er)?|from|hence)",
"/^(\\-|bef(ore)?|ago)/": "^(\\-|bef(ore)?|ago)",
"/^yes(terday)?/": "^yes(terday)?",
"/^t(od(ay)?)?/": "^t(od(ay)?)?",
"/^tom(orrow)?/": "^tom(orrow)?",
"/^n(ow)?/": "^n(ow)?",
"/^ms|milli(second)?s?/": "^ms|milli(second)?s?",
"/^sec(ond)?s?/": "^sec(ond)?s?",
"/^mn|min(ute)?s?/": "^mn|min(ute)?s?",
"/^h(our)?s?/": "^h(our)?s?",
"/^w(eek)?s?/": "^w(eek)?s?",
"/^m(onth)?s?/": "^m(onth)?s?",
"/^d(ay)?s?/": "^d(ay)?s?",
"/^y(ear)?s?/": "^y(ear)?s?",
"/^(a|p)/": "^(a|p)",
"/^(a\\.?m?\\.?|p\\.?m?\\.?)/": "^(a\\.?m?\\.?|p\\.?m?\\.?)",
"/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/": "^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)",
"/^\\s*(st|nd|rd|th)/": "^\\s*(st|nd|rd|th)",
"/^\\s*(\\:|a(?!u|p)|p)/": "^\\s*(\\:|a(?!u|p)|p)",
"LINT": "LINT",
"TOT": "TOT",
"CHAST": "CHAST",
"NZST": "NZST",
"NFT": "NFT",
"SBT": "SBT",
"AEST": "AEST",
"ACST": "ACST",
"JST": "JST",
"CWST": "CWST",
"CT": "CT",
"ICT": "ICT",
"MMT": "MMT",
"BIOT": "BST",
"NPT": "NPT",
"IST": "IST",
"PKT": "PKT",
"AFT": "AFT",
"MSK": "MSK",
"IRST": "IRST",
"FET": "FET",
"EET": "EET",
"CET": "CET",
"UTC": "UTC",
"GMT": "GMT",
"CVT": "CVT",
"GST": "GST",
"BRT": "BRT",
"NST": "NST",
"AST": "AST",
"EST": "EST",
"CST": "CST",
"MST": "MST",
"PST": "PST",
"AKST": "AKST",
"MIT": "MIT",
"HST": "HST",
"SST": "SST",
"BIT": "BIT",
"CHADT": "CHADT",
"NZDT": "NZDT",
"AEDT": "AEDT",
"ACDT": "ACDT",
"AZST": "AZST",
"IRDT": "IRDT",
"EEST": "EEST",
"CEST": "CEST",
"BST": "BST",
"PMDT": "PMDT",
"ADT": "ADT",
"NDT": "NDT",
"EDT": "EDT",
"CDT": "CDT",
"MDT": "MDT",
"PDT": "PDT",
"AKDT": "AKDT",
"HADT": "HADT"
};
Date.CultureStrings.lang = "ns-ZA";
| CookieQuartet/eventosmdp | bower_components/datejs/src/i18n/ns-ZA.js | JavaScript | mit | 5,593 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sensio\Bundle\GeneratorBundle\Manipulator;
use Symfony\Component\HttpKernel\KernelInterface;
/**
* Changes the PHP code of a Kernel.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class KernelManipulator extends Manipulator
{
protected $kernel;
protected $reflected;
/**
* Constructor.
*
* @param KernelInterface $kernel A KernelInterface instance
*/
public function __construct(KernelInterface $kernel)
{
$this->kernel = $kernel;
$this->reflected = new \ReflectionObject($kernel);
}
/**
* Adds a bundle at the end of the existing ones.
*
* @param string $bundle The bundle class name
*
* @return Boolean true if it worked, false otherwise
*
* @throws \RuntimeException If bundle is already defined
*/
public function addBundle($bundle)
{
if (!$this->reflected->getFilename()) {
return false;
}
$src = file($this->reflected->getFilename());
$method = $this->reflected->getMethod('registerBundles');
$lines = array_slice($src, $method->getStartLine() - 1, $method->getEndLine() - $method->getStartLine() + 1);
// Don't add same bundle twice
if (false !== strpos(implode('', $lines), $bundle)) {
throw new \RuntimeException(sprintf('Bundle "%s" is already defined in "AppKernel::registerBundles()".', $bundle));
}
$this->setCode(token_get_all('<?php '.implode('', $lines)), $method->getStartLine());
while ($token = $this->next()) {
// $bundles
if (T_VARIABLE !== $token[0] || '$bundles' !== $token[1]) {
continue;
}
// =
$this->next();
// array
$token = $this->next();
if (T_ARRAY !== $token[0]) {
return false;
}
// add the bundle at the end of the array
while ($token = $this->next()) {
// look for );
if (')' !== $this->value($token)) {
continue;
}
if (';' !== $this->value($this->peek())) {
continue;
}
// ;
$this->next();
$lines = array_merge(
array_slice($src, 0, $this->line - 2),
// Appends a separator comma to the current last position of the array
array(rtrim(rtrim($src[$this->line - 2]), ',') . ",\n"),
array(sprintf(" new %s(),\n", $bundle)),
array_slice($src, $this->line - 1)
);
file_put_contents($this->reflected->getFilename(), implode('', $lines));
return true;
}
}
}
}
| wsalazar/asseter | vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Manipulator/KernelManipulator.php | PHP | mit | 3,092 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Flot Examples: Real-time updates</title>
<link href="../examples.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="../../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
<script type="text/javascript">
$(function() {
// We use an inline data source in the example, usually data would
// be fetched from a server
var data = [],
totalPoints = 300;
function getRandomData() {
if (data.length > 0)
data = data.slice(1);
// Do a random walk
while (data.length < totalPoints) {
var prev = data.length > 0 ? data[data.length - 1] : 50,
y = prev + Math.random() * 10 - 5;
if (y < 0) {
y = 0;
} else if (y > 100) {
y = 100;
}
data.push(y);
}
// Zip the generated y values with the x values
var res = [];
for (var i = 0; i < data.length; ++i) {
res.push([i, data[i]])
}
return res;
}
// Set up the control widget
var updateInterval = 30;
$("#updateInterval").val(updateInterval).change(function () {
var v = $(this).val();
if (v && !isNaN(+v)) {
updateInterval = +v;
if (updateInterval < 1) {
updateInterval = 1;
} else if (updateInterval > 2000) {
updateInterval = 2000;
}
$(this).val("" + updateInterval);
}
});
var plot = $.plot("#placeholder", [ getRandomData() ], {
series: {
shadowSize: 0 // Drawing is faster without shadows
},
yaxis: {
min: 0,
max: 100
},
xaxis: {
show: false
}
});
function update() {
plot.setData([getRandomData()]);
// Since the axes don't change, we don't need to call plot.setupGrid()
plot.draw();
setTimeout(update, updateInterval);
}
update();
// Add the Flot version string to the footer
$("#footer").prepend("Flot " + $.plot.version + " – ");
});
</script>
</head>
<body>
<div id="header">
<h2>Real-time updates</h2>
</div>
<div id="content">
<div class="demo-container">
<div id="placeholder" class="demo-placeholder"></div>
</div>
<p>You can update a chart periodically to get a real-time effect by using a timer to insert the new data in the plot and redraw it.</p>
<p>Time between updates: <input id="updateInterval" type="text" value="" style="text-align: right; width:5em"> milliseconds</p>
</div>
<div id="footer">
Copyright © 2007 - 2014 IOLA and Ole Laursen
</div>
</body>
</html>
| Package7/myprintpanel | public/lib/jquery-flot/examples/realtime/index.html | HTML | mit | 2,788 |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("specialchar","hu",{euro:"Euró jel",lsquo:"Bal szimpla idézőjel",rsquo:"Jobb szimpla idézőjel",ldquo:"Bal dupla idézőjel",rdquo:"Jobb dupla idézőjel",ndash:"Rövid gondolatjel",mdash:"Hosszú gondolatjel",iexcl:"Fordított felkiáltójel",cent:"Cent jel",pound:"Font jel",curren:"Valuta jel",yen:"Yen jel",brvbar:"Hosszú kettőspont",sect:"Paragrafus jel",uml:"Kettős hangzó jel",copy:"Szerzői jog jel",ordf:"Női sorrend mutatója",laquo:"Balra mutató duplanyíl",not:"Feltételes kötőjel",
reg:"Bejegyzett védjegy jele",macr:"Hosszúsági jel",deg:"Fok jel",sup2:"Négyzeten jel",sup3:"Köbön jel",acute:"Éles ékezet",micro:"Mikro-jel",para:"Bekezdés jel",middot:"Közép pont",cedil:"Cédille",sup1:"Elsőn jel",ordm:"Férfi sorrend mutatója",raquo:"Jobbra mutató duplanyíl",frac14:"Egy negyed jel",frac12:"Egy ketted jel",frac34:"Három negyed jel",iquest:"Fordított kérdőjel",Agrave:"Latin nagy A fordított ékezettel",Aacute:"Latin nagy A normál ékezettel",Acirc:"Latin nagy A hajtott ékezettel",Atilde:"Latin nagy A hullámjellel",
Auml:"Latin nagy A kettőspont ékezettel",Aring:"Latin nagy A gyűrű ékezettel",AElig:"Latin nagy Æ betű",Ccedil:"Latin nagy C cedillával",Egrave:"Latin nagy E fordított ékezettel",Eacute:"Latin nagy E normál ékezettel",Ecirc:"Latin nagy E hajtott ékezettel",Euml:"Latin nagy E dupla kettőspont ékezettel",Igrave:"Latin nagy I fordított ékezettel",Iacute:"Latin nagy I normál ékezettel",Icirc:"Latin nagy I hajtott ékezettel",Iuml:"Latin nagy I kettőspont ékezettel",ETH:"Latin nagy Eth betű",Ntilde:"Latin nagy N hullámjellel",
Ograve:"Latin nagy O fordított ékezettel",Oacute:"Latin nagy O normál ékezettel",Ocirc:"Latin nagy O hajtott ékezettel",Otilde:"Latin nagy O hullámjellel",Ouml:"Latin nagy O kettőspont ékezettel",times:"Szorzás jel",Oslash:"Latin O betű áthúzással",Ugrave:"Latin nagy U fordított ékezettel",Uacute:"Latin nagy U normál ékezettel",Ucirc:"Latin nagy U hajtott ékezettel",Uuml:"Latin nagy U kettőspont ékezettel",Yacute:"Latin nagy Y normál ékezettel",THORN:"Latin nagy Thorn betű",szlig:"Latin kis s betű",
agrave:"Latin kis a fordított ékezettel",aacute:"Latin kis a normál ékezettel",acirc:"Latin kis a hajtott ékezettel",atilde:"Latin kis a hullámjellel",auml:"Latin kis a kettőspont ékezettel",aring:"Latin kis a gyűrű ékezettel",aelig:"Latin kis æ betű",ccedil:"Latin kis c cedillával",egrave:"Latin kis e fordított ékezettel",eacute:"Latin kis e normál ékezettel",ecirc:"Latin kis e hajtott ékezettel",euml:"Latin kis e dupla kettőspont ékezettel",igrave:"Latin kis i fordított ékezettel",iacute:"Latin kis i normál ékezettel",
icirc:"Latin kis i hajtott ékezettel",iuml:"Latin kis i kettőspont ékezettel",eth:"Latin kis eth betű",ntilde:"Latin kis n hullámjellel",ograve:"Latin kis o fordított ékezettel",oacute:"Latin kis o normál ékezettel",ocirc:"Latin kis o hajtott ékezettel",otilde:"Latin kis o hullámjellel",ouml:"Latin kis o kettőspont ékezettel",divide:"Osztásjel",oslash:"Latin kis o betű áthúzással",ugrave:"Latin kis u fordított ékezettel",uacute:"Latin kis u normál ékezettel",ucirc:"Latin kis u hajtott ékezettel",
uuml:"Latin kis u kettőspont ékezettel",yacute:"Latin kis y normál ékezettel",thorn:"Latin kis thorn jel",yuml:"Latin kis y kettőspont ékezettel",OElig:"Latin nagy OE-jel",oelig:"Latin kis oe-jel",372:"Latin nagy W hajtott ékezettel",374:"Latin nagy Y hajtott ékezettel",373:"Latin kis w hajtott ékezettel",375:"Latin kis y hajtott ékezettel",sbquo:"Nyitó nyomdai szimpla idézőjel",8219:"Záró nyomdai záró idézőjel",bdquo:"Nyitó nyomdai dupla idézőjel",hellip:"Három pont",trade:"Kereskedelmi védjegy jele",
9658:"Jobbra mutató fekete mutató",bull:"Golyó",rarr:"Jobbra mutató nyíl",rArr:"Jobbra mutató duplanyíl",hArr:"Bal-jobb duplanyíl",diams:"Fekete gyémánt jel",asymp:"Majdnem egyenlő jel"}); | mahrus-kh/sibimbel-forum-guru | assets/plugins/ckeditor/plugins/specialchar/dialogs/lang/hu.js | JavaScript | mit | 4,131 |
/* ========================================================================
* Bootstrap: tab.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#tabs
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var previous = $ul.find('.active:last a')[0]
var e = $.Event('show.bs.tab', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
var $target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown.bs.tab'
, relatedTarget: previous
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu')) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active
.one($.support.transition.end, next)
.emulateTransitionEnd(150) :
next()
$active.removeClass('in')
}
// TAB PLUGIN DEFINITION
// =====================
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB DATA-API
// ============
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);
| svenanders/cdnjs | ajax/libs/twitter-bootstrap/3.0.0-rc1/js/tab.js | JavaScript | mit | 3,438 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],MONTH:["janvier","f\u00e9vrier","mars","avril","mai","juin","juillet","ao\u00fbt","septembre","octobre","novembre","d\u00e9cembre"],SHORTDAY:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],SHORTMONTH:["janv.","f\u00e9vr.","mars","avr.","mai","juin","juil.","ao\u00fbt","sept.","oct.","nov.","d\u00e9c."],fullDate:"EEEE d MMMM y",longDate:"d MMMM y",medium:"d MMM y HH:mm:ss",mediumDate:"d MMM y",mediumTime:"HH:mm:ss","short":"d/MM/yy HH:mm",shortDate:"d/MM/yy",shortTime:"HH:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:"\u00a0",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(",negSuf:"\u00a0\u00a4)",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"fr-be",pluralCat:function(c){if(c>=0&&c<=2&&c!=2){return b.ONE}return b.OTHER}})}]); | kartikrao31/cdnjs | ajax/libs/angular-i18n/1.3.0-beta.8/angular-locale_fr-be.min.js | JavaScript | mit | 1,149 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(\u00a4",negSuf:")",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | hanbyul-here/cdnjs | ajax/libs/angular-i18n/1.2.11/angular-locale_en-us.min.js | JavaScript | mit | 1,076 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["\u0635","\u0645"],DAY:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],MONTH:["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"],SHORTDAY:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],SHORTMONTH:["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"],fullDate:"EEEE\u060c d MMMM\u060c y",longDate:"d MMMM\u060c y",medium:"dd\u200f/MM\u200f/yyyy h:mm:ss a",mediumDate:"dd\u200f/MM\u200f/yyyy",mediumTime:"h:mm:ss a","short":"d\u200f/M\u200f/yyyy h:mm a",shortDate:"d\u200f/M\u200f/yyyy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"\u00a3",DECIMAL_SEP:"\u066b",GROUP_SEP:"\u066c",PATTERNS:[{gSize:0,lgSize:0,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"",negSuf:"-",posPre:"",posSuf:""},{gSize:0,lgSize:0,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"\u00a4\u00a0",negSuf:"-",posPre:"\u00a4\u00a0",posSuf:""}]},id:"ar-om",pluralCat:function(c){if(c==0){return b.ZERO}if(c==1){return b.ONE}if(c==2){return b.TWO}if(c==(c|0)&&c%100>=3&&c%100<=10){return b.FEW}if(c==(c|0)&&c%100>=11&&c%100<=99){return b.MANY}return b.OTHER}})}]); | chrisyip/cdnjs | ajax/libs/angular-i18n/1.2.10/angular-locale_ar-om.min.js | JavaScript | mit | 2,437 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["\u0635","\u0645"],DAY:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],MONTH:["\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0634\u0628\u0627\u0637","\u0622\u0630\u0627\u0631","\u0646\u064a\u0633\u0627\u0646","\u0623\u064a\u0627\u0631","\u062d\u0632\u064a\u0631\u0627\u0646","\u062a\u0645\u0648\u0632","\u0622\u0628","\u0623\u064a\u0644\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"],SHORTDAY:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],SHORTMONTH:["\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0634\u0628\u0627\u0637","\u0622\u0630\u0627\u0631","\u0646\u064a\u0633\u0627\u0646","\u0623\u064a\u0627\u0631","\u062d\u0632\u064a\u0631\u0627\u0646","\u062a\u0645\u0648\u0632","\u0622\u0628","\u0623\u064a\u0644\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"],fullDate:"EEEE\u060c d MMMM\u060c y",longDate:"d MMMM\u060c y",medium:"dd\u200f/MM\u200f/yyyy h:mm:ss a",mediumDate:"dd\u200f/MM\u200f/yyyy",mediumTime:"h:mm:ss a","short":"d\u200f/M\u200f/yyyy h:mm a",shortDate:"d\u200f/M\u200f/yyyy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"\u00a3",DECIMAL_SEP:"\u066b",GROUP_SEP:"\u066c",PATTERNS:[{gSize:0,lgSize:0,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"",negSuf:"-",posPre:"",posSuf:""},{gSize:0,lgSize:0,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"\u00a4\u00a0",negSuf:"-",posPre:"\u00a4\u00a0",posSuf:""}]},id:"ar-lb",pluralCat:function(c){if(c==0){return b.ZERO}if(c==1){return b.ONE}if(c==2){return b.TWO}if(c==(c|0)&&c%100>=3&&c%100<=10){return b.FEW}if(c==(c|0)&&c%100>=11&&c%100<=99){return b.MANY}return b.OTHER}})}]); | ahocevar/cdnjs | ajax/libs/angular-i18n/1.2.14/angular-locale_ar-lb.min.js | JavaScript | mit | 2,601 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["a.m.","p.m."],DAY:["domingo","lunes","martes","mi\u00e9rcoles","jueves","viernes","s\u00e1bado"],MONTH:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],SHORTDAY:["dom","lun","mar","mi\u00e9","jue","vie","s\u00e1b"],SHORTMONTH:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],fullDate:"EEEE, d 'de' MMMM 'de' y",longDate:"d 'de' MMMM 'de' y",medium:"dd/MM/yyyy HH:mm:ss",mediumDate:"dd/MM/yyyy",mediumTime:"HH:mm:ss","short":"dd/MM/yy HH:mm",shortDate:"dd/MM/yy",shortTime:"HH:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:".",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"-",negSuf:"\u00a0\u00a4",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"es-bo",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | dhenson02/cdnjs | ajax/libs/angular-i18n/1.2.8/angular-locale_es-bo.min.js | JavaScript | mit | 1,137 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],MONTH:["janvier","f\u00e9vrier","mars","avril","mai","juin","juillet","ao\u00fbt","septembre","octobre","novembre","d\u00e9cembre"],SHORTDAY:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],SHORTMONTH:["janv.","f\u00e9vr.","mars","avr.","mai","juin","juil.","ao\u00fbt","sept.","oct.","nov.","d\u00e9c."],fullDate:"EEEE d MMMM y",longDate:"d MMMM y",medium:"d MMM y HH:mm:ss",mediumDate:"d MMM y",mediumTime:"HH:mm:ss","short":"dd/MM/yy HH:mm",shortDate:"dd/MM/yy",shortTime:"HH:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:"\u00a0",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(",negSuf:"\u00a0\u00a4)",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"fr-bf",pluralCat:function(c){if(c>=0&&c<=2&&c!=2){return b.ONE}return b.OTHER}})}]); | lobbin/cdnjs | ajax/libs/angular-i18n/1.2.13/angular-locale_fr-bf.min.js | JavaScript | mit | 1,151 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["a.m.","p.m."],DAY:["domingo","lunes","martes","mi\u00e9rcoles","jueves","viernes","s\u00e1bado"],MONTH:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],SHORTDAY:["dom","lun","mar","mi\u00e9","jue","vie","s\u00e1b"],SHORTMONTH:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],fullDate:"EEEE, d 'de' MMMM 'de' y",longDate:"d 'de' MMMM 'de' y",medium:"dd/MM/yyyy HH:mm:ss",mediumDate:"dd/MM/yyyy",mediumTime:"HH:mm:ss","short":"dd/MM/yy HH:mm",shortDate:"dd/MM/yy",shortTime:"HH:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:".",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"-",negSuf:"\u00a0\u00a4",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"es-sv",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | xymostech/cdnjs | ajax/libs/angular-i18n/1.2.4/angular-locale_es-sv.min.js | JavaScript | mit | 1,137 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["\uc624\uc804","\uc624\ud6c4"],DAY:["\uc77c\uc694\uc77c","\uc6d4\uc694\uc77c","\ud654\uc694\uc77c","\uc218\uc694\uc77c","\ubaa9\uc694\uc77c","\uae08\uc694\uc77c","\ud1a0\uc694\uc77c"],MONTH:["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"],SHORTDAY:["\uc77c","\uc6d4","\ud654","\uc218","\ubaa9","\uae08","\ud1a0"],SHORTMONTH:["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"],fullDate:"y\ub144 M\uc6d4 d\uc77c EEEE",longDate:"y\ub144 M\uc6d4 d\uc77c",medium:"yyyy. M. d. a h:mm:ss",mediumDate:"yyyy. M. d.",mediumTime:"a h:mm:ss","short":"yy. M. d. a h:mm",shortDate:"yy. M. d.",shortTime:"a h:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20a9",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(\u00a4",negSuf:")",posPre:"\u00a4",posSuf:""}]},id:"ko-kr",pluralCat:function(c){return b.OTHER}})}]); | ematsusaka/cdnjs | ajax/libs/angular-i18n/1.2.4/angular-locale_ko-kr.min.js | JavaScript | mit | 1,279 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullDate:"EEEE, d MMMM y",longDate:"d MMMM y",medium:"d MMM y HH:mm:ss",mediumDate:"d MMM y",mediumTime:"HH:mm:ss","short":"dd/MM/yyyy HH:mm",shortDate:"dd/MM/yyyy",shortTime:"HH:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u00a3",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"\u00a4-",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-gb",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | cgvarela/cdnjs | ajax/libs/angular-i18n/1.2.13/angular-locale_en-gb.min.js | JavaScript | mit | 1,080 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["am","pm"],DAY:["\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a","\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a","\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a","\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a","\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a","\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a","\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a"],MONTH:["\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f","\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f","\u0d2e\u0d3e\u0d30\u0d4d\u200d\u0d1a\u0d4d\u0d1a\u0d4d","\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d32\u0d4d\u200d","\u0d2e\u0d47\u0d2f\u0d4d","\u0d1c\u0d42\u0d23\u0d4d\u200d","\u0d1c\u0d42\u0d32\u0d48","\u0d06\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d","\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d30\u0d4d\u200d","\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d30\u0d4d\u200d","\u0d28\u0d35\u0d02\u0d2c\u0d30\u0d4d\u200d","\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d30\u0d4d\u200d"],SHORTDAY:["\u0d1e\u0d3e\u0d2f\u0d30\u0d4d\u200d","\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d4d\u200d","\u0d1a\u0d4a\u0d35\u0d4d\u0d35","\u0d2c\u0d41\u0d27\u0d28\u0d4d\u200d","\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02","\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f","\u0d36\u0d28\u0d3f"],SHORTMONTH:["\u0d1c\u0d28\u0d41","\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41","\u0d2e\u0d3e\u0d30\u0d4d\u200d","\u0d0f\u0d2a\u0d4d\u0d30\u0d3f","\u0d2e\u0d47\u0d2f\u0d4d","\u0d1c\u0d42\u0d23\u0d4d\u200d","\u0d1c\u0d42\u0d32\u0d48","\u0d13\u0d17","\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02","\u0d12\u0d15\u0d4d\u0d1f\u0d4b","\u0d28\u0d35\u0d02","\u0d21\u0d3f\u0d38\u0d02"],fullDate:"y, MMMM d, EEEE",longDate:"y, MMMM d",medium:"y, MMM d h:mm:ss a",mediumDate:"y, MMM d",mediumTime:"h:mm:ss a","short":"dd/MM/yy h:mm a",shortDate:"dd/MM/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20b9",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:2,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:2,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"-",negSuf:"\u00a4",posPre:"",posSuf:"\u00a4"}]},id:"ml-in",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | wout/cdnjs | ajax/libs/angular-i18n/1.2.13/angular-locale_ml-in.min.js | JavaScript | mit | 2,379 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["dop.","odp."],DAY:["ned\u011ble","pond\u011bl\u00ed","\u00fater\u00fd","st\u0159eda","\u010dtvrtek","p\u00e1tek","sobota"],MONTH:["ledna","\u00fanora","b\u0159ezna","dubna","kv\u011btna","\u010dervna","\u010dervence","srpna","z\u00e1\u0159\u00ed","\u0159\u00edjna","listopadu","prosince"],SHORTDAY:["ne","po","\u00fat","st","\u010dt","p\u00e1","so"],SHORTMONTH:["Led","\u00dano","B\u0159e","Dub","Kv\u011b","\u010cer","\u010cvc","Srp","Z\u00e1\u0159","\u0158\u00edj","Lis","Pro"],fullDate:"EEEE, d. MMMM y",longDate:"d. MMMM y",medium:"d. M. yyyy H:mm:ss",mediumDate:"d. M. yyyy",mediumTime:"H:mm:ss","short":"dd.MM.yy H:mm",shortDate:"dd.MM.yy",shortTime:"H:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"K\u010d",DECIMAL_SEP:",",GROUP_SEP:"\u00a0",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"-",negSuf:"\u00a0\u00a4",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"cs",pluralCat:function(c){if(c==1){return b.ONE}if(c==(c|0)&&c>=2&&c<=4){return b.FEW}return b.OTHER}})}]); | dmsanchez86/cdnjs | ajax/libs/angular-i18n/1.2.19/angular-locale_cs.min.js | JavaScript | mit | 1,270 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["de.","du."],DAY:["vas\u00e1rnap","h\u00e9tf\u0151","kedd","szerda","cs\u00fct\u00f6rt\u00f6k","p\u00e9ntek","szombat"],MONTH:["janu\u00e1r","febru\u00e1r","m\u00e1rcius","\u00e1prilis","m\u00e1jus","j\u00fanius","j\u00falius","augusztus","szeptember","okt\u00f3ber","november","december"],SHORTDAY:["V","H","K","Sze","Cs","P","Szo"],SHORTMONTH:["jan.","febr.","m\u00e1rc.","\u00e1pr.","m\u00e1j.","j\u00fan.","j\u00fal.","aug.","szept.","okt.","nov.","dec."],fullDate:"y. MMMM d., EEEE",longDate:"y. MMMM d.",medium:"yyyy.MM.dd. H:mm:ss",mediumDate:"yyyy.MM.dd.",mediumTime:"H:mm:ss","short":"yyyy.MM.dd. H:mm",shortDate:"yyyy.MM.dd.",shortTime:"H:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"Ft",DECIMAL_SEP:",",GROUP_SEP:"\u00a0",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"-",negSuf:"\u00a0\u00a4",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"hu-hu",pluralCat:function(c){return b.OTHER}})}]); | melvinsembrano/cdnjs | ajax/libs/angular-i18n/1.2.6/angular-locale_hu-hu.min.js | JavaScript | mit | 1,197 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(\u00a4",negSuf:")",posPre:"\u00a4",posSuf:""}]},id:"en-bm",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | calebmer/cdnjs | ajax/libs/angular-i18n/1.2.20/angular-locale_en-bm.min.js | JavaScript | mit | 1,076 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["am","pm"],DAY:["\u0b30\u0b2c\u0b3f\u0b2c\u0b3e\u0b30","\u0b38\u0b4b\u0b2e\u0b2c\u0b3e\u0b30","\u0b2e\u0b19\u0b4d\u0b17\u0b33\u0b2c\u0b3e\u0b30","\u0b2c\u0b41\u0b27\u0b2c\u0b3e\u0b30","\u0b17\u0b41\u0b30\u0b41\u0b2c\u0b3e\u0b30","\u0b36\u0b41\u0b15\u0b4d\u0b30\u0b2c\u0b3e\u0b30","\u0b36\u0b28\u0b3f\u0b2c\u0b3e\u0b30"],MONTH:["\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40","\u0b2b\u0b47\u0b2c\u0b4d\u0b30\u0b41\u0b5f\u0b3e\u0b30\u0b40","\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a","\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32","\u0b2e\u0b47","\u0b1c\u0b41\u0b28","\u0b1c\u0b41\u0b32\u0b3e\u0b07","\u0b05\u0b17\u0b37\u0b4d\u0b1f","\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30","\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30","\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30","\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30"],SHORTDAY:["\u0b30\u0b2c\u0b3f","\u0b38\u0b4b\u0b2e","\u0b2e\u0b19\u0b4d\u0b17\u0b33","\u0b2c\u0b41\u0b27","\u0b17\u0b41\u0b30\u0b41","\u0b36\u0b41\u0b15\u0b4d\u0b30","\u0b36\u0b28\u0b3f"],SHORTMONTH:["\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40","\u0b2b\u0b47\u0b2c\u0b4d\u0b30\u0b41\u0b5f\u0b3e\u0b30\u0b40","\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a","\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32","\u0b2e\u0b47","\u0b1c\u0b41\u0b28","\u0b1c\u0b41\u0b32\u0b3e\u0b07","\u0b05\u0b17\u0b37\u0b4d\u0b1f","\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30","\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30","\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30","\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30"],fullDate:"EEEE, d MMMM y",longDate:"d MMMM y",medium:"d MMM y h:mm:ss a",mediumDate:"d MMM y",mediumTime:"h:mm:ss a","short":"d-M-yy h:mm a",shortDate:"d-M-yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20b9",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:2,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:2,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"\u00a4\u00a0-",negSuf:"",posPre:"\u00a4\u00a0",posSuf:""}]},id:"or-in",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | aashish24/cdnjs | ajax/libs/angular-i18n/1.2.24/angular-locale_or-in.min.js | JavaScript | mit | 2,269 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(\u00a4",negSuf:")",posPre:"\u00a4",posSuf:""}]},id:"en-gu",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | cgvarela/cdnjs | ajax/libs/angular-i18n/1.2.18/angular-locale_en-gu.min.js | JavaScript | mit | 1,076 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(\u00a4",negSuf:")",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | jonobr1/cdnjs | ajax/libs/angular-i18n/1.2.9/angular-locale_en-us.min.js | JavaScript | mit | 1,076 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["\u0635","\u0645"],DAY:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],MONTH:["\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0634\u0628\u0627\u0637","\u0622\u0630\u0627\u0631","\u0646\u064a\u0633\u0627\u0646","\u0623\u064a\u0627\u0631","\u062d\u0632\u064a\u0631\u0627\u0646","\u062a\u0645\u0648\u0632","\u0622\u0628","\u0623\u064a\u0644\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"],SHORTDAY:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],SHORTMONTH:["\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0634\u0628\u0627\u0637","\u0622\u0630\u0627\u0631","\u0646\u064a\u0633\u0627\u0646","\u0623\u064a\u0627\u0631","\u062d\u0632\u064a\u0631\u0627\u0646","\u062a\u0645\u0648\u0632","\u0622\u0628","\u0623\u064a\u0644\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"],fullDate:"EEEE\u060c d MMMM\u060c y",longDate:"d MMMM\u060c y",medium:"dd\u200f/MM\u200f/yyyy h:mm:ss a",mediumDate:"dd\u200f/MM\u200f/yyyy",mediumTime:"h:mm:ss a","short":"d\u200f/M\u200f/yyyy h:mm a",shortDate:"d\u200f/M\u200f/yyyy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"\u00a3",DECIMAL_SEP:"\u066b",GROUP_SEP:"\u066c",PATTERNS:[{gSize:0,lgSize:0,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"",negSuf:"-",posPre:"",posSuf:""},{gSize:0,lgSize:0,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"\u00a4\u00a0",negSuf:"-",posPre:"\u00a4\u00a0",posSuf:""}]},id:"ar-sy",pluralCat:function(c){if(c==0){return b.ZERO}if(c==1){return b.ONE}if(c==2){return b.TWO}if(c==(c|0)&&c%100>=3&&c%100<=10){return b.FEW}if(c==(c|0)&&c%100>=11&&c%100<=99){return b.MANY}return b.OTHER}})}]); | rlugojr/cdnjs | ajax/libs/angular-i18n/1.2.10/angular-locale_ar-sy.min.js | JavaScript | mit | 2,601 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(\u00a4",negSuf:")",posPre:"\u00a4",posSuf:""}]},id:"en-gu",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | honestree/cdnjs | ajax/libs/angular-i18n/1.2.7/angular-locale_en-gu.min.js | JavaScript | mit | 1,076 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],MONTH:["janvier","f\u00e9vrier","mars","avril","mai","juin","juillet","ao\u00fbt","septembre","octobre","novembre","d\u00e9cembre"],SHORTDAY:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],SHORTMONTH:["janv.","f\u00e9vr.","mars","avr.","mai","juin","juil.","ao\u00fbt","sept.","oct.","nov.","d\u00e9c."],fullDate:"EEEE d MMMM y",longDate:"d MMMM y",medium:"d MMM y HH:mm:ss",mediumDate:"d MMM y",mediumTime:"HH:mm:ss","short":"dd/MM/yy HH:mm",shortDate:"dd/MM/yy",shortTime:"HH:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:"\u00a0",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(",negSuf:"\u00a0\u00a4)",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"fr-dj",pluralCat:function(c){if(c>=0&&c<=2&&c!=2){return b.ONE}return b.OTHER}})}]); | melvinsembrano/cdnjs | ajax/libs/angular-i18n/1.2.19/angular-locale_fr-dj.min.js | JavaScript | mit | 1,151 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["a.m.","p.m."],DAY:["domingo","lunes","martes","mi\u00e9rcoles","jueves","viernes","s\u00e1bado"],MONTH:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],SHORTDAY:["dom","lun","mar","mi\u00e9","jue","vie","s\u00e1b"],SHORTMONTH:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],fullDate:"EEEE, d 'de' MMMM 'de' y",longDate:"d 'de' MMMM 'de' y",medium:"dd-MM-yyyy H:mm:ss",mediumDate:"dd-MM-yyyy",mediumTime:"H:mm:ss","short":"dd-MM-yy H:mm",shortDate:"dd-MM-yy",shortTime:"H:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:".",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"-",negSuf:"\u00a0\u00a4",posPre:"",posSuf:"\u00a0\u00a4"}]},id:"es-cl",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | schoren/cdnjs | ajax/libs/angular-i18n/1.2.9/angular-locale_es-cl.min.js | JavaScript | mit | 1,133 |
"use strict";angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["enne keskp\u00e4eva","p\u00e4rast keskp\u00e4eva"],DAY:["p\u00fchap\u00e4ev","esmasp\u00e4ev","teisip\u00e4ev","kolmap\u00e4ev","neljap\u00e4ev","reede","laup\u00e4ev"],MONTH:["jaanuar","veebruar","m\u00e4rts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"],SHORTDAY:["P","E","T","K","N","R","L"],SHORTMONTH:["jaan","veebr","m\u00e4rts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],fullDate:"EEEE, d. MMMM y",longDate:"d. MMMM y",medium:"dd.MM.yyyy H:mm.ss",mediumDate:"dd.MM.yyyy",mediumTime:"H:mm.ss","short":"dd.MM.yy H:mm",shortDate:"dd.MM.yy",shortTime:"H:mm"},NUMBER_FORMATS:{CURRENCY_SYM:"\u20ac",DECIMAL_SEP:",",GROUP_SEP:"\u00a0",PATTERNS:[{gSize:3,lgSize:3,macFrac:0,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:0,lgSize:0,macFrac:0,maxFrac:2,minFrac:2,minInt:1,negPre:"(",negSuf:"\u00a4)",posPre:"",posSuf:"\u00a4"}]},id:"et",pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER}})}]); | SaravananRajaraman/cdnjs | ajax/libs/angular-i18n/1.2.19/angular-locale_et.min.js | JavaScript | mit | 1,177 |
YUI.add('datatable-body', function (Y, NAME) {
/**
View class responsible for rendering the `<tbody>` section of a table. Used as
the default `bodyView` for `Y.DataTable.Base` and `Y.DataTable` classes.
@module datatable
@submodule datatable-body
@since 3.5.0
**/
var Lang = Y.Lang,
isArray = Lang.isArray,
isNumber = Lang.isNumber,
isString = Lang.isString,
fromTemplate = Lang.sub,
htmlEscape = Y.Escape.html,
toArray = Y.Array,
bind = Y.bind,
YObject = Y.Object,
valueRegExp = /\{value\}/g;
/**
View class responsible for rendering the `<tbody>` section of a table. Used as
the default `bodyView` for `Y.DataTable.Base` and `Y.DataTable` classes.
Translates the provided `modelList` into a rendered `<tbody>` based on the data
in the constituent Models, altered or ammended by any special column
configurations.
The `columns` configuration, passed to the constructor, determines which
columns will be rendered.
The rendering process involves constructing an HTML template for a complete row
of data, built by concatenating a customized copy of the instance's
`CELL_TEMPLATE` into the `ROW_TEMPLATE` once for each column. This template is
then populated with values from each Model in the `modelList`, aggregating a
complete HTML string of all row and column data. A `<tbody>` Node is then created from the markup and any column `nodeFormatter`s are applied.
Supported properties of the column objects include:
* `key` - Used to link a column to an attribute in a Model.
* `name` - Used for columns that don't relate to an attribute in the Model
(`formatter` or `nodeFormatter` only) if the implementer wants a
predictable name to refer to in their CSS.
* `cellTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in this
column only.
* `formatter` - Used to customize or override the content value from the
Model. These do not have access to the cell or row Nodes and should
return string (HTML) content.
* `nodeFormatter` - Used to provide content for a cell as well as perform any
custom modifications on the cell or row Node that could not be performed by
`formatter`s. Should be used sparingly for better performance.
* `emptyCellValue` - String (HTML) value to use if the Model data for a
column, or the content generated by a `formatter`, is the empty string,
`null`, or `undefined`.
* `allowHTML` - Set to `true` if a column value, `formatter`, or
`emptyCellValue` can contain HTML. This defaults to `false` to protect
against XSS.
* `className` - Space delimited CSS classes to add to all `<td>`s in a column.
A column `formatter` can be:
* a function, as described below.
* a string which can be:
* the name of a pre-defined formatter function
which can be located in the `Y.DataTable.BodyView.Formatters` hash using the
value of the `formatter` property as the index.
* A template that can use the `{value}` placeholder to include the value
for the current cell or the name of any field in the underlaying model
also enclosed in curly braces. Any number and type of these placeholders
can be used.
Column `formatter`s are passed an object (`o`) with the following properties:
* `value` - The current value of the column's associated attribute, if any.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `className` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's `<td>`.
* `rowIndex` - The zero-based row number.
* `rowClass` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's containing row `<tr>`.
They may return a value or update `o.value` to assign specific HTML content. A
returned value has higher precedence.
Column `nodeFormatter`s are passed an object (`o`) with the following
properties:
* `value` - The current value of the column's associated attribute, if any.
* `td` - The `<td>` Node instance.
* `cell` - The `<div>` liner Node instance if present, otherwise, the `<td>`.
When adding content to the cell, prefer appending into this property.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `rowIndex` - The zero-based row number.
They are expected to inject content into the cell's Node directly, including
any "empty" cell content. Each `nodeFormatter` will have access through the
Node API to all cells and rows in the `<tbody>`, but not to the `<table>`, as
it will not be attached yet.
If a `nodeFormatter` returns `false`, the `o.td` and `o.cell` Nodes will be
`destroy()`ed to remove them from the Node cache and free up memory. The DOM
elements will remain as will any content added to them. _It is highly
advisable to always return `false` from your `nodeFormatter`s_.
@class BodyView
@namespace DataTable
@extends View
@since 3.5.0
**/
Y.namespace('DataTable').BodyView = Y.Base.create('tableBody', Y.View, [], {
// -- Instance properties -------------------------------------------------
/**
HTML template used to create table cells.
@property CELL_TEMPLATE
@type {HTML}
@default '<td {headers} class="{className}">{content}</td>'
@since 3.5.0
**/
CELL_TEMPLATE: '<td {headers} class="{className}">{content}</td>',
/**
CSS class applied to even rows. This is assigned at instantiation.
For DataTable, this will be `yui3-datatable-even`.
@property CLASS_EVEN
@type {String}
@default 'yui3-table-even'
@since 3.5.0
**/
//CLASS_EVEN: null
/**
CSS class applied to odd rows. This is assigned at instantiation.
When used by DataTable instances, this will be `yui3-datatable-odd`.
@property CLASS_ODD
@type {String}
@default 'yui3-table-odd'
@since 3.5.0
**/
//CLASS_ODD: null
/**
HTML template used to create table rows.
@property ROW_TEMPLATE
@type {HTML}
@default '<tr id="{rowId}" data-yui3-record="{clientId}" class="{rowClass}">{content}</tr>'
@since 3.5.0
**/
ROW_TEMPLATE : '<tr id="{rowId}" data-yui3-record="{clientId}" class="{rowClass}">{content}</tr>',
/**
The object that serves as the source of truth for column and row data.
This property is assigned at instantiation from the `host` property of
the configuration object passed to the constructor.
@property host
@type {Object}
@default (initially unset)
@since 3.5.0
**/
//TODO: should this be protected?
//host: null,
/**
HTML templates used to create the `<tbody>` containing the table rows.
@property TBODY_TEMPLATE
@type {HTML}
@default '<tbody class="{className}">{content}</tbody>'
@since 3.6.0
**/
TBODY_TEMPLATE: '<tbody class="{className}"></tbody>',
// -- Public methods ------------------------------------------------------
/**
Returns the `<td>` Node from the given row and column index. Alternately,
the `seed` can be a Node. If so, the nearest ancestor cell is returned.
If the `seed` is a cell, it is returned. If there is no cell at the given
coordinates, `null` is returned.
Optionally, include an offset array or string to return a cell near the
cell identified by the `seed`. The offset can be an array containing the
number of rows to shift followed by the number of columns to shift, or one
of "above", "below", "next", or "previous".
<pre><code>// Previous cell in the previous row
var cell = table.getCell(e.target, [-1, -1]);
// Next cell
var cell = table.getCell(e.target, 'next');
var cell = table.getCell(e.taregt, [0, 1];</pre></code>
@method getCell
@param {Number[]|Node} seed Array of row and column indexes, or a Node that
is either the cell itself or a descendant of one.
@param {Number[]|String} [shift] Offset by which to identify the returned
cell Node
@return {Node}
@since 3.5.0
**/
getCell: function (seed, shift) {
var tbody = this.tbodyNode,
row, cell, index, rowIndexOffset;
if (seed && tbody) {
if (isArray(seed)) {
row = tbody.get('children').item(seed[0]);
cell = row && row.get('children').item(seed[1]);
} else if (Y.instanceOf(seed, Y.Node)) {
cell = seed.ancestor('.' + this.getClassName('cell'), true);
}
if (cell && shift) {
rowIndexOffset = tbody.get('firstChild.rowIndex');
if (isString(shift)) {
// TODO this should be a static object map
switch (shift) {
case 'above' : shift = [-1, 0]; break;
case 'below' : shift = [1, 0]; break;
case 'next' : shift = [0, 1]; break;
case 'previous': shift = [0, -1]; break;
}
}
if (isArray(shift)) {
index = cell.get('parentNode.rowIndex') +
shift[0] - rowIndexOffset;
row = tbody.get('children').item(index);
index = cell.get('cellIndex') + shift[1];
cell = row && row.get('children').item(index);
}
}
}
return cell || null;
},
/**
Returns the generated CSS classname based on the input. If the `host`
attribute is configured, it will attempt to relay to its `getClassName`
or use its static `NAME` property as a string base.
If `host` is absent or has neither method nor `NAME`, a CSS classname
will be generated using this class's `NAME`.
@method getClassName
@param {String} token* Any number of token strings to assemble the
classname from.
@return {String}
@protected
@since 3.5.0
**/
getClassName: function () {
var host = this.host,
args;
if (host && host.getClassName) {
return host.getClassName.apply(host, arguments);
} else {
args = toArray(arguments);
args.unshift(this.constructor.NAME);
return Y.ClassNameManager.getClassName
.apply(Y.ClassNameManager, args);
}
},
/**
Returns the Model associated to the row Node or id provided. Passing the
Node or id for a descendant of the row also works.
If no Model can be found, `null` is returned.
@method getRecord
@param {String|Node} seed Row Node or `id`, or one for a descendant of a row
@return {Model}
@since 3.5.0
**/
getRecord: function (seed) {
var modelList = this.get('modelList'),
tbody = this.tbodyNode,
row = null,
record;
if (tbody) {
if (isString(seed)) {
seed = tbody.one('#' + seed);
}
if (Y.instanceOf(seed, Y.Node)) {
row = seed.ancestor(function (node) {
return node.get('parentNode').compareTo(tbody);
}, true);
record = row &&
modelList.getByClientId(row.getData('yui3-record'));
}
}
return record || null;
},
/**
Returns the `<tr>` Node from the given row index, Model, or Model's
`clientId`. If the rows haven't been rendered yet, or if the row can't be
found by the input, `null` is returned.
@method getRow
@param {Number|String|Model} id Row index, Model instance, or clientId
@return {Node}
@since 3.5.0
**/
getRow: function (id) {
var tbody = this.tbodyNode,
row = null;
if (tbody) {
if (id) {
id = this._idMap[id.get ? id.get('clientId') : id] || id;
}
row = isNumber(id) ?
tbody.get('children').item(id) :
tbody.one('#' + id);
}
return row;
},
/**
Creates the table's `<tbody>` content by assembling markup generated by
populating the `ROW\_TEMPLATE`, and `CELL\_TEMPLATE` templates with content
from the `columns` and `modelList` attributes.
The rendering process happens in three stages:
1. A row template is assembled from the `columns` attribute (see
`_createRowTemplate`)
2. An HTML string is built up by concatening the application of the data in
each Model in the `modelList` to the row template. For cells with
`formatter`s, the function is called to generate cell content. Cells
with `nodeFormatter`s are ignored. For all other cells, the data value
from the Model attribute for the given column key is used. The
accumulated row markup is then inserted into the container.
3. If any column is configured with a `nodeFormatter`, the `modelList` is
iterated again to apply the `nodeFormatter`s.
Supported properties of the column objects include:
* `key` - Used to link a column to an attribute in a Model.
* `name` - Used for columns that don't relate to an attribute in the Model
(`formatter` or `nodeFormatter` only) if the implementer wants a
predictable name to refer to in their CSS.
* `cellTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in
this column only.
* `formatter` - Used to customize or override the content value from the
Model. These do not have access to the cell or row Nodes and should
return string (HTML) content.
* `nodeFormatter` - Used to provide content for a cell as well as perform
any custom modifications on the cell or row Node that could not be
performed by `formatter`s. Should be used sparingly for better
performance.
* `emptyCellValue` - String (HTML) value to use if the Model data for a
column, or the content generated by a `formatter`, is the empty string,
`null`, or `undefined`.
* `allowHTML` - Set to `true` if a column value, `formatter`, or
`emptyCellValue` can contain HTML. This defaults to `false` to protect
against XSS.
* `className` - Space delimited CSS classes to add to all `<td>`s in a
column.
Column `formatter`s are passed an object (`o`) with the following
properties:
* `value` - The current value of the column's associated attribute, if
any.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `className` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's `<td>`.
* `rowIndex` - The zero-based row number.
* `rowClass` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's containing row `<tr>`.
They may return a value or update `o.value` to assign specific HTML
content. A returned value has higher precedence.
Column `nodeFormatter`s are passed an object (`o`) with the following
properties:
* `value` - The current value of the column's associated attribute, if
any.
* `td` - The `<td>` Node instance.
* `cell` - The `<div>` liner Node instance if present, otherwise, the
`<td>`. When adding content to the cell, prefer appending into this
property.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `rowIndex` - The zero-based row number.
They are expected to inject content into the cell's Node directly, including
any "empty" cell content. Each `nodeFormatter` will have access through the
Node API to all cells and rows in the `<tbody>`, but not to the `<table>`,
as it will not be attached yet.
If a `nodeFormatter` returns `false`, the `o.td` and `o.cell` Nodes will be
`destroy()`ed to remove them from the Node cache and free up memory. The
DOM elements will remain as will any content added to them. _It is highly
advisable to always return `false` from your `nodeFormatter`s_.
@method render
@return {BodyView} The instance
@chainable
@since 3.5.0
**/
render: function () {
var table = this.get('container'),
data = this.get('modelList'),
columns = this.get('columns'),
tbody = this.tbodyNode ||
(this.tbodyNode = this._createTBodyNode());
// Needed for mutation
this._createRowTemplate(columns);
if (data) {
tbody.setHTML(this._createDataHTML(columns));
this._applyNodeFormatters(tbody, columns);
}
if (tbody.get('parentNode') !== table) {
table.appendChild(tbody);
}
this._afterRenderCleanup();
this.bindUI();
return this;
},
// -- Protected and private methods ---------------------------------------
/**
Handles changes in the source's columns attribute. Redraws the table data.
@method _afterColumnsChange
@param {EventFacade} e The `columnsChange` event object
@protected
@since 3.5.0
**/
// TODO: Preserve existing DOM
// This will involve parsing and comparing the old and new column configs
// and reacting to four types of changes:
// 1. formatter, nodeFormatter, emptyCellValue changes
// 2. column deletions
// 3. column additions
// 4. column moves (preserve cells)
_afterColumnsChange: function () {
this.render();
},
/**
Handles modelList changes, including additions, deletions, and updates.
Modifies the existing table DOM accordingly.
@method _afterDataChange
@param {EventFacade} e The `change` event from the ModelList
@protected
@since 3.5.0
**/
_afterDataChange: function () {
//var type = e.type.slice(e.type.lastIndexOf(':') + 1);
// TODO: Isolate changes
this.render();
},
/**
Handles replacement of the modelList.
Rerenders the `<tbody>` contents.
@method _afterModelListChange
@param {EventFacade} e The `modelListChange` event
@protected
@since 3.6.0
**/
_afterModelListChange: function () {
var handles = this._eventHandles;
if (handles.dataChange) {
handles.dataChange.detach();
delete handles.dataChange;
this.bindUI();
}
if (this.tbodyNode) {
this.render();
}
},
/**
Iterates the `modelList`, and calls any `nodeFormatter`s found in the
`columns` param on the appropriate cell Nodes in the `tbody`.
@method _applyNodeFormatters
@param {Node} tbody The `<tbody>` Node whose columns to update
@param {Object[]} columns The column configurations
@protected
@since 3.5.0
**/
_applyNodeFormatters: function (tbody, columns) {
var host = this.host,
data = this.get('modelList'),
formatters = [],
linerQuery = '.' + this.getClassName('liner'),
rows, i, len;
// Only iterate the ModelList again if there are nodeFormatters
for (i = 0, len = columns.length; i < len; ++i) {
if (columns[i].nodeFormatter) {
formatters.push(i);
}
}
if (data && formatters.length) {
rows = tbody.get('childNodes');
data.each(function (record, index) {
var formatterData = {
data : record.toJSON(),
record : record,
rowIndex : index
},
row = rows.item(index),
i, len, col, key, cells, cell, keep;
if (row) {
cells = row.get('childNodes');
for (i = 0, len = formatters.length; i < len; ++i) {
cell = cells.item(formatters[i]);
if (cell) {
col = formatterData.column = columns[formatters[i]];
key = col.key || col.id;
formatterData.value = record.get(key);
formatterData.td = cell;
formatterData.cell = cell.one(linerQuery) || cell;
keep = col.nodeFormatter.call(host,formatterData);
if (keep === false) {
// Remove from the Node cache to reduce
// memory footprint. This also purges events,
// which you shouldn't be scoping to a cell
// anyway. You've been warned. Incidentally,
// you should always return false. Just sayin.
cell.destroy(true);
}
}
}
}
});
}
},
/**
Binds event subscriptions from the UI and the host (if assigned).
@method bindUI
@protected
@since 3.5.0
**/
bindUI: function () {
var handles = this._eventHandles,
modelList = this.get('modelList'),
changeEvent = modelList.model.NAME + ':change';
if (!handles.columnsChange) {
handles.columnsChange = this.after('columnsChange',
bind('_afterColumnsChange', this));
}
if (modelList && !handles.dataChange) {
handles.dataChange = modelList.after(
['add', 'remove', 'reset', changeEvent],
bind('_afterDataChange', this));
}
},
/**
Iterates the `modelList` and applies each Model to the `_rowTemplate`,
allowing any column `formatter` or `emptyCellValue` to override cell
content for the appropriate column. The aggregated HTML string is
returned.
@method _createDataHTML
@param {Object[]} columns The column configurations to customize the
generated cell content or class names
@return {HTML} The markup for all Models in the `modelList`, each applied
to the `_rowTemplate`
@protected
@since 3.5.0
**/
_createDataHTML: function (columns) {
var data = this.get('modelList'),
html = '';
if (data) {
data.each(function (model, index) {
html += this._createRowHTML(model, index, columns);
}, this);
}
return html;
},
/**
Applies the data of a given Model, modified by any column formatters and
supplemented by other template values to the instance's `_rowTemplate` (see
`_createRowTemplate`). The generated string is then returned.
The data from Model's attributes is fetched by `toJSON` and this data
object is appended with other properties to supply values to {placeholders}
in the template. For a template generated from a Model with 'foo' and 'bar'
attributes, the data object would end up with the following properties
before being used to populate the `_rowTemplate`:
* `clientID` - From Model, used the assign the `<tr>`'s 'id' attribute.
* `foo` - The value to populate the 'foo' column cell content. This
value will be the value stored in the Model's `foo` attribute, or the
result of the column's `formatter` if assigned. If the value is '',
`null`, or `undefined`, and the column's `emptyCellValue` is assigned,
that value will be used.
* `bar` - Same for the 'bar' column cell content.
* `foo-className` - String of CSS classes to apply to the `<td>`.
* `bar-className` - Same.
* `rowClass` - String of CSS classes to apply to the `<tr>`. This
will be the odd/even class per the specified index plus any additional
classes assigned by column formatters (via `o.rowClass`).
Because this object is available to formatters, any additional properties
can be added to fill in custom {placeholders} in the `_rowTemplate`.
@method _createRowHTML
@param {Model} model The Model instance to apply to the row template
@param {Number} index The index the row will be appearing
@param {Object[]} columns The column configurations
@return {HTML} The markup for the provided Model, less any `nodeFormatter`s
@protected
@since 3.5.0
**/
_createRowHTML: function (model, index, columns) {
var data = model.toJSON(),
clientId = model.get('clientId'),
values = {
rowId : this._getRowId(clientId),
clientId: clientId,
rowClass: (index % 2) ? this.CLASS_ODD : this.CLASS_EVEN
},
host = this.host || this,
i, len, col, token, value, formatterData;
for (i = 0, len = columns.length; i < len; ++i) {
col = columns[i];
value = data[col.key];
token = col._id || col.key;
values[token + '-className'] = '';
if (col._formatterFn) {
formatterData = {
value : value,
data : data,
column : col,
record : model,
className: '',
rowClass : '',
rowIndex : index
};
// Formatters can either return a value
value = col._formatterFn.call(host, formatterData);
// or update the value property of the data obj passed
if (value === undefined) {
value = formatterData.value;
}
values[token + '-className'] = formatterData.className;
values.rowClass += ' ' + formatterData.rowClass;
}
if (value === undefined || value === null || value === '') {
value = col.emptyCellValue || '';
}
values[token] = col.allowHTML ? value : htmlEscape(value);
values.rowClass = values.rowClass.replace(/\s+/g, ' ');
}
return fromTemplate(this._rowTemplate, values);
},
/**
Creates a custom HTML template string for use in generating the markup for
individual table rows with {placeholder}s to capture data from the Models
in the `modelList` attribute or from column `formatter`s.
Assigns the `_rowTemplate` property.
@method _createRowTemplate
@param {Object[]} columns Array of column configuration objects
@protected
@since 3.5.0
**/
_createRowTemplate: function (columns) {
var html = '',
cellTemplate = this.CELL_TEMPLATE,
F = Y.DataTable.BodyView.Formatters,
i, len, col, key, token, headers, tokenValues, formatter;
for (i = 0, len = columns.length; i < len; ++i) {
col = columns[i];
key = col.key;
token = col._id || key;
formatter = col.formatter;
// Only include headers if there are more than one
headers = (col._headers || []).length > 1 ?
'headers="' + col._headers.join(' ') + '"' : '';
tokenValues = {
content : '{' + token + '}',
headers : headers,
className: this.getClassName('col', token) + ' ' +
(col.className || '') + ' ' +
this.getClassName('cell') +
' {' + token + '-className}'
};
if (formatter) {
if (Lang.isFunction(formatter)) {
col._formatterFn = formatter;
} else if (formatter in F) {
col._formatterFn = F[formatter].call(this.host || this, col);
} else {
tokenValues.content = formatter.replace(valueRegExp, tokenValues.content);
}
}
if (col.nodeFormatter) {
// Defer all node decoration to the formatter
tokenValues.content = '';
}
html += fromTemplate(col.cellTemplate || cellTemplate, tokenValues);
}
this._rowTemplate = fromTemplate(this.ROW_TEMPLATE, {
content: html
});
},
/**
Cleans up temporary values created during rendering.
@method _afterRenderCleanup
@private
*/
_afterRenderCleanup: function () {
var columns = this.get('columns'),
i, len = columns.length;
for (i = 0;i < len; i+=1) {
delete columns[i]._formatterFn;
}
},
/**
Creates the `<tbody>` node that will store the data rows.
@method _createTBodyNode
@return {Node}
@protected
@since 3.6.0
**/
_createTBodyNode: function () {
return Y.Node.create(fromTemplate(this.TBODY_TEMPLATE, {
className: this.getClassName('data')
}));
},
/**
Destroys the instance.
@method destructor
@protected
@since 3.5.0
**/
destructor: function () {
(new Y.EventHandle(YObject.values(this._eventHandles))).detach();
},
/**
Holds the event subscriptions needing to be detached when the instance is
`destroy()`ed.
@property _eventHandles
@type {Object}
@default undefined (initially unset)
@protected
@since 3.5.0
**/
//_eventHandles: null,
/**
Returns the row ID associated with a Model's clientId.
@method _getRowId
@param {String} clientId The Model clientId
@return {String}
@protected
**/
_getRowId: function (clientId) {
return this._idMap[clientId] || (this._idMap[clientId] = Y.guid());
},
/**
Map of Model clientIds to row ids.
@property _idMap
@type {Object}
@protected
**/
//_idMap,
/**
Initializes the instance. Reads the following configuration properties in
addition to the instance attributes:
* `columns` - (REQUIRED) The initial column information
* `host` - The object to serve as source of truth for column info and
for generating class names
@method initializer
@param {Object} config Configuration data
@protected
@since 3.5.0
**/
initializer: function (config) {
this.host = config.host;
this._eventHandles = {
modelListChange: this.after('modelListChange',
bind('_afterModelListChange', this))
};
this._idMap = {};
this.CLASS_ODD = this.getClassName('odd');
this.CLASS_EVEN = this.getClassName('even');
}
/**
The HTML template used to create a full row of markup for a single Model in
the `modelList` plus any customizations defined in the column
configurations.
@property _rowTemplate
@type {HTML}
@default (initially unset)
@protected
@since 3.5.0
**/
//_rowTemplate: null
},{
/**
Hash of formatting functions for cell contents.
This property can be populated with a hash of formatting functions by the developer
or a set of pre-defined functions can be loaded via the `datatable-formatters` module.
See: [DataTable.BodyView.Formatters](./DataTable.BodyView.Formatters.html)
@property Formatters
@type Object
@since 3.8.0
@static
**/
Formatters: {}
});
}, '@VERSION@', {"requires": ["datatable-core", "view", "classnamemanager"]});
| thejameskyle/cdnjs | ajax/libs/yui/3.9.0/datatable-body/datatable-body-debug.js | JavaScript | mit | 32,136 |
YUI.add('datatable-body', function (Y, NAME) {
/**
View class responsible for rendering the `<tbody>` section of a table. Used as
the default `bodyView` for `Y.DataTable.Base` and `Y.DataTable` classes.
@module datatable
@submodule datatable-body
@since 3.5.0
**/
var Lang = Y.Lang,
isArray = Lang.isArray,
isNumber = Lang.isNumber,
isString = Lang.isString,
fromTemplate = Lang.sub,
htmlEscape = Y.Escape.html,
toArray = Y.Array,
bind = Y.bind,
YObject = Y.Object,
valueRegExp = /\{value\}/g;
/**
View class responsible for rendering the `<tbody>` section of a table. Used as
the default `bodyView` for `Y.DataTable.Base` and `Y.DataTable` classes.
Translates the provided `modelList` into a rendered `<tbody>` based on the data
in the constituent Models, altered or ammended by any special column
configurations.
The `columns` configuration, passed to the constructor, determines which
columns will be rendered.
The rendering process involves constructing an HTML template for a complete row
of data, built by concatenating a customized copy of the instance's
`CELL_TEMPLATE` into the `ROW_TEMPLATE` once for each column. This template is
then populated with values from each Model in the `modelList`, aggregating a
complete HTML string of all row and column data. A `<tbody>` Node is then created from the markup and any column `nodeFormatter`s are applied.
Supported properties of the column objects include:
* `key` - Used to link a column to an attribute in a Model.
* `name` - Used for columns that don't relate to an attribute in the Model
(`formatter` or `nodeFormatter` only) if the implementer wants a
predictable name to refer to in their CSS.
* `cellTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in this
column only.
* `formatter` - Used to customize or override the content value from the
Model. These do not have access to the cell or row Nodes and should
return string (HTML) content.
* `nodeFormatter` - Used to provide content for a cell as well as perform any
custom modifications on the cell or row Node that could not be performed by
`formatter`s. Should be used sparingly for better performance.
* `emptyCellValue` - String (HTML) value to use if the Model data for a
column, or the content generated by a `formatter`, is the empty string,
`null`, or `undefined`.
* `allowHTML` - Set to `true` if a column value, `formatter`, or
`emptyCellValue` can contain HTML. This defaults to `false` to protect
against XSS.
* `className` - Space delimited CSS classes to add to all `<td>`s in a column.
A column `formatter` can be:
* a function, as described below.
* a string which can be:
* the name of a pre-defined formatter function
which can be located in the `Y.DataTable.BodyView.Formatters` hash using the
value of the `formatter` property as the index.
* A template that can use the `{value}` placeholder to include the value
for the current cell or the name of any field in the underlaying model
also enclosed in curly braces. Any number and type of these placeholders
can be used.
Column `formatter`s are passed an object (`o`) with the following properties:
* `value` - The current value of the column's associated attribute, if any.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `className` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's `<td>`.
* `rowIndex` - The zero-based row number.
* `rowClass` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's containing row `<tr>`.
They may return a value or update `o.value` to assign specific HTML content. A
returned value has higher precedence.
Column `nodeFormatter`s are passed an object (`o`) with the following
properties:
* `value` - The current value of the column's associated attribute, if any.
* `td` - The `<td>` Node instance.
* `cell` - The `<div>` liner Node instance if present, otherwise, the `<td>`.
When adding content to the cell, prefer appending into this property.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `rowIndex` - The zero-based row number.
They are expected to inject content into the cell's Node directly, including
any "empty" cell content. Each `nodeFormatter` will have access through the
Node API to all cells and rows in the `<tbody>`, but not to the `<table>`, as
it will not be attached yet.
If a `nodeFormatter` returns `false`, the `o.td` and `o.cell` Nodes will be
`destroy()`ed to remove them from the Node cache and free up memory. The DOM
elements will remain as will any content added to them. _It is highly
advisable to always return `false` from your `nodeFormatter`s_.
@class BodyView
@namespace DataTable
@extends View
@since 3.5.0
**/
Y.namespace('DataTable').BodyView = Y.Base.create('tableBody', Y.View, [], {
// -- Instance properties -------------------------------------------------
/**
HTML template used to create table cells.
@property CELL_TEMPLATE
@type {HTML}
@default '<td {headers} class="{className}">{content}</td>'
@since 3.5.0
**/
CELL_TEMPLATE: '<td {headers} class="{className}">{content}</td>',
/**
CSS class applied to even rows. This is assigned at instantiation.
For DataTable, this will be `yui3-datatable-even`.
@property CLASS_EVEN
@type {String}
@default 'yui3-table-even'
@since 3.5.0
**/
//CLASS_EVEN: null
/**
CSS class applied to odd rows. This is assigned at instantiation.
When used by DataTable instances, this will be `yui3-datatable-odd`.
@property CLASS_ODD
@type {String}
@default 'yui3-table-odd'
@since 3.5.0
**/
//CLASS_ODD: null
/**
HTML template used to create table rows.
@property ROW_TEMPLATE
@type {HTML}
@default '<tr id="{rowId}" data-yui3-record="{clientId}" class="{rowClass}">{content}</tr>'
@since 3.5.0
**/
ROW_TEMPLATE : '<tr id="{rowId}" data-yui3-record="{clientId}" class="{rowClass}">{content}</tr>',
/**
The object that serves as the source of truth for column and row data.
This property is assigned at instantiation from the `host` property of
the configuration object passed to the constructor.
@property host
@type {Object}
@default (initially unset)
@since 3.5.0
**/
//TODO: should this be protected?
//host: null,
/**
HTML templates used to create the `<tbody>` containing the table rows.
@property TBODY_TEMPLATE
@type {HTML}
@default '<tbody class="{className}">{content}</tbody>'
@since 3.6.0
**/
TBODY_TEMPLATE: '<tbody class="{className}"></tbody>',
// -- Public methods ------------------------------------------------------
/**
Returns the `<td>` Node from the given row and column index. Alternately,
the `seed` can be a Node. If so, the nearest ancestor cell is returned.
If the `seed` is a cell, it is returned. If there is no cell at the given
coordinates, `null` is returned.
Optionally, include an offset array or string to return a cell near the
cell identified by the `seed`. The offset can be an array containing the
number of rows to shift followed by the number of columns to shift, or one
of "above", "below", "next", or "previous".
<pre><code>// Previous cell in the previous row
var cell = table.getCell(e.target, [-1, -1]);
// Next cell
var cell = table.getCell(e.target, 'next');
var cell = table.getCell(e.taregt, [0, 1];</pre></code>
@method getCell
@param {Number[]|Node} seed Array of row and column indexes, or a Node that
is either the cell itself or a descendant of one.
@param {Number[]|String} [shift] Offset by which to identify the returned
cell Node
@return {Node}
@since 3.5.0
**/
getCell: function (seed, shift) {
var tbody = this.tbodyNode,
row, cell, index, rowIndexOffset;
if (seed && tbody) {
if (isArray(seed)) {
row = tbody.get('children').item(seed[0]);
cell = row && row.get('children').item(seed[1]);
} else if (Y.instanceOf(seed, Y.Node)) {
cell = seed.ancestor('.' + this.getClassName('cell'), true);
}
if (cell && shift) {
rowIndexOffset = tbody.get('firstChild.rowIndex');
if (isString(shift)) {
// TODO this should be a static object map
switch (shift) {
case 'above' : shift = [-1, 0]; break;
case 'below' : shift = [1, 0]; break;
case 'next' : shift = [0, 1]; break;
case 'previous': shift = [0, -1]; break;
}
}
if (isArray(shift)) {
index = cell.get('parentNode.rowIndex') +
shift[0] - rowIndexOffset;
row = tbody.get('children').item(index);
index = cell.get('cellIndex') + shift[1];
cell = row && row.get('children').item(index);
}
}
}
return cell || null;
},
/**
Returns the generated CSS classname based on the input. If the `host`
attribute is configured, it will attempt to relay to its `getClassName`
or use its static `NAME` property as a string base.
If `host` is absent or has neither method nor `NAME`, a CSS classname
will be generated using this class's `NAME`.
@method getClassName
@param {String} token* Any number of token strings to assemble the
classname from.
@return {String}
@protected
@since 3.5.0
**/
getClassName: function () {
var host = this.host,
args;
if (host && host.getClassName) {
return host.getClassName.apply(host, arguments);
} else {
args = toArray(arguments);
args.unshift(this.constructor.NAME);
return Y.ClassNameManager.getClassName
.apply(Y.ClassNameManager, args);
}
},
/**
Returns the Model associated to the row Node or id provided. Passing the
Node or id for a descendant of the row also works.
If no Model can be found, `null` is returned.
@method getRecord
@param {String|Node} seed Row Node or `id`, or one for a descendant of a row
@return {Model}
@since 3.5.0
**/
getRecord: function (seed) {
var modelList = this.get('modelList'),
tbody = this.tbodyNode,
row = null,
record;
if (tbody) {
if (isString(seed)) {
seed = tbody.one('#' + seed);
}
if (Y.instanceOf(seed, Y.Node)) {
row = seed.ancestor(function (node) {
return node.get('parentNode').compareTo(tbody);
}, true);
record = row &&
modelList.getByClientId(row.getData('yui3-record'));
}
}
return record || null;
},
/**
Returns the `<tr>` Node from the given row index, Model, or Model's
`clientId`. If the rows haven't been rendered yet, or if the row can't be
found by the input, `null` is returned.
@method getRow
@param {Number|String|Model} id Row index, Model instance, or clientId
@return {Node}
@since 3.5.0
**/
getRow: function (id) {
var tbody = this.tbodyNode,
row = null;
if (tbody) {
if (id) {
id = this._idMap[id.get ? id.get('clientId') : id] || id;
}
row = isNumber(id) ?
tbody.get('children').item(id) :
tbody.one('#' + id);
}
return row;
},
/**
Creates the table's `<tbody>` content by assembling markup generated by
populating the `ROW\_TEMPLATE`, and `CELL\_TEMPLATE` templates with content
from the `columns` and `modelList` attributes.
The rendering process happens in three stages:
1. A row template is assembled from the `columns` attribute (see
`_createRowTemplate`)
2. An HTML string is built up by concatening the application of the data in
each Model in the `modelList` to the row template. For cells with
`formatter`s, the function is called to generate cell content. Cells
with `nodeFormatter`s are ignored. For all other cells, the data value
from the Model attribute for the given column key is used. The
accumulated row markup is then inserted into the container.
3. If any column is configured with a `nodeFormatter`, the `modelList` is
iterated again to apply the `nodeFormatter`s.
Supported properties of the column objects include:
* `key` - Used to link a column to an attribute in a Model.
* `name` - Used for columns that don't relate to an attribute in the Model
(`formatter` or `nodeFormatter` only) if the implementer wants a
predictable name to refer to in their CSS.
* `cellTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in
this column only.
* `formatter` - Used to customize or override the content value from the
Model. These do not have access to the cell or row Nodes and should
return string (HTML) content.
* `nodeFormatter` - Used to provide content for a cell as well as perform
any custom modifications on the cell or row Node that could not be
performed by `formatter`s. Should be used sparingly for better
performance.
* `emptyCellValue` - String (HTML) value to use if the Model data for a
column, or the content generated by a `formatter`, is the empty string,
`null`, or `undefined`.
* `allowHTML` - Set to `true` if a column value, `formatter`, or
`emptyCellValue` can contain HTML. This defaults to `false` to protect
against XSS.
* `className` - Space delimited CSS classes to add to all `<td>`s in a
column.
Column `formatter`s are passed an object (`o`) with the following
properties:
* `value` - The current value of the column's associated attribute, if
any.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `className` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's `<td>`.
* `rowIndex` - The zero-based row number.
* `rowClass` - Initially empty string to allow `formatter`s to add CSS
classes to the cell's containing row `<tr>`.
They may return a value or update `o.value` to assign specific HTML
content. A returned value has higher precedence.
Column `nodeFormatter`s are passed an object (`o`) with the following
properties:
* `value` - The current value of the column's associated attribute, if
any.
* `td` - The `<td>` Node instance.
* `cell` - The `<div>` liner Node instance if present, otherwise, the
`<td>`. When adding content to the cell, prefer appending into this
property.
* `data` - An object map of Model keys to their current values.
* `record` - The Model instance.
* `column` - The column configuration object for the current column.
* `rowIndex` - The zero-based row number.
They are expected to inject content into the cell's Node directly, including
any "empty" cell content. Each `nodeFormatter` will have access through the
Node API to all cells and rows in the `<tbody>`, but not to the `<table>`,
as it will not be attached yet.
If a `nodeFormatter` returns `false`, the `o.td` and `o.cell` Nodes will be
`destroy()`ed to remove them from the Node cache and free up memory. The
DOM elements will remain as will any content added to them. _It is highly
advisable to always return `false` from your `nodeFormatter`s_.
@method render
@return {BodyView} The instance
@chainable
@since 3.5.0
**/
render: function () {
var table = this.get('container'),
data = this.get('modelList'),
columns = this.get('columns'),
tbody = this.tbodyNode ||
(this.tbodyNode = this._createTBodyNode());
// Needed for mutation
this._createRowTemplate(columns);
if (data) {
tbody.setHTML(this._createDataHTML(columns));
this._applyNodeFormatters(tbody, columns);
}
if (tbody.get('parentNode') !== table) {
table.appendChild(tbody);
}
this._afterRenderCleanup();
this.bindUI();
return this;
},
// -- Protected and private methods ---------------------------------------
/**
Handles changes in the source's columns attribute. Redraws the table data.
@method _afterColumnsChange
@param {EventFacade} e The `columnsChange` event object
@protected
@since 3.5.0
**/
// TODO: Preserve existing DOM
// This will involve parsing and comparing the old and new column configs
// and reacting to four types of changes:
// 1. formatter, nodeFormatter, emptyCellValue changes
// 2. column deletions
// 3. column additions
// 4. column moves (preserve cells)
_afterColumnsChange: function () {
this.render();
},
/**
Handles modelList changes, including additions, deletions, and updates.
Modifies the existing table DOM accordingly.
@method _afterDataChange
@param {EventFacade} e The `change` event from the ModelList
@protected
@since 3.5.0
**/
_afterDataChange: function () {
//var type = e.type.slice(e.type.lastIndexOf(':') + 1);
// TODO: Isolate changes
this.render();
},
/**
Handles replacement of the modelList.
Rerenders the `<tbody>` contents.
@method _afterModelListChange
@param {EventFacade} e The `modelListChange` event
@protected
@since 3.6.0
**/
_afterModelListChange: function () {
var handles = this._eventHandles;
if (handles.dataChange) {
handles.dataChange.detach();
delete handles.dataChange;
this.bindUI();
}
if (this.tbodyNode) {
this.render();
}
},
/**
Iterates the `modelList`, and calls any `nodeFormatter`s found in the
`columns` param on the appropriate cell Nodes in the `tbody`.
@method _applyNodeFormatters
@param {Node} tbody The `<tbody>` Node whose columns to update
@param {Object[]} columns The column configurations
@protected
@since 3.5.0
**/
_applyNodeFormatters: function (tbody, columns) {
var host = this.host,
data = this.get('modelList'),
formatters = [],
linerQuery = '.' + this.getClassName('liner'),
rows, i, len;
// Only iterate the ModelList again if there are nodeFormatters
for (i = 0, len = columns.length; i < len; ++i) {
if (columns[i].nodeFormatter) {
formatters.push(i);
}
}
if (data && formatters.length) {
rows = tbody.get('childNodes');
data.each(function (record, index) {
var formatterData = {
data : record.toJSON(),
record : record,
rowIndex : index
},
row = rows.item(index),
i, len, col, key, cells, cell, keep;
if (row) {
cells = row.get('childNodes');
for (i = 0, len = formatters.length; i < len; ++i) {
cell = cells.item(formatters[i]);
if (cell) {
col = formatterData.column = columns[formatters[i]];
key = col.key || col.id;
formatterData.value = record.get(key);
formatterData.td = cell;
formatterData.cell = cell.one(linerQuery) || cell;
keep = col.nodeFormatter.call(host,formatterData);
if (keep === false) {
// Remove from the Node cache to reduce
// memory footprint. This also purges events,
// which you shouldn't be scoping to a cell
// anyway. You've been warned. Incidentally,
// you should always return false. Just sayin.
cell.destroy(true);
}
}
}
}
});
}
},
/**
Binds event subscriptions from the UI and the host (if assigned).
@method bindUI
@protected
@since 3.5.0
**/
bindUI: function () {
var handles = this._eventHandles,
modelList = this.get('modelList'),
changeEvent = modelList.model.NAME + ':change';
if (!handles.columnsChange) {
handles.columnsChange = this.after('columnsChange',
bind('_afterColumnsChange', this));
}
if (modelList && !handles.dataChange) {
handles.dataChange = modelList.after(
['add', 'remove', 'reset', changeEvent],
bind('_afterDataChange', this));
}
},
/**
Iterates the `modelList` and applies each Model to the `_rowTemplate`,
allowing any column `formatter` or `emptyCellValue` to override cell
content for the appropriate column. The aggregated HTML string is
returned.
@method _createDataHTML
@param {Object[]} columns The column configurations to customize the
generated cell content or class names
@return {HTML} The markup for all Models in the `modelList`, each applied
to the `_rowTemplate`
@protected
@since 3.5.0
**/
_createDataHTML: function (columns) {
var data = this.get('modelList'),
html = '';
if (data) {
data.each(function (model, index) {
html += this._createRowHTML(model, index, columns);
}, this);
}
return html;
},
/**
Applies the data of a given Model, modified by any column formatters and
supplemented by other template values to the instance's `_rowTemplate` (see
`_createRowTemplate`). The generated string is then returned.
The data from Model's attributes is fetched by `toJSON` and this data
object is appended with other properties to supply values to {placeholders}
in the template. For a template generated from a Model with 'foo' and 'bar'
attributes, the data object would end up with the following properties
before being used to populate the `_rowTemplate`:
* `clientID` - From Model, used the assign the `<tr>`'s 'id' attribute.
* `foo` - The value to populate the 'foo' column cell content. This
value will be the value stored in the Model's `foo` attribute, or the
result of the column's `formatter` if assigned. If the value is '',
`null`, or `undefined`, and the column's `emptyCellValue` is assigned,
that value will be used.
* `bar` - Same for the 'bar' column cell content.
* `foo-className` - String of CSS classes to apply to the `<td>`.
* `bar-className` - Same.
* `rowClass` - String of CSS classes to apply to the `<tr>`. This
will be the odd/even class per the specified index plus any additional
classes assigned by column formatters (via `o.rowClass`).
Because this object is available to formatters, any additional properties
can be added to fill in custom {placeholders} in the `_rowTemplate`.
@method _createRowHTML
@param {Model} model The Model instance to apply to the row template
@param {Number} index The index the row will be appearing
@param {Object[]} columns The column configurations
@return {HTML} The markup for the provided Model, less any `nodeFormatter`s
@protected
@since 3.5.0
**/
_createRowHTML: function (model, index, columns) {
var data = model.toJSON(),
clientId = model.get('clientId'),
values = {
rowId : this._getRowId(clientId),
clientId: clientId,
rowClass: (index % 2) ? this.CLASS_ODD : this.CLASS_EVEN
},
host = this.host || this,
i, len, col, token, value, formatterData;
for (i = 0, len = columns.length; i < len; ++i) {
col = columns[i];
value = data[col.key];
token = col._id || col.key;
values[token + '-className'] = '';
if (col._formatterFn) {
formatterData = {
value : value,
data : data,
column : col,
record : model,
className: '',
rowClass : '',
rowIndex : index
};
// Formatters can either return a value
value = col._formatterFn.call(host, formatterData);
// or update the value property of the data obj passed
if (value === undefined) {
value = formatterData.value;
}
values[token + '-className'] = formatterData.className;
values.rowClass += ' ' + formatterData.rowClass;
}
if (value === undefined || value === null || value === '') {
value = col.emptyCellValue || '';
}
values[token] = col.allowHTML ? value : htmlEscape(value);
values.rowClass = values.rowClass.replace(/\s+/g, ' ');
}
return fromTemplate(this._rowTemplate, values);
},
/**
Creates a custom HTML template string for use in generating the markup for
individual table rows with {placeholder}s to capture data from the Models
in the `modelList` attribute or from column `formatter`s.
Assigns the `_rowTemplate` property.
@method _createRowTemplate
@param {Object[]} columns Array of column configuration objects
@protected
@since 3.5.0
**/
_createRowTemplate: function (columns) {
var html = '',
cellTemplate = this.CELL_TEMPLATE,
F = Y.DataTable.BodyView.Formatters,
i, len, col, key, token, headers, tokenValues, formatter;
for (i = 0, len = columns.length; i < len; ++i) {
col = columns[i];
key = col.key;
token = col._id || key;
formatter = col.formatter;
// Only include headers if there are more than one
headers = (col._headers || []).length > 1 ?
'headers="' + col._headers.join(' ') + '"' : '';
tokenValues = {
content : '{' + token + '}',
headers : headers,
className: this.getClassName('col', token) + ' ' +
(col.className || '') + ' ' +
this.getClassName('cell') +
' {' + token + '-className}'
};
if (formatter) {
if (Lang.isFunction(formatter)) {
col._formatterFn = formatter;
} else if (formatter in F) {
col._formatterFn = F[formatter].call(this.host || this, col);
} else {
tokenValues.content = formatter.replace(valueRegExp, tokenValues.content);
}
}
if (col.nodeFormatter) {
// Defer all node decoration to the formatter
tokenValues.content = '';
}
html += fromTemplate(col.cellTemplate || cellTemplate, tokenValues);
}
this._rowTemplate = fromTemplate(this.ROW_TEMPLATE, {
content: html
});
},
/**
Cleans up temporary values created during rendering.
@method _afterRenderCleanup
@private
*/
_afterRenderCleanup: function () {
var columns = this.get('columns'),
i, len = columns.length;
for (i = 0;i < len; i+=1) {
delete columns[i]._formatterFn;
}
},
/**
Creates the `<tbody>` node that will store the data rows.
@method _createTBodyNode
@return {Node}
@protected
@since 3.6.0
**/
_createTBodyNode: function () {
return Y.Node.create(fromTemplate(this.TBODY_TEMPLATE, {
className: this.getClassName('data')
}));
},
/**
Destroys the instance.
@method destructor
@protected
@since 3.5.0
**/
destructor: function () {
(new Y.EventHandle(YObject.values(this._eventHandles))).detach();
},
/**
Holds the event subscriptions needing to be detached when the instance is
`destroy()`ed.
@property _eventHandles
@type {Object}
@default undefined (initially unset)
@protected
@since 3.5.0
**/
//_eventHandles: null,
/**
Returns the row ID associated with a Model's clientId.
@method _getRowId
@param {String} clientId The Model clientId
@return {String}
@protected
**/
_getRowId: function (clientId) {
return this._idMap[clientId] || (this._idMap[clientId] = Y.guid());
},
/**
Map of Model clientIds to row ids.
@property _idMap
@type {Object}
@protected
**/
//_idMap,
/**
Initializes the instance. Reads the following configuration properties in
addition to the instance attributes:
* `columns` - (REQUIRED) The initial column information
* `host` - The object to serve as source of truth for column info and
for generating class names
@method initializer
@param {Object} config Configuration data
@protected
@since 3.5.0
**/
initializer: function (config) {
this.host = config.host;
this._eventHandles = {
modelListChange: this.after('modelListChange',
bind('_afterModelListChange', this))
};
this._idMap = {};
this.CLASS_ODD = this.getClassName('odd');
this.CLASS_EVEN = this.getClassName('even');
}
/**
The HTML template used to create a full row of markup for a single Model in
the `modelList` plus any customizations defined in the column
configurations.
@property _rowTemplate
@type {HTML}
@default (initially unset)
@protected
@since 3.5.0
**/
//_rowTemplate: null
},{
/**
Hash of formatting functions for cell contents.
This property can be populated with a hash of formatting functions by the developer
or a set of pre-defined functions can be loaded via the `datatable-formatters` module.
See: [DataTable.BodyView.Formatters](./DataTable.BodyView.Formatters.html)
@property Formatters
@type Object
@since 3.8.0
@static
**/
Formatters: {}
});
}, '@VERSION@', {"requires": ["datatable-core", "view", "classnamemanager"]});
| drewfreyling/cdnjs | ajax/libs/yui/3.9.0pr3/datatable-body/datatable-body-debug.js | JavaScript | mit | 32,136 |
var arrayCopy = require('./arrayCopy'),
composeArgs = require('./composeArgs'),
composeArgsRight = require('./composeArgsRight'),
replaceHolders = require('./replaceHolders');
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
CURRY_BOUND_FLAG = 4,
CURRY_FLAG = 8,
ARY_FLAG = 128,
REARG_FLAG = 256;
/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/* Native method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**
* Merges the function metadata of `source` into `data`.
*
* Merging metadata reduces the number of wrappers required to invoke a function.
* This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
* may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
* augment function arguments, making the order in which they are executed important,
* preventing the merging of metadata. However, we make an exception for a safe
* common case where curried functions have `_.ary` and or `_.rearg` applied.
*
* @private
* @param {Array} data The destination metadata.
* @param {Array} source The source metadata.
* @returns {Array} Returns `data`.
*/
function mergeData(data, source) {
var bitmask = data[1],
srcBitmask = source[1],
newBitmask = bitmask | srcBitmask,
isCommon = newBitmask < ARY_FLAG;
var isCombo =
(srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||
(srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||
(srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);
// Exit early if metadata can't be merged.
if (!(isCommon || isCombo)) {
return data;
}
// Use source `thisArg` if available.
if (srcBitmask & BIND_FLAG) {
data[2] = source[2];
// Set when currying a bound function.
newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
}
// Compose partial arguments.
var value = source[3];
if (value) {
var partials = data[3];
data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
}
// Compose partial right arguments.
value = source[5];
if (value) {
partials = data[5];
data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
}
// Use source `argPos` if available.
value = source[7];
if (value) {
data[7] = arrayCopy(value);
}
// Use source `ary` if it's smaller.
if (srcBitmask & ARY_FLAG) {
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
}
// Use source `arity` if one is not provided.
if (data[9] == null) {
data[9] = source[9];
}
// Use source `func` and merge bitmasks.
data[0] = source[0];
data[1] = newBitmask;
return data;
}
module.exports = mergeData;
| Miller547719886/kopi6.com | node_modules/jshint/node_modules/lodash/internal/mergeData.js | JavaScript | mit | 3,024 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
/**
* Request represents an HTTP request.
*
* The methods dealing with URL accept / return a raw path (% encoded):
* * getBasePath
* * getBaseUrl
* * getPathInfo
* * getRequestUri
* * getUri
* * getUriForPath
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Request
{
const HEADER_CLIENT_IP = 'client_ip';
const HEADER_CLIENT_HOST = 'client_host';
const HEADER_CLIENT_PROTO = 'client_proto';
const HEADER_CLIENT_PORT = 'client_port';
protected static $trustProxy = false;
protected static $trustedProxies = array();
/**
* Names for headers that can be trusted when
* using trusted proxies.
*
* The default names are non-standard, but widely used
* by popular reverse proxies (like Apache mod_proxy or Amazon EC2).
*/
protected static $trustedHeaders = array(
self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO',
self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
);
protected static $httpMethodParameterOverride = false;
/**
* @var \Symfony\Component\HttpFoundation\ParameterBag
*
* @api
*/
public $attributes;
/**
* @var \Symfony\Component\HttpFoundation\ParameterBag
*
* @api
*/
public $request;
/**
* @var \Symfony\Component\HttpFoundation\ParameterBag
*
* @api
*/
public $query;
/**
* @var \Symfony\Component\HttpFoundation\ServerBag
*
* @api
*/
public $server;
/**
* @var \Symfony\Component\HttpFoundation\FileBag
*
* @api
*/
public $files;
/**
* @var \Symfony\Component\HttpFoundation\ParameterBag
*
* @api
*/
public $cookies;
/**
* @var \Symfony\Component\HttpFoundation\HeaderBag
*
* @api
*/
public $headers;
/**
* @var string
*/
protected $content;
/**
* @var array
*/
protected $languages;
/**
* @var array
*/
protected $charsets;
/**
* @var array
*/
protected $acceptableContentTypes;
/**
* @var string
*/
protected $pathInfo;
/**
* @var string
*/
protected $requestUri;
/**
* @var string
*/
protected $baseUrl;
/**
* @var string
*/
protected $basePath;
/**
* @var string
*/
protected $method;
/**
* @var string
*/
protected $format;
/**
* @var \Symfony\Component\HttpFoundation\Session\SessionInterface
*/
protected $session;
/**
* @var string
*/
protected $locale;
/**
* @var string
*/
protected $defaultLocale = 'en';
/**
* @var array
*/
protected static $formats;
/**
* Constructor.
*
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param string $content The raw body data
*
* @api
*/
public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{
$this->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
}
/**
* Sets the parameters for this request.
*
* This method also re-initializes all properties.
*
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param string $content The raw body data
*
* @api
*/
public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{
$this->request = new ParameterBag($request);
$this->query = new ParameterBag($query);
$this->attributes = new ParameterBag($attributes);
$this->cookies = new ParameterBag($cookies);
$this->files = new FileBag($files);
$this->server = new ServerBag($server);
$this->headers = new HeaderBag($this->server->getHeaders());
$this->content = $content;
$this->languages = null;
$this->charsets = null;
$this->acceptableContentTypes = null;
$this->pathInfo = null;
$this->requestUri = null;
$this->baseUrl = null;
$this->basePath = null;
$this->method = null;
$this->format = null;
}
/**
* Creates a new request with values from PHP's super globals.
*
* @return Request A new request
*
* @api
*/
public static function createFromGlobals()
{
$request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
&& in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))
) {
parse_str($request->getContent(), $data);
$request->request = new ParameterBag($data);
}
return $request;
}
/**
* Creates a Request based on a given URI and configuration.
*
* The information contained in the URI always take precedence
* over the other information (server and parameters).
*
* @param string $uri The URI
* @param string $method The HTTP method
* @param array $parameters The query (GET) or request (POST) parameters
* @param array $cookies The request cookies ($_COOKIE)
* @param array $files The request files ($_FILES)
* @param array $server The server parameters ($_SERVER)
* @param string $content The raw body data
*
* @return Request A Request instance
*
* @api
*/
public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null)
{
$server = array_replace(array(
'SERVER_NAME' => 'localhost',
'SERVER_PORT' => 80,
'HTTP_HOST' => 'localhost',
'HTTP_USER_AGENT' => 'Symfony/2.X',
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'REMOTE_ADDR' => '127.0.0.1',
'SCRIPT_NAME' => '',
'SCRIPT_FILENAME' => '',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'REQUEST_TIME' => time(),
), $server);
$server['PATH_INFO'] = '';
$server['REQUEST_METHOD'] = strtoupper($method);
$components = parse_url($uri);
if (isset($components['host'])) {
$server['SERVER_NAME'] = $components['host'];
$server['HTTP_HOST'] = $components['host'];
}
if (isset($components['scheme'])) {
if ('https' === $components['scheme']) {
$server['HTTPS'] = 'on';
$server['SERVER_PORT'] = 443;
} else {
unset($server['HTTPS']);
$server['SERVER_PORT'] = 80;
}
}
if (isset($components['port'])) {
$server['SERVER_PORT'] = $components['port'];
$server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port'];
}
if (isset($components['user'])) {
$server['PHP_AUTH_USER'] = $components['user'];
}
if (isset($components['pass'])) {
$server['PHP_AUTH_PW'] = $components['pass'];
}
if (!isset($components['path'])) {
$components['path'] = '/';
}
switch (strtoupper($method)) {
case 'POST':
case 'PUT':
case 'DELETE':
if (!isset($server['CONTENT_TYPE'])) {
$server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
}
case 'PATCH':
$request = $parameters;
$query = array();
break;
default:
$request = array();
$query = $parameters;
break;
}
if (isset($components['query'])) {
parse_str(html_entity_decode($components['query']), $qs);
$query = array_replace($qs, $query);
}
$queryString = http_build_query($query, '', '&');
$server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : '');
$server['QUERY_STRING'] = $queryString;
return new static($query, $request, array(), $cookies, $files, $server, $content);
}
/**
* Clones a request and overrides some of its parameters.
*
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
*
* @return Request The duplicated request
*
* @api
*/
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
{
$dup = clone $this;
if ($query !== null) {
$dup->query = new ParameterBag($query);
}
if ($request !== null) {
$dup->request = new ParameterBag($request);
}
if ($attributes !== null) {
$dup->attributes = new ParameterBag($attributes);
}
if ($cookies !== null) {
$dup->cookies = new ParameterBag($cookies);
}
if ($files !== null) {
$dup->files = new FileBag($files);
}
if ($server !== null) {
$dup->server = new ServerBag($server);
$dup->headers = new HeaderBag($dup->server->getHeaders());
}
$dup->languages = null;
$dup->charsets = null;
$dup->acceptableContentTypes = null;
$dup->pathInfo = null;
$dup->requestUri = null;
$dup->baseUrl = null;
$dup->basePath = null;
$dup->method = null;
$dup->format = null;
return $dup;
}
/**
* Clones the current request.
*
* Note that the session is not cloned as duplicated requests
* are most of the time sub-requests of the main one.
*/
public function __clone()
{
$this->query = clone $this->query;
$this->request = clone $this->request;
$this->attributes = clone $this->attributes;
$this->cookies = clone $this->cookies;
$this->files = clone $this->files;
$this->server = clone $this->server;
$this->headers = clone $this->headers;
}
/**
* Returns the request as a string.
*
* @return string The request
*/
public function __toString()
{
return
sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n".
$this->headers."\r\n".
$this->getContent();
}
/**
* Overrides the PHP global variables according to this request instance.
*
* It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
* $_FILES is never override, see rfc1867
*
* @api
*/
public function overrideGlobals()
{
$_GET = $this->query->all();
$_POST = $this->request->all();
$_SERVER = $this->server->all();
$_COOKIE = $this->cookies->all();
foreach ($this->headers->all() as $key => $value) {
$key = strtoupper(str_replace('-', '_', $key));
if (in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) {
$_SERVER[$key] = implode(', ', $value);
} else {
$_SERVER['HTTP_'.$key] = implode(', ', $value);
}
}
$request = array('g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE);
$requestOrder = ini_get('request_order') ?: ini_get('variable_order');
$requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp';
$_REQUEST = array();
foreach (str_split($requestOrder) as $order) {
$_REQUEST = array_merge($_REQUEST, $request[$order]);
}
}
/**
* Trusts $_SERVER entries coming from proxies.
*
* @deprecated Deprecated since version 2.0, to be removed in 2.3. Use setTrustedProxies instead.
*/
public static function trustProxyData()
{
trigger_error('trustProxyData() is deprecated since version 2.0 and will be removed in 2.3. Use setTrustedProxies() instead.', E_USER_DEPRECATED);
self::$trustProxy = true;
}
/**
* Sets a list of trusted proxies.
*
* You should only list the reverse proxies that you manage directly.
*
* @param array $proxies A list of trusted proxies
*
* @api
*/
public static function setTrustedProxies(array $proxies)
{
self::$trustedProxies = $proxies;
self::$trustProxy = $proxies ? true : false;
}
/**
* Gets the list of trusted proxies.
*
* @return array An array of trusted proxies.
*/
public static function getTrustedProxies()
{
return self::$trustedProxies;
}
/**
* Sets the name for trusted headers.
*
* The following header keys are supported:
*
* * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp())
* * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost())
* * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort())
* * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure())
*
* Setting an empty value allows to disable the trusted header for the given key.
*
* @param string $key The header key
* @param string $value The header name
*
* @throws \InvalidArgumentException
*/
public static function setTrustedHeaderName($key, $value)
{
if (!array_key_exists($key, self::$trustedHeaders)) {
throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key));
}
self::$trustedHeaders[$key] = $value;
}
/**
* Returns true if $_SERVER entries coming from proxies are trusted,
* false otherwise.
*
* @return boolean
*
* @deprecated Deprecated since version 2.2, to be removed in 2.3. Use getTrustedProxies instead.
*/
public static function isProxyTrusted()
{
return self::$trustProxy;
}
/**
* Normalizes a query string.
*
* It builds a normalized query string, where keys/value pairs are alphabetized,
* have consistent escaping and unneeded delimiters are removed.
*
* @param string $qs Query string
*
* @return string A normalized query string for the Request
*/
public static function normalizeQueryString($qs)
{
if ('' == $qs) {
return '';
}
$parts = array();
$order = array();
foreach (explode('&', $qs) as $param) {
if ('' === $param || '=' === $param[0]) {
// Ignore useless delimiters, e.g. "x=y&".
// Also ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway.
// PHP also does not include them when building _GET.
continue;
}
$keyValuePair = explode('=', $param, 2);
// GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded).
// PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. This is why we use urldecode and then normalize to
// RFC 3986 with rawurlencode.
$parts[] = isset($keyValuePair[1]) ?
rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) :
rawurlencode(urldecode($keyValuePair[0]));
$order[] = urldecode($keyValuePair[0]);
}
array_multisort($order, SORT_ASC, $parts);
return implode('&', $parts);
}
/**
* Enables support for the _method request parameter to determine the intended HTTP method.
*
* Be warned that enabling this feature might lead to CSRF issues in your code.
* Check that you are using CSRF tokens when required.
*
* The HTTP method can only be overridden when the real HTTP method is POST.
*/
public static function enableHttpMethodParameterOverride()
{
self::$httpMethodParameterOverride = true;
}
/**
* Checks whether support for the _method request parameter is enabled.
*
* @return Boolean True when the _method request parameter is enabled, false otherwise
*/
public static function getHttpMethodParameterOverride()
{
return self::$httpMethodParameterOverride;
}
/**
* Gets a "parameter" value.
*
* This method is mainly useful for libraries that want to provide some flexibility.
*
* Order of precedence: GET, PATH, POST
*
* Avoid using this method in controllers:
*
* * slow
* * prefer to get from a "named" source
*
* It is better to explicitly get request parameters from the appropriate
* public property instead (query, attributes, request).
*
* @param string $key the key
* @param mixed $default the default value
* @param Boolean $deep is parameter deep in multidimensional array
*
* @return mixed
*/
public function get($key, $default = null, $deep = false)
{
return $this->query->get($key, $this->attributes->get($key, $this->request->get($key, $default, $deep), $deep), $deep);
}
/**
* Gets the Session.
*
* @return SessionInterface|null The session
*
* @api
*/
public function getSession()
{
return $this->session;
}
/**
* Whether the request contains a Session which was started in one of the
* previous requests.
*
* @return Boolean
*
* @api
*/
public function hasPreviousSession()
{
// the check for $this->session avoids malicious users trying to fake a session cookie with proper name
return $this->hasSession() && $this->cookies->has($this->session->getName());
}
/**
* Whether the request contains a Session object.
*
* This method does not give any information about the state of the session object,
* like whether the session is started or not. It is just a way to check if this Request
* is associated with a Session instance.
*
* @return Boolean true when the Request contains a Session object, false otherwise
*
* @api
*/
public function hasSession()
{
return null !== $this->session;
}
/**
* Sets the Session.
*
* @param SessionInterface $session The Session
*
* @api
*/
public function setSession(SessionInterface $session)
{
$this->session = $session;
}
/**
* Returns the client IP address.
*
* This method can read the client IP address from the "X-Forwarded-For" header
* when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
* header value is a comma+space separated list of IP addresses, the left-most
* being the original client, and each successive proxy that passed the request
* adding the IP address where it received the request from.
*
* If your reverse proxy uses a different header name than "X-Forwarded-For",
* ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with
* the "client-ip" key.
*
* @return string The client IP address
*
* @see http://en.wikipedia.org/wiki/X-Forwarded-For
*
* @api
*/
public function getClientIp()
{
$ip = $this->server->get('REMOTE_ADDR');
if (!self::$trustProxy) {
return $ip;
}
if (!self::$trustedHeaders[self::HEADER_CLIENT_IP] || !$this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) {
return $ip;
}
$clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
$clientIps[] = $ip;
$trustedProxies = self::$trustProxy && !self::$trustedProxies ? array($ip) : self::$trustedProxies;
$clientIps = array_diff($clientIps, $trustedProxies);
return array_pop($clientIps);
}
/**
* Returns current script name.
*
* @return string
*
* @api
*/
public function getScriptName()
{
return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', ''));
}
/**
* Returns the path being requested relative to the executed script.
*
* The path info always starts with a /.
*
* Suppose this request is instantiated from /mysite on localhost:
*
* * http://localhost/mysite returns an empty string
* * http://localhost/mysite/about returns '/about'
* * http://localhost/mysite/enco%20ded returns '/enco%20ded'
* * http://localhost/mysite/about?var=1 returns '/about'
*
* @return string The raw path (i.e. not urldecoded)
*
* @api
*/
public function getPathInfo()
{
if (null === $this->pathInfo) {
$this->pathInfo = $this->preparePathInfo();
}
return $this->pathInfo;
}
/**
* Returns the root path from which this request is executed.
*
* Suppose that an index.php file instantiates this request object:
*
* * http://localhost/index.php returns an empty string
* * http://localhost/index.php/page returns an empty string
* * http://localhost/web/index.php returns '/web'
* * http://localhost/we%20b/index.php returns '/we%20b'
*
* @return string The raw path (i.e. not urldecoded)
*
* @api
*/
public function getBasePath()
{
if (null === $this->basePath) {
$this->basePath = $this->prepareBasePath();
}
return $this->basePath;
}
/**
* Returns the root url from which this request is executed.
*
* The base URL never ends with a /.
*
* This is similar to getBasePath(), except that it also includes the
* script filename (e.g. index.php) if one exists.
*
* @return string The raw url (i.e. not urldecoded)
*
* @api
*/
public function getBaseUrl()
{
if (null === $this->baseUrl) {
$this->baseUrl = $this->prepareBaseUrl();
}
return $this->baseUrl;
}
/**
* Gets the request's scheme.
*
* @return string
*
* @api
*/
public function getScheme()
{
return $this->isSecure() ? 'https' : 'http';
}
/**
* Returns the port on which the request is made.
*
* This method can read the client port from the "X-Forwarded-Port" header
* when trusted proxies were set via "setTrustedProxies()".
*
* The "X-Forwarded-Port" header must contain the client port.
*
* If your reverse proxy uses a different header name than "X-Forwarded-Port",
* configure it via "setTrustedHeaderName()" with the "client-port" key.
*
* @return string
*
* @api
*/
public function getPort()
{
if (self::$trustProxy && self::$trustedHeaders[self::HEADER_CLIENT_PORT] && $port = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PORT])) {
return $port;
}
return $this->server->get('SERVER_PORT');
}
/**
* Returns the user.
*
* @return string|null
*/
public function getUser()
{
return $this->server->get('PHP_AUTH_USER');
}
/**
* Returns the password.
*
* @return string|null
*/
public function getPassword()
{
return $this->server->get('PHP_AUTH_PW');
}
/**
* Gets the user info.
*
* @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server
*/
public function getUserInfo()
{
$userinfo = $this->getUser();
$pass = $this->getPassword();
if ('' != $pass) {
$userinfo .= ":$pass";
}
return $userinfo;
}
/**
* Returns the HTTP host being requested.
*
* The port name will be appended to the host if it's non-standard.
*
* @return string
*
* @api
*/
public function getHttpHost()
{
$scheme = $this->getScheme();
$port = $this->getPort();
if (('http' == $scheme && $port == 80) || ('https' == $scheme && $port == 443)) {
return $this->getHost();
}
return $this->getHost().':'.$port;
}
/**
* Returns the requested URI.
*
* @return string The raw URI (i.e. not urldecoded)
*
* @api
*/
public function getRequestUri()
{
if (null === $this->requestUri) {
$this->requestUri = $this->prepareRequestUri();
}
return $this->requestUri;
}
/**
* Gets the scheme and HTTP host.
*
* If the URL was called with basic authentication, the user
* and the password are not added to the generated string.
*
* @return string The scheme and HTTP host
*/
public function getSchemeAndHttpHost()
{
return $this->getScheme().'://'.$this->getHttpHost();
}
/**
* Generates a normalized URI for the Request.
*
* @return string A normalized URI for the Request
*
* @see getQueryString()
*
* @api
*/
public function getUri()
{
if (null !== $qs = $this->getQueryString()) {
$qs = '?'.$qs;
}
return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs;
}
/**
* Generates a normalized URI for the given path.
*
* @param string $path A path to use instead of the current one
*
* @return string The normalized URI for the path
*
* @api
*/
public function getUriForPath($path)
{
return $this->getSchemeAndHttpHost().$this->getBaseUrl().$path;
}
/**
* Generates the normalized query string for the Request.
*
* It builds a normalized query string, where keys/value pairs are alphabetized
* and have consistent escaping.
*
* @return string|null A normalized query string for the Request
*
* @api
*/
public function getQueryString()
{
$qs = static::normalizeQueryString($this->server->get('QUERY_STRING'));
return '' === $qs ? null : $qs;
}
/**
* Checks whether the request is secure or not.
*
* This method can read the client port from the "X-Forwarded-Proto" header
* when trusted proxies were set via "setTrustedProxies()".
*
* The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
*
* If your reverse proxy uses a different header name than "X-Forwarded-Proto"
* ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with
* the "client-proto" key.
*
* @return Boolean
*
* @api
*/
public function isSecure()
{
if (self::$trustProxy && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && $proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO])) {
return in_array(strtolower($proto), array('https', 'on', '1'));
}
return 'on' == strtolower($this->server->get('HTTPS')) || 1 == $this->server->get('HTTPS');
}
/**
* Returns the host name.
*
* This method can read the client port from the "X-Forwarded-Host" header
* when trusted proxies were set via "setTrustedProxies()".
*
* The "X-Forwarded-Host" header must contain the client host name.
*
* If your reverse proxy uses a different header name than "X-Forwarded-Host",
* configure it via "setTrustedHeaderName()" with the "client-host" key.
*
* @return string
*
* @throws \UnexpectedValueException when the host name is invalid
*
* @api
*/
public function getHost()
{
if (self::$trustProxy && self::$trustedHeaders[self::HEADER_CLIENT_HOST] && $host = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_HOST])) {
$elements = explode(',', $host);
$host = $elements[count($elements) - 1];
} elseif (!$host = $this->headers->get('HOST')) {
if (!$host = $this->server->get('SERVER_NAME')) {
$host = $this->server->get('SERVER_ADDR', '');
}
}
// trim and remove port number from host
// host is lowercase as per RFC 952/2181
$host = strtolower(preg_replace('/:\d+$/', '', trim($host)));
// as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user)
// check that it does not contain forbidden characters (see RFC 952 and RFC 2181)
if ($host && !preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host)) {
throw new \UnexpectedValueException('Invalid Host');
}
return $host;
}
/**
* Sets the request method.
*
* @param string $method
*
* @api
*/
public function setMethod($method)
{
$this->method = null;
$this->server->set('REQUEST_METHOD', $method);
}
/**
* Gets the request "intended" method.
*
* If the X-HTTP-Method-Override header is set, and if the method is a POST,
* then it is used to determine the "real" intended HTTP method.
*
* The _method request parameter can also be used to determine the HTTP method,
* but only if enableHttpMethodParameterOverride() has been called.
*
* The method is always an uppercased string.
*
* @return string The request method
*
* @api
*
* @see getRealMethod
*/
public function getMethod()
{
if (null === $this->method) {
$this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET'));
if ('POST' === $this->method) {
if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) {
$this->method = strtoupper($method);
} elseif (self::$httpMethodParameterOverride) {
$this->method = strtoupper($this->request->get('_method', $this->query->get('_method', 'POST')));
}
}
}
return $this->method;
}
/**
* Gets the "real" request method.
*
* @return string The request method
*
* @see getMethod
*/
public function getRealMethod()
{
return strtoupper($this->server->get('REQUEST_METHOD', 'GET'));
}
/**
* Gets the mime type associated with the format.
*
* @param string $format The format
*
* @return string The associated mime type (null if not found)
*
* @api
*/
public function getMimeType($format)
{
if (null === static::$formats) {
static::initializeFormats();
}
return isset(static::$formats[$format]) ? static::$formats[$format][0] : null;
}
/**
* Gets the format associated with the mime type.
*
* @param string $mimeType The associated mime type
*
* @return string|null The format (null if not found)
*
* @api
*/
public function getFormat($mimeType)
{
if (false !== $pos = strpos($mimeType, ';')) {
$mimeType = substr($mimeType, 0, $pos);
}
if (null === static::$formats) {
static::initializeFormats();
}
foreach (static::$formats as $format => $mimeTypes) {
if (in_array($mimeType, (array) $mimeTypes)) {
return $format;
}
}
return null;
}
/**
* Associates a format with mime types.
*
* @param string $format The format
* @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
*
* @api
*/
public function setFormat($format, $mimeTypes)
{
if (null === static::$formats) {
static::initializeFormats();
}
static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes);
}
/**
* Gets the request format.
*
* Here is the process to determine the format:
*
* * format defined by the user (with setRequestFormat())
* * _format request parameter
* * $default
*
* @param string $default The default format
*
* @return string The request format
*
* @api
*/
public function getRequestFormat($default = 'html')
{
if (null === $this->format) {
$this->format = $this->get('_format', $default);
}
return $this->format;
}
/**
* Sets the request format.
*
* @param string $format The request format.
*
* @api
*/
public function setRequestFormat($format)
{
$this->format = $format;
}
/**
* Gets the format associated with the request.
*
* @return string|null The format (null if no content type is present)
*
* @api
*/
public function getContentType()
{
return $this->getFormat($this->headers->get('CONTENT_TYPE'));
}
/**
* Sets the default locale.
*
* @param string $locale
*
* @api
*/
public function setDefaultLocale($locale)
{
$this->defaultLocale = $locale;
if (null === $this->locale) {
$this->setPhpDefaultLocale($locale);
}
}
/**
* Sets the locale.
*
* @param string $locale
*
* @api
*/
public function setLocale($locale)
{
$this->setPhpDefaultLocale($this->locale = $locale);
}
/**
* Get the locale.
*
* @return string
*/
public function getLocale()
{
return null === $this->locale ? $this->defaultLocale : $this->locale;
}
/**
* Checks if the request method is of specified type.
*
* @param string $method Uppercase request method (GET, POST etc).
*
* @return Boolean
*/
public function isMethod($method)
{
return $this->getMethod() === strtoupper($method);
}
/**
* Checks whether the method is safe or not.
*
* @return Boolean
*
* @api
*/
public function isMethodSafe()
{
return in_array($this->getMethod(), array('GET', 'HEAD'));
}
/**
* Returns the request body content.
*
* @param Boolean $asResource If true, a resource will be returned
*
* @return string|resource The request body content or a resource to read the body stream.
*
* @throws \LogicException
*/
public function getContent($asResource = false)
{
if (false === $this->content || (true === $asResource && null !== $this->content)) {
throw new \LogicException('getContent() can only be called once when using the resource return type.');
}
if (true === $asResource) {
$this->content = false;
return fopen('php://input', 'rb');
}
if (null === $this->content) {
$this->content = file_get_contents('php://input');
}
return $this->content;
}
/**
* Gets the Etags.
*
* @return array The entity tags
*/
public function getETags()
{
return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY);
}
/**
* @return Boolean
*/
public function isNoCache()
{
return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma');
}
/**
* Returns the preferred language.
*
* @param array $locales An array of ordered available locales
*
* @return string|null The preferred locale
*
* @api
*/
public function getPreferredLanguage(array $locales = null)
{
$preferredLanguages = $this->getLanguages();
if (empty($locales)) {
return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null;
}
if (!$preferredLanguages) {
return $locales[0];
}
$extendedPreferredLanguages = array();
foreach ($preferredLanguages as $language) {
$extendedPreferredLanguages[] = $language;
if (false !== $position = strpos($language, '_')) {
$superLanguage = substr($language, 0, $position);
if (!in_array($superLanguage, $preferredLanguages)) {
$extendedPreferredLanguages[] = $superLanguage;
}
}
}
$preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales));
return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $locales[0];
}
/**
* Gets a list of languages acceptable by the client browser.
*
* @return array Languages ordered in the user browser preferences
*
* @api
*/
public function getLanguages()
{
if (null !== $this->languages) {
return $this->languages;
}
$languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all();
$this->languages = array();
foreach (array_keys($languages) as $lang) {
if (strstr($lang, '-')) {
$codes = explode('-', $lang);
if ($codes[0] == 'i') {
// Language not listed in ISO 639 that are not variants
// of any listed language, which can be registered with the
// i-prefix, such as i-cherokee
if (count($codes) > 1) {
$lang = $codes[1];
}
} else {
for ($i = 0, $max = count($codes); $i < $max; $i++) {
if ($i == 0) {
$lang = strtolower($codes[0]);
} else {
$lang .= '_'.strtoupper($codes[$i]);
}
}
}
}
$this->languages[] = $lang;
}
return $this->languages;
}
/**
* Gets a list of charsets acceptable by the client browser.
*
* @return array List of charsets in preferable order
*
* @api
*/
public function getCharsets()
{
if (null !== $this->charsets) {
return $this->charsets;
}
return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all());
}
/**
* Gets a list of content types acceptable by the client browser
*
* @return array List of content types in preferable order
*
* @api
*/
public function getAcceptableContentTypes()
{
if (null !== $this->acceptableContentTypes) {
return $this->acceptableContentTypes;
}
return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all());
}
/**
* Returns true if the request is a XMLHttpRequest.
*
* It works if your JavaScript library set an X-Requested-With HTTP header.
* It is known to work with common JavaScript frameworks:
* @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
*
* @return Boolean true if the request is an XMLHttpRequest, false otherwise
*
* @api
*/
public function isXmlHttpRequest()
{
return 'XMLHttpRequest' == $this->headers->get('X-Requested-With');
}
/**
* Splits an Accept-* HTTP header.
*
* @param string $header Header to split
*
* @return array Array indexed by the values of the Accept-* header in preferred order
*
* @deprecated Deprecated since version 2.2, to be removed in 2.3.
*/
public function splitHttpAcceptHeader($header)
{
trigger_error('splitHttpAcceptHeader() is deprecated since version 2.2 and will be removed in 2.3.', E_USER_DEPRECATED);
$headers = array();
foreach (AcceptHeader::fromString($header)->all() as $item) {
$key = $item->getValue();
foreach ($item->getAttributes() as $name => $value) {
$key .= sprintf(';%s=%s', $name, $value);
}
$headers[$key] = $item->getQuality();
}
return $headers;
}
/*
* The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24)
*
* Code subject to the new BSD license (http://framework.zend.com/license/new-bsd).
*
* Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
*/
protected function prepareRequestUri()
{
$requestUri = '';
if ($this->headers->has('X_ORIGINAL_URL') && false !== stripos(PHP_OS, 'WIN')) {
// IIS with Microsoft Rewrite Module
$requestUri = $this->headers->get('X_ORIGINAL_URL');
$this->headers->remove('X_ORIGINAL_URL');
} elseif ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
// IIS with ISAPI_Rewrite
$requestUri = $this->headers->get('X_REWRITE_URL');
$this->headers->remove('X_REWRITE_URL');
} elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') {
// IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
$requestUri = $this->server->get('UNENCODED_URL');
$this->server->remove('UNENCODED_URL');
$this->server->remove('IIS_WasUrlRewritten');
} elseif ($this->server->has('REQUEST_URI')) {
$requestUri = $this->server->get('REQUEST_URI');
// HTTP proxy reqs setup request uri with scheme and host [and port] + the url path, only use url path
$schemeAndHttpHost = $this->getSchemeAndHttpHost();
if (strpos($requestUri, $schemeAndHttpHost) === 0) {
$requestUri = substr($requestUri, strlen($schemeAndHttpHost));
}
} elseif ($this->server->has('ORIG_PATH_INFO')) {
// IIS 5.0, PHP as CGI
$requestUri = $this->server->get('ORIG_PATH_INFO');
if ('' != $this->server->get('QUERY_STRING')) {
$requestUri .= '?'.$this->server->get('QUERY_STRING');
}
$this->server->remove('ORIG_PATH_INFO');
}
// normalize the request URI to ease creating sub-requests from this request
$this->server->set('REQUEST_URI', $requestUri);
return $requestUri;
}
/**
* Prepares the base URL.
*
* @return string
*/
protected function prepareBaseUrl()
{
$filename = basename($this->server->get('SCRIPT_FILENAME'));
if (basename($this->server->get('SCRIPT_NAME')) === $filename) {
$baseUrl = $this->server->get('SCRIPT_NAME');
} elseif (basename($this->server->get('PHP_SELF')) === $filename) {
$baseUrl = $this->server->get('PHP_SELF');
} elseif (basename($this->server->get('ORIG_SCRIPT_NAME')) === $filename) {
$baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); // 1and1 shared hosting compatibility
} else {
// Backtrack up the script_filename to find the portion matching
// php_self
$path = $this->server->get('PHP_SELF', '');
$file = $this->server->get('SCRIPT_FILENAME', '');
$segs = explode('/', trim($file, '/'));
$segs = array_reverse($segs);
$index = 0;
$last = count($segs);
$baseUrl = '';
do {
$seg = $segs[$index];
$baseUrl = '/'.$seg.$baseUrl;
++$index;
} while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos));
}
// Does the baseUrl have anything in common with the request_uri?
$requestUri = $this->getRequestUri();
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) {
// full $baseUrl matches
return $prefix;
}
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, dirname($baseUrl))) {
// directory portion of $baseUrl matches
return rtrim($prefix, '/');
}
$truncatedRequestUri = $requestUri;
if (($pos = strpos($requestUri, '?')) !== false) {
$truncatedRequestUri = substr($requestUri, 0, $pos);
}
$basename = basename($baseUrl);
if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) {
// no match whatsoever; set it blank
return '';
}
// If using mod_rewrite or ISAPI_Rewrite strip the script filename
// out of baseUrl. $pos !== 0 makes sure it is not matching a value
// from PATH_INFO or QUERY_STRING
if ((strlen($requestUri) >= strlen($baseUrl)) && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) {
$baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl));
}
return rtrim($baseUrl, '/');
}
/**
* Prepares the base path.
*
* @return string base path
*/
protected function prepareBasePath()
{
$filename = basename($this->server->get('SCRIPT_FILENAME'));
$baseUrl = $this->getBaseUrl();
if (empty($baseUrl)) {
return '';
}
if (basename($baseUrl) === $filename) {
$basePath = dirname($baseUrl);
} else {
$basePath = $baseUrl;
}
if ('\\' === DIRECTORY_SEPARATOR) {
$basePath = str_replace('\\', '/', $basePath);
}
return rtrim($basePath, '/');
}
/**
* Prepares the path info.
*
* @return string path info
*/
protected function preparePathInfo()
{
$baseUrl = $this->getBaseUrl();
if (null === ($requestUri = $this->getRequestUri())) {
return '/';
}
$pathInfo = '/';
// Remove the query string from REQUEST_URI
if ($pos = strpos($requestUri, '?')) {
$requestUri = substr($requestUri, 0, $pos);
}
if ((null !== $baseUrl) && (false === ($pathInfo = substr($requestUri, strlen($baseUrl))))) {
// If substr() returns false then PATH_INFO is set to an empty string
return '/';
} elseif (null === $baseUrl) {
return $requestUri;
}
return (string) $pathInfo;
}
/**
* Initializes HTTP request formats.
*/
protected static function initializeFormats()
{
static::$formats = array(
'html' => array('text/html', 'application/xhtml+xml'),
'txt' => array('text/plain'),
'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
'css' => array('text/css'),
'json' => array('application/json', 'application/x-json'),
'xml' => array('text/xml', 'application/xml', 'application/x-xml'),
'rdf' => array('application/rdf+xml'),
'atom' => array('application/atom+xml'),
'rss' => array('application/rss+xml'),
);
}
/**
* Sets the default PHP locale.
*
* @param string $locale
*/
private function setPhpDefaultLocale($locale)
{
// if either the class Locale doesn't exist, or an exception is thrown when
// setting the default locale, the intl module is not installed, and
// the call can be ignored:
try {
if (class_exists('Locale', false)) {
\Locale::setDefault($locale);
}
} catch (\Exception $e) {
}
}
/*
* Returns the prefix as encoded in the string when the string starts with
* the given prefix, false otherwise.
*
* @param string $string The urlencoded string
* @param string $prefix The prefix not encoded
*
* @return string|false The prefix as it is encoded in $string, or false
*/
private function getUrlencodedPrefix($string, $prefix)
{
if (0 !== strpos(rawurldecode($string), $prefix)) {
return false;
}
$len = strlen($prefix);
if (preg_match("#^(%[[:xdigit:]]{2}|.){{$len}}#", $string, $match)) {
return $match[0];
}
return false;
}
}
| clementineG/ReportingTool | vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php | PHP | mit | 51,275 |
!function(t){t.datepick.regional.el={clearText:"Σβήσιμο",clearStatus:"Σβήσιμο της επιλεγμένης ημερομηνίας",closeText:"Κλείσιμο",closeStatus:"Κλείσιμο χωρίς αλλαγή",prevText:"Προηγούμενος",prevStatus:"Επισκόπηση προηγούμενου μήνα",prevBigText:"<<",prevBigStatus:"",nextText:"Επόμενος",nextStatus:"Επισκόπηση επόμενου μήνα",nextBigText:">>",nextBigStatus:"",currentText:"Τρέχων Μήνας",currentStatus:"Επισκόπηση τρέχοντος μήνα",monthNames:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],monthNamesShort:["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],monthStatus:"Επισκόπηση άλλου μήνα",yearStatus:"Επισκόπηση άλλου έτους",weekHeader:"Εβδ",weekStatus:"",dayNames:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],dayNamesShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayNamesMin:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],dayStatus:"Ανάθεση ως πρώτη μέρα της εβδομάδος: DD",dateStatus:"Επιλογή DD d MM",dateFormat:"dd/mm/yy",firstDay:1,initStatus:"Επιλέξτε μια ημερομηνία",isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.datepick.setDefaults(t.datepick.regional.el)}(jQuery);
//# sourceMappingURL=jquery.datepick-el.min.js.map | honestree/cdnjs | ajax/libs/datepick/3.6.0/js/jquery.datepick-el.min.js | JavaScript | mit | 1,775 |
<?php
/**
* JsonViewTest file
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
* @package Cake.Test.Case.View
* @since CakePHP(tm) v 2.1.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('Controller', 'Controller');
App::uses('CakeRequest', 'Network');
App::uses('CakeResponse', 'Network');
App::uses('JsonView', 'View');
/**
* JsonViewTest
*
* @package Cake.Test.Case.View
*/
class JsonViewTest extends CakeTestCase {
public function setUp() {
parent::setUp();
Configure::write('debug', 0);
}
/**
* Generates testRenderWithoutView data.
*
* Note: array($data, $serialize, expected)
*
* @return void
*/
public static function renderWithoutViewProvider() {
return array(
// Test render with a valid string in _serialize.
array(
array('data' => array('user' => 'fake', 'list' => array('item1', 'item2'))),
'data',
json_encode(array('user' => 'fake', 'list' => array('item1', 'item2')))
),
// Test render with a string with an invalid key in _serialize.
array(
array('data' => array('user' => 'fake', 'list' => array('item1', 'item2'))),
'no_key',
json_encode(null)
),
// Test render with a valid array in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
array('no', 'user'),
json_encode(array('no' => 'nope', 'user' => 'fake'))
),
// Test render with an empty array in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
array(),
json_encode(null)
),
// Test render with a valid array with an invalid key in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
array('no', 'user', 'no_key'),
json_encode(array('no' => 'nope', 'user' => 'fake'))
),
// Test render with a valid array with only an invalid key in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
array('no_key'),
json_encode(null)
),
// Test render with Null in _serialize (unset).
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
null,
null
),
// Test render with False in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
false,
json_encode(null)
),
// Test render with True in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
true,
json_encode(null)
),
// Test render with empty string in _serialize.
array(
array('no' => 'nope', 'user' => 'fake', 'list' => array('item1', 'item2')),
'',
json_encode(null)
),
// Test render with a valid array in _serialize and alias.
array(
array('original_name' => 'my epic name', 'user' => 'fake', 'list' => array('item1', 'item2')),
array('new_name' => 'original_name', 'user'),
json_encode(array('new_name' => 'my epic name', 'user' => 'fake'))
),
// Test render with an a valid array in _serialize and alias of a null value.
array(
array('null' => null),
array('null'),
json_encode(array('null' => null))
),
// Test render with a False value to be serialized.
array(
array('false' => false),
'false',
json_encode(false)
),
// Test render with a True value to be serialized.
array(
array('true' => true),
'true',
json_encode(true)
),
// Test render with an empty string value to be serialized.
array(
array('empty' => ''),
'empty',
json_encode('')
),
// Test render with a zero value to be serialized.
array(
array('zero' => 0),
'zero',
json_encode(0)
),
);
}
/**
* Test render with a valid string in _serialize.
*
* @dataProvider renderWithoutViewProvider
* @return void
*/
public function testRenderWithoutView($data, $serialize, $expected) {
$Request = new CakeRequest();
$Response = new CakeResponse();
$Controller = new Controller($Request, $Response);
$Controller->set($data);
$Controller->set('_serialize', $serialize);
$View = new JsonView($Controller);
$output = $View->render(false);
$this->assertSame($expected, $output);
}
/**
* Test that rendering with _serialize does not load helpers.
*
* @return void
*/
public function testRenderSerializeNoHelpers() {
$Request = new CakeRequest();
$Response = new CakeResponse();
$Controller = new Controller($Request, $Response);
$Controller->helpers = array('Html');
$Controller->set(array(
'tags' => array('cakephp', 'framework'),
'_serialize' => 'tags'
));
$View = new JsonView($Controller);
$View->render();
$this->assertFalse(isset($View->Html), 'No helper loaded.');
}
/**
* testJsonpResponse method
*
* @return void
*/
public function testJsonpResponse() {
$Request = new CakeRequest();
$Response = new CakeResponse();
$Controller = new Controller($Request, $Response);
$data = array('user' => 'fake', 'list' => array('item1', 'item2'));
$Controller->set(array(
'data' => $data,
'_serialize' => 'data',
'_jsonp' => true
));
$View = new JsonView($Controller);
$output = $View->render(false);
$this->assertSame(json_encode($data), $output);
$this->assertSame('application/json', $Response->type());
$View->request->query = array('callback' => 'jfunc');
$output = $View->render(false);
$expected = 'jfunc(' . json_encode($data) . ')';
$this->assertSame($expected, $output);
$this->assertSame('application/javascript', $Response->type());
$View->request->query = array('jsonCallback' => 'jfunc');
$View->viewVars['_jsonp'] = 'jsonCallback';
$output = $View->render(false);
$expected = 'jfunc(' . json_encode($data) . ')';
$this->assertSame($expected, $output);
}
/**
* Test render with a View file specified.
*
* @return void
*/
public function testRenderWithView() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
));
$Request = new CakeRequest();
$Response = new CakeResponse();
$Controller = new Controller($Request, $Response);
$Controller->name = $Controller->viewPath = 'Posts';
$data = array(
'User' => array(
'username' => 'fake'
),
'Item' => array(
array('name' => 'item1'),
array('name' => 'item2')
)
);
$Controller->set('user', $data);
$View = new JsonView($Controller);
$output = $View->render('index');
$expected = json_encode(array('user' => 'fake', 'list' => array('item1', 'item2'), 'paging' => null));
$this->assertSame($expected, $output);
$this->assertSame('application/json', $Response->type());
}
/**
* Test render with a View file specified and named parameters.
*
* @return void
*/
public function testRenderWithViewAndNamed() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
));
$Request = new CakeRequest(null, false);
$Request->params['named'] = array('page' => 2);
$Response = new CakeResponse();
$Controller = new Controller($Request, $Response);
$Controller->name = $Controller->viewPath = 'Posts';
$data = array(
'User' => array(
'username' => 'fake'
),
'Item' => array(
array('name' => 'item1'),
array('name' => 'item2')
)
);
$Controller->set('user', $data);
$Controller->helpers = array('Paginator');
$View = new JsonView($Controller);
$output = $View->render('index');
$expected = array('user' => 'fake', 'list' => array('item1', 'item2'), 'paging' => array('page' => 2));
$this->assertSame(json_encode($expected), $output);
$this->assertSame('application/json', $Response->type());
$View->request->query = array('jsonCallback' => 'jfunc');
$Controller->set('_jsonp', 'jsonCallback');
$View = new JsonView($Controller);
$View->helpers = array('Paginator');
$output = $View->render('index');
$expected['paging']['?']['jsonCallback'] = 'jfunc';
$expected = 'jfunc(' . json_encode($expected) . ')';
$this->assertSame($expected, $output);
$this->assertSame('application/javascript', $Response->type());
}
}
| mzkrelx/LearningCakePHP | lib/Cake/Test/Case/View/JsonViewTest.php | PHP | mit | 8,663 |
/*!
strip-json-comments
Strip comments from JSON. Lets you use comments in your JSON files!
https://github.com/sindresorhus/strip-json-comments
by Sindre Sorhus
MIT License
*/
(function () {
'use strict';
function stripJsonComments(str) {
var currentChar;
var nextChar;
var insideString = false;
var insideComment = false;
var ret = '';
for (var i = 0; i < str.length; i++) {
currentChar = str[i];
nextChar = str[i + 1];
if (!insideComment && str[i - 1] !== '\\' && currentChar === '"') {
insideString = !insideString;
}
if (insideString) {
ret += currentChar;
continue;
}
if (!insideComment && currentChar + nextChar === '//') {
insideComment = 'single';
i++;
} else if (insideComment === 'single' && currentChar + nextChar === '\r\n') {
insideComment = false;
i++;
ret += currentChar;
ret += nextChar;
continue;
} else if (insideComment === 'single' && currentChar === '\n') {
insideComment = false;
} else if (!insideComment && currentChar + nextChar === '/*') {
insideComment = 'multi';
i++;
continue;
} else if (insideComment === 'multi' && currentChar + nextChar === '*/') {
insideComment = false;
i++;
continue;
}
if (insideComment) {
continue;
}
ret += currentChar;
}
return ret;
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = stripJsonComments;
} else {
window.stripJsonComments = stripJsonComments;
}
})();
| agreen757/adriangetsawesome | node_modules/grunt-jscs/node_modules/jscs/node_modules/strip-json-comments/strip-json-comments.js | JavaScript | mit | 1,501 |
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 0.9.8
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `cake build`, do not edit it by hand.
((function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if(a.nodeName==="OPTION")return a.text!==""?(b!=null&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},a}(),a.select_to_array=function(b){var c,d,e,f,g;d=new a,g=b.childNodes;for(e=0,f=g.length;e<f;e++)c=g[e],d.add_node(c);return d.parsed},this.SelectParser=a})).call(this),function(){var a,b;b=this,a=function(){function a(a,b){this.form_field=a,this.options=b!=null?b:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.default_text_default=this.is_multiple?"Select Some Options":"Select an Option",this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return a.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.search_contains=this.options.search_contains||!1,this.choices=0,this.results_none_found=this.options.no_results_text||"No results match"},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(a){var b=this;if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)},a.prototype.input_blur=function(a){var b=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return b.blur_test()},100)},a.prototype.result_add_option=function(a){var b,c;return a.disabled?"":(a.dom_id=this.container_id+"_o_"+a.array_index,b=a.selected&&this.is_multiple?[]:["active-result"],a.selected&&b.push("result-selected"),a.group_array_index!=null&&b.push("group-option"),a.classes!==""&&b.push(a.classes),c=a.style.cssText!==""?' style="'+a.style+'"':"",'<li id="'+a.dom_id+'" class="'+b.join(" ")+'"'+c+">"+a.html+"</li>")},a.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},a.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},a}(),b.AbstractChosen=a}.call(this),function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=this,a=jQuery,a.fn.extend({chosen:function(c){return!a.browser.msie||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?a(this).each(function(d){if(!a(this).hasClass("chzn-done"))return new b(this,c)}):this}}),b=function(b){function e(){e.__super__.constructor.apply(this,arguments)}return f(e,b),e.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},e.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},e.prototype.set_up_html=function(){var b,d,e,f;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,b=a("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):b.html('<a href="javascript:void(0)" class="chzn-single chzn-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},e.prototype.register_observers=function(){var a=this;return this.container.mousedown(function(b){return a.container_mousedown(b)}),this.container.mouseup(function(b){return a.container_mouseup(b)}),this.container.mouseenter(function(b){return a.mouse_enter(b)}),this.container.mouseleave(function(b){return a.mouse_leave(b)}),this.search_results.mouseup(function(b){return a.search_results_mouseup(b)}),this.search_results.mouseover(function(b){return a.search_results_mouseover(b)}),this.search_results.mouseout(function(b){return a.search_results_mouseout(b)}),this.form_field_jq.bind("liszt:updated",function(b){return a.results_update_field(b)}),this.search_field.blur(function(b){return a.input_blur(b)}),this.search_field.keyup(function(b){return a.keyup_checker(b)}),this.search_field.keydown(function(b){return a.keydown_checker(b)}),this.is_multiple?(this.search_choices.click(function(b){return a.choices_click(b)}),this.search_field.focus(function(b){return a.input_focus(b)})):this.container.click(function(a){return a.preventDefault()})},e.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},e.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&!this.results_showing&&b.stopPropagation(),!this.pending_destroy_click&&!c?(this.active_field?!this.is_multiple&&b&&(a(b.target)[0]===this.selected_item[0]||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},e.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR")return this.results_reset(a)},e.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},e.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){var a,b,c,e,f;this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.find("span").text(this.default_text),this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),a="",f=this.results_data;for(c=0,e=f.length;c<e;c++)b=f[c],b.group?a+=this.result_add_group(b):b.empty||(a+=this.result_add_option(b),b.selected&&this.is_multiple?this.choice_build(b):b.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(b.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a),this.parsing=!1},e.prototype.result_add_group=function(b){return b.disabled?"":(b.dom_id=this.container_id+"_g_"+b.array_index,'<li id="'+b.dom_id+'" class="group-result">'+a("<div />").text(b.label).html()+"</li>")},e.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},e.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},e.prototype.results_show=function(){var a;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),a=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:a+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},e.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},e.prototype.set_tab_index=function(a){var b;if(this.form_field_jq.attr("tabindex"))return b=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.is_multiple?this.search_field.attr("tabindex",b):(this.selected_item.attr("tabindex",b),this.search_field.attr("tabindex",-1))},e.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},e.prototype.search_results_mouseup=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c.length)return this.result_highlight=c,this.result_select(b)},e.prototype.search_results_mouseover=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c)return this.result_do_highlight(c)},e.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result"))return this.result_clear_highlight()},e.prototype.choices_click=function(b){b.preventDefault();if(this.active_field&&!a(b.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},e.prototype.choice_build=function(b){var c,d,e=this;return c=this.container_id+"_c_"+b.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+c+'"><span>'+b.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+b.array_index+'"></a></li>'),d=a("#"+c).find("a").first(),d.click(function(a){return e.choice_destroy_link_click(a)})},e.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.is_disabled?b.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(a(b.target)))},e.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},e.prototype.results_reset=function(b){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),a(b.target).remove(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},e.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight)return b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b,this.selected_item.removeClass("chzn-default")),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.result_activate=function(a){return a.addClass("active-result")},e.prototype.result_deactivate=function(a){return a.removeClass("active-result")},e.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},e.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;this.no_results_clear(),j=0,k=this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html(),g=this.search_contains?"":"^",f=new RegExp(g+k.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),n=new RegExp(k.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),s=this.results_data;for(o=0,q=s.length;o<q;o++){c=s[o];if(!c.disabled&&!c.empty)if(c.group)a("#"+c.dom_id).css("display","none");else if(!this.is_multiple||!c.selected){b=!1,i=c.dom_id,h=a("#"+i);if(f.test(c.html))b=!0,j+=1;else if(c.html.indexOf(" ")>=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(p=0,r=e.length;p<r;p++)d=e[p],f.test(d)&&(b=!0,j+=1)}b?(k.length?(l=c.html.search(n),m=c.html.substr(0,l+k.length)+"</em>"+c.html.substr(l+k.length),m=m.substr(0,l)+"<em>"+m.substr(l)):m=c.html,h.html(m),this.result_activate(h),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&i===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(h))}}return j<1&&k.length?this.no_results(k):this.winnow_results_set_highlight()},e.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d<e;d++)b=c[d],b=a(b),b.hasClass("group-result")?f.push(b.css("display","auto")):!this.is_multiple||!b.hasClass("result-selected")?f.push(this.result_activate(b)):f.push(void 0);return f},e.prototype.winnow_results_set_highlight=function(){var a,b;if(!this.result_highlight){b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first();if(a!=null)return this.result_do_highlight(a)}},e.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c)},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},e.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},e.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},e.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i<j;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return c=a("<div />",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},e.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},e}(AbstractChosen),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this) | Pranay92/cdnjs | ajax/libs/chosen/0.9.8/chosen.jquery.min.js | JavaScript | mit | 21,601 |
YUI.add('datatype-date-format', function(Y) {
/**
* The DataType Utility provides type-conversion and string-formatting
* convenience methods for various JavaScript object types.
*
* @module datatype
*/
/**
* Date submodule.
*
* @module datatype
* @submodule datatype-date
*/
/**
* Format date submodule implements strftime formatters for javascript based on the
* Open Group specification defined at
* http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
* This implementation does not include modified conversion specifiers (i.e., Ex and Ox)
*
* @module datatype
* @submodule datatype-date-format
*/
/**
* DataType.Date provides a set of utility functions to operate against Date objects.
*
* @class DataType.Date
* @static
*/
/**
* Pad a number with leading spaces, zeroes or something else
* @method xPad
* @param x {Number} The number to be padded
* @param pad {String} The character to pad the number with
* @param r {Number} (optional) The base of the pad, eg, 10 implies to two digits, 100 implies to 3 digits.
* @private
*/
var xPad=function (x, pad, r)
{
if(typeof r === "undefined")
{
r=10;
}
pad = pad.toString();
for( ; parseInt(x, 10)<r && r>1; r/=10) {
x = pad + x;
}
return x.toString();
};
var Dt = {
formats: {
a: function (d, l) { return l.a[d.getDay()]; },
A: function (d, l) { return l.A[d.getDay()]; },
b: function (d, l) { return l.b[d.getMonth()]; },
B: function (d, l) { return l.B[d.getMonth()]; },
C: function (d) { return xPad(parseInt(d.getFullYear()/100, 10), 0); },
d: ["getDate", "0"],
e: ["getDate", " "],
g: function (d) { return xPad(parseInt(Dt.formats.G(d)%100, 10), 0); },
G: function (d) {
var y = d.getFullYear();
var V = parseInt(Dt.formats.V(d), 10);
var W = parseInt(Dt.formats.W(d), 10);
if(W > V) {
y++;
} else if(W===0 && V>=52) {
y--;
}
return y;
},
H: ["getHours", "0"],
I: function (d) { var I=d.getHours()%12; return xPad(I===0?12:I, 0); },
j: function (d) {
var gmd_1 = new Date("" + d.getFullYear() + "/1/1 GMT");
var gmdate = new Date("" + d.getFullYear() + "/" + (d.getMonth()+1) + "/" + d.getDate() + " GMT");
var ms = gmdate - gmd_1;
var doy = parseInt(ms/60000/60/24, 10)+1;
return xPad(doy, 0, 100);
},
k: ["getHours", " "],
l: function (d) { var I=d.getHours()%12; return xPad(I===0?12:I, " "); },
m: function (d) { return xPad(d.getMonth()+1, 0); },
M: ["getMinutes", "0"],
p: function (d, l) { return l.p[d.getHours() >= 12 ? 1 : 0 ]; },
P: function (d, l) { return l.P[d.getHours() >= 12 ? 1 : 0 ]; },
s: function (d, l) { return parseInt(d.getTime()/1000, 10); },
S: ["getSeconds", "0"],
u: function (d) { var dow = d.getDay(); return dow===0?7:dow; },
U: function (d) {
var doy = parseInt(Dt.formats.j(d), 10);
var rdow = 6-d.getDay();
var woy = parseInt((doy+rdow)/7, 10);
return xPad(woy, 0);
},
V: function (d) {
var woy = parseInt(Dt.formats.W(d), 10);
var dow1_1 = (new Date("" + d.getFullYear() + "/1/1")).getDay();
// First week is 01 and not 00 as in the case of %U and %W,
// so we add 1 to the final result except if day 1 of the year
// is a Monday (then %W returns 01).
// We also need to subtract 1 if the day 1 of the year is
// Friday-Sunday, so the resulting equation becomes:
var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);
if(idow === 53 && (new Date("" + d.getFullYear() + "/12/31")).getDay() < 4)
{
idow = 1;
}
else if(idow === 0)
{
idow = Dt.formats.V(new Date("" + (d.getFullYear()-1) + "/12/31"));
}
return xPad(idow, 0);
},
w: "getDay",
W: function (d) {
var doy = parseInt(Dt.formats.j(d), 10);
var rdow = 7-Dt.formats.u(d);
var woy = parseInt((doy+rdow)/7, 10);
return xPad(woy, 0, 10);
},
y: function (d) { return xPad(d.getFullYear()%100, 0); },
Y: "getFullYear",
z: function (d) {
var o = d.getTimezoneOffset();
var H = xPad(parseInt(Math.abs(o/60), 10), 0);
var M = xPad(Math.abs(o%60), 0);
return (o>0?"-":"+") + H + M;
},
Z: function (d) {
var tz = d.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/, "$2").replace(/[a-z ]/g, "");
if(tz.length > 4) {
tz = Dt.formats.z(d);
}
return tz;
},
"%": function (d) { return "%"; }
},
aggregates: {
c: "locale",
D: "%m/%d/%y",
F: "%Y-%m-%d",
h: "%b",
n: "\n",
r: "%I:%M:%S %p",
R: "%H:%M",
t: "\t",
T: "%H:%M:%S",
x: "locale",
X: "locale"
//"+": "%a %b %e %T %Z %Y"
},
/**
* Takes a native JavaScript Date and formats it as a string for display to user.
*
* @for DataType.Date
* @method format
* @param oDate {Date} Date.
* @param oConfig {Object} (Optional) Object literal of configuration values:
* <dl>
* <dt>format {String} (Optional)</dt>
* <dd>
* <p>
* Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at
* <a href="http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html">http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html</a>
* PHP added a few of its own, defined at <a href="http://www.php.net/strftime">http://www.php.net/strftime</a>
* </p>
* <p>
* This javascript implementation supports all the PHP specifiers and a few more. The full list is below.
* </p>
* <p>
* If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d.
* This may be overridden by the deprecated Y.config.dateFormat property.
* </p>
* <dl>
* <dt>%a</dt> <dd>abbreviated weekday name according to the current locale</dd>
* <dt>%A</dt> <dd>full weekday name according to the current locale</dd>
* <dt>%b</dt> <dd>abbreviated month name according to the current locale</dd>
* <dt>%B</dt> <dd>full month name according to the current locale</dd>
* <dt>%c</dt> <dd>preferred date and time representation for the current locale</dd>
* <dt>%C</dt> <dd>century number (the year divided by 100 and truncated to an integer, range 00 to 99)</dd>
* <dt>%d</dt> <dd>day of the month as a decimal number (range 01 to 31)</dd>
* <dt>%D</dt> <dd>same as %m/%d/%y</dd>
* <dt>%e</dt> <dd>day of the month as a decimal number, a single digit is preceded by a space (range " 1" to "31")</dd>
* <dt>%F</dt> <dd>same as %Y-%m-%d (ISO 8601 date format)</dd>
* <dt>%g</dt> <dd>like %G, but without the century</dd>
* <dt>%G</dt> <dd>The 4-digit year corresponding to the ISO week number</dd>
* <dt>%h</dt> <dd>same as %b</dd>
* <dt>%H</dt> <dd>hour as a decimal number using a 24-hour clock (range 00 to 23)</dd>
* <dt>%I</dt> <dd>hour as a decimal number using a 12-hour clock (range 01 to 12)</dd>
* <dt>%j</dt> <dd>day of the year as a decimal number (range 001 to 366)</dd>
* <dt>%k</dt> <dd>hour as a decimal number using a 24-hour clock (range 0 to 23); single digits are preceded by a blank. (See also %H.)</dd>
* <dt>%l</dt> <dd>hour as a decimal number using a 12-hour clock (range 1 to 12); single digits are preceded by a blank. (See also %I.) </dd>
* <dt>%m</dt> <dd>month as a decimal number (range 01 to 12)</dd>
* <dt>%M</dt> <dd>minute as a decimal number</dd>
* <dt>%n</dt> <dd>newline character</dd>
* <dt>%p</dt> <dd>either "AM" or "PM" according to the given time value, or the corresponding strings for the current locale</dd>
* <dt>%P</dt> <dd>like %p, but lower case</dd>
* <dt>%r</dt> <dd>time in a.m. and p.m. notation equal to %I:%M:%S %p</dd>
* <dt>%R</dt> <dd>time in 24 hour notation equal to %H:%M</dd>
* <dt>%s</dt> <dd>number of seconds since the Epoch, ie, since 1970-01-01 00:00:00 UTC</dd>
* <dt>%S</dt> <dd>second as a decimal number</dd>
* <dt>%t</dt> <dd>tab character</dd>
* <dt>%T</dt> <dd>current time, equal to %H:%M:%S</dd>
* <dt>%u</dt> <dd>weekday as a decimal number [1,7], with 1 representing Monday</dd>
* <dt>%U</dt> <dd>week number of the current year as a decimal number, starting with the
* first Sunday as the first day of the first week</dd>
* <dt>%V</dt> <dd>The ISO 8601:1988 week number of the current year as a decimal number,
* range 01 to 53, where week 1 is the first week that has at least 4 days
* in the current year, and with Monday as the first day of the week.</dd>
* <dt>%w</dt> <dd>day of the week as a decimal, Sunday being 0</dd>
* <dt>%W</dt> <dd>week number of the current year as a decimal number, starting with the
* first Monday as the first day of the first week</dd>
* <dt>%x</dt> <dd>preferred date representation for the current locale without the time</dd>
* <dt>%X</dt> <dd>preferred time representation for the current locale without the date</dd>
* <dt>%y</dt> <dd>year as a decimal number without a century (range 00 to 99)</dd>
* <dt>%Y</dt> <dd>year as a decimal number including the century</dd>
* <dt>%z</dt> <dd>numerical time zone representation</dd>
* <dt>%Z</dt> <dd>time zone name or abbreviation</dd>
* <dt>%%</dt> <dd>a literal "%" character</dd>
* </dl>
* </dd>
* <dt>locale {String} (Deprecated, optional)</dt>
* <dd>
* <b>Deprecated - use Y.config.lang instead, which provides access to a much larger set of built-in languages.</b>
* The locale to use when displaying days of week, months of the year, and other locale specific
* strings. If not specified, this defaults to "en" (though this may be overridden by the deprecated Y.config.locale).
* The following locales are built in:
* <dl>
* <dt>en</dt>
* <dd>English</dd>
* <dt>en-US</dt>
* <dd>US English</dd>
* <dt>en-GB</dt>
* <dd>British English</dd>
* <dt>en-AU</dt>
* <dd>Australian English (identical to British English)</dd>
* </dl>
* More locales may be added by subclassing of the deprecated Y.DataType.Date.Locale["en"].
* See Y.DataType.Date.Locale for more information.
* </dd>
* </dl>
* @return {String} Formatted date for display.
*/
format : function (oDate, oConfig) {
oConfig = oConfig || {};
if(!Y.Lang.isDate(oDate)) {
return Y.Lang.isValue(oDate) ? oDate : "";
}
var format, resources, compatMode, sLocale, LOCALE;
// Y.config.dateFormat is deprecated - remove from YUI 3.2
format = oConfig.format || Y.config.dateFormat || "%Y-%m-%d";
// compatMode supports deprecated features - remove from YUI 3.2
compatMode = Y.Lang.isUndefined(Y.config.lang) && (Y.Lang.isValue(oConfig.locale) || Y.Lang.isValue(Y.config.locale));
if (compatMode) {
sLocale = oConfig.locale || Y.config.locale;
LOCALE = Y.DataType.Date.Locale;
sLocale = sLocale.replace(/_/g, "-");
// Make sure we have a definition for the requested locale, or default to en.
if(!LOCALE[sLocale]) {
var tmpLocale = sLocale.replace(/-[a-zA-Z]+$/, "");
if(tmpLocale in LOCALE) {
sLocale = tmpLocale;
} else if(Y.config.locale in LOCALE) {
sLocale = Y.config.locale;
} else {
sLocale = "en";
}
}
resources = LOCALE[sLocale];
} else {
resources = Y.Intl.get('datatype-date-format');
}
var replace_aggs = function (m0, m1) {
if (compatMode && m1 === "r") {
return resources[m1];
}
var f = Dt.aggregates[m1];
return (f === "locale" ? resources[m1] : f);
};
var replace_formats = function (m0, m1) {
var f = Dt.formats[m1];
switch(Y.Lang.type(f)) {
case "string": // string => built in date function
return oDate[f]();
case "function": // function => our own function
return f.call(oDate, oDate, resources);
case "array": // built in function with padding
if(Y.Lang.type(f[0]) === "string") {
return xPad(oDate[f[0]](), f[1]);
} // no break; (fall through to default:)
default:
// Y.config.dateFormat is deprecated - remove from YUI 3.2
return m1;
}
};
// First replace aggregates (run in a loop because an agg may be made up of other aggs)
while(format.match(/%[cDFhnrRtTxX]/)) {
format = format.replace(/%([cDFhnrRtTxX])/g, replace_aggs);
}
// Now replace formats (do not run in a loop otherwise %%a will be replace with the value of %a)
var str = format.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g, replace_formats);
replace_aggs = replace_formats = undefined;
return str;
}
};
Y.mix(Y.namespace("DataType.Date"), Dt);
/**
* @module datatype
*/
/**
* The Date.Locale class is a container for all localised date strings
* used by Y.DataType.Date. It is used internally, but may be extended
* to provide new date localisations.
*
* To create your own Locale, follow these steps:
* <ol>
* <li>Find an existing locale that matches closely with your needs</li>
* <li>Use this as your base class. Use Y.DataType.Date.Locale["en"] if nothing
* matches.</li>
* <li>Create your own class as an extension of the base class using
* Y.merge, and add your own localisations where needed.</li>
* </ol>
* See the Y.DataType.Date.Locale["en-US"] and Y.DataType.Date.Locale["en-GB"]
* classes which extend Y.DataType.Date.Locale["en"].
*
* For example, to implement locales for French french and Canadian french,
* we would do the following:
* <ol>
* <li>For French french, we have no existing similar locale, so use
* Y.DataType.Date.Locale["en"] as the base, and extend it:
* <pre>
* Y.DataType.Date.Locale["fr"] = Y.merge(Y.DataType.Date.Locale, {
* a: ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"],
* A: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
* b: ["jan", "fév", "mar", "avr", "mai", "jun", "jui", "aoû", "sep", "oct", "nov", "déc"],
* B: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
* c: "%a %d %b %Y %T %Z",
* p: ["", ""],
* P: ["", ""],
* x: "%d.%m.%Y",
* X: "%T"
* });
* </pre>
* </li>
* <li>For Canadian french, we start with French french and change the meaning of \%x:
* <pre>
* Y.DataType.Date.Locale["fr-CA"] = Y.merge(Y.DataType.Date.Locale["fr"], {
* x: "%Y-%m-%d"
* });
* </pre>
* </li>
* </ol>
*
* With that, you can use your new locales:
* <pre>
* var d = new Date("2008/04/22");
* Y.DataType.Date.format(d, { format: "%A, %d %B == %x", locale: "fr" });
* </pre>
* will return:
* <pre>
* mardi, 22 avril == 22.04.2008
* </pre>
* And
* <pre>
* Y.DataType.Date.format(d, {format: "%A, %d %B == %x", locale: "fr-CA" });
* </pre>
* Will return:
* <pre>
* mardi, 22 avril == 2008-04-22
* </pre>
* @requires oop
* @class DataType.Date.Locale
* @static
* @deprecated - use Y.config.lang to request one of many built-in languages instead.
*/
var YDateEn = {
a: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
A: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
b: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
B: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
c: "%a %d %b %Y %T %Z",
p: ["AM", "PM"],
P: ["am", "pm"],
r: "%I:%M:%S %p",
x: "%d/%m/%y",
X: "%T"
};
Y.namespace("DataType.Date.Locale");
Y.DataType.Date.Locale["en"] = YDateEn;
Y.DataType.Date.Locale["en-US"] = Y.merge(YDateEn, {
c: "%a %d %b %Y %I:%M:%S %p %Z",
x: "%m/%d/%Y",
X: "%I:%M:%S %p"
});
Y.DataType.Date.Locale["en-GB"] = Y.merge(YDateEn, {
r: "%l:%M:%S %P %Z"
});
Y.DataType.Date.Locale["en-AU"] = Y.merge(YDateEn);
}, '@VERSION@' ,{lang:['ar','ar-JO','ca','ca-ES','da','da-DK','de','de-AT','de-DE','el','el-GR','en','en-AU','en-CA','en-GB','en-IE','en-IN','en-JO','en-MY','en-NZ','en-PH','en-SG','en-US','es','es-AR','es-BO','es-CL','es-CO','es-EC','es-ES','es-MX','es-PE','es-PY','es-US','es-UY','es-VE','fi','fi-FI','fr','fr-BE','fr-CA','fr-FR','hi','hi-IN','id','id-ID','it','it-IT','ja','ja-JP','ko','ko-KR','ms','ms-MY','nb','nb-NO','nl','nl-BE','nl-NL','pl','pl-PL','pt','pt-BR','ro','ro-RO','ru','ru-RU','sv','sv-SE','th','th-TH','tr','tr-TR','vi','vi-VN','zh-Hans','zh-Hans-CN','zh-Hant','zh-Hant-HK','zh-Hant-TW']});
| hanbyul-here/cdnjs | ajax/libs/yui/3.1.0/datatype/datatype-date-format.js | JavaScript | mit | 16,593 |
YUI.add('datatype-date-parse', function(Y) {
/**
* Parse number submodule.
*
* @module datatype
* @submodule datatype-date-parse
* @for DataType.Date
*/
var LANG = Y.Lang;
Y.mix(Y.namespace("DataType.Date"), {
/**
* Converts data to type Date.
*
* @method parse
* @param data {String | Number} Data to convert. Values supported by the Date constructor are supported.
* @return {Date} A Date, or null.
*/
parse: function(data) {
var date = null;
//Convert to date
if(!(LANG.isDate(data))) {
date = new Date(data);
}
else {
return date;
}
// Validate
if(LANG.isDate(date) && (date != "Invalid Date") && !isNaN(date)) { // Workaround for bug 2527965
return date;
}
else {
return null;
}
}
});
// Add Parsers shortcut
Y.namespace("Parsers").date = Y.DataType.Date.parse;
}, '@VERSION@' );
YUI.add('datatype-date-format', function(Y) {
/**
* The DataType Utility provides type-conversion and string-formatting
* convenience methods for various JavaScript object types.
*
* @module datatype
*/
/**
* Date submodule.
*
* @module datatype
* @submodule datatype-date
*/
/**
* Format date submodule implements strftime formatters for javascript based on the
* Open Group specification defined at
* http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
* This implementation does not include modified conversion specifiers (i.e., Ex and Ox)
*
* @module datatype
* @submodule datatype-date-format
*/
/**
* DataType.Date provides a set of utility functions to operate against Date objects.
*
* @class DataType.Date
* @static
*/
/**
* Pad a number with leading spaces, zeroes or something else
* @method xPad
* @param x {Number} The number to be padded
* @param pad {String} The character to pad the number with
* @param r {Number} (optional) The base of the pad, eg, 10 implies to two digits, 100 implies to 3 digits.
* @private
*/
var xPad=function (x, pad, r)
{
if(typeof r === "undefined")
{
r=10;
}
pad = pad.toString();
for( ; parseInt(x, 10)<r && r>1; r/=10) {
x = pad + x;
}
return x.toString();
};
var Dt = {
formats: {
a: function (d, l) { return l.a[d.getDay()]; },
A: function (d, l) { return l.A[d.getDay()]; },
b: function (d, l) { return l.b[d.getMonth()]; },
B: function (d, l) { return l.B[d.getMonth()]; },
C: function (d) { return xPad(parseInt(d.getFullYear()/100, 10), 0); },
d: ["getDate", "0"],
e: ["getDate", " "],
g: function (d) { return xPad(parseInt(Dt.formats.G(d)%100, 10), 0); },
G: function (d) {
var y = d.getFullYear();
var V = parseInt(Dt.formats.V(d), 10);
var W = parseInt(Dt.formats.W(d), 10);
if(W > V) {
y++;
} else if(W===0 && V>=52) {
y--;
}
return y;
},
H: ["getHours", "0"],
I: function (d) { var I=d.getHours()%12; return xPad(I===0?12:I, 0); },
j: function (d) {
var gmd_1 = new Date("" + d.getFullYear() + "/1/1 GMT");
var gmdate = new Date("" + d.getFullYear() + "/" + (d.getMonth()+1) + "/" + d.getDate() + " GMT");
var ms = gmdate - gmd_1;
var doy = parseInt(ms/60000/60/24, 10)+1;
return xPad(doy, 0, 100);
},
k: ["getHours", " "],
l: function (d) { var I=d.getHours()%12; return xPad(I===0?12:I, " "); },
m: function (d) { return xPad(d.getMonth()+1, 0); },
M: ["getMinutes", "0"],
p: function (d, l) { return l.p[d.getHours() >= 12 ? 1 : 0 ]; },
P: function (d, l) { return l.P[d.getHours() >= 12 ? 1 : 0 ]; },
s: function (d, l) { return parseInt(d.getTime()/1000, 10); },
S: ["getSeconds", "0"],
u: function (d) { var dow = d.getDay(); return dow===0?7:dow; },
U: function (d) {
var doy = parseInt(Dt.formats.j(d), 10);
var rdow = 6-d.getDay();
var woy = parseInt((doy+rdow)/7, 10);
return xPad(woy, 0);
},
V: function (d) {
var woy = parseInt(Dt.formats.W(d), 10);
var dow1_1 = (new Date("" + d.getFullYear() + "/1/1")).getDay();
// First week is 01 and not 00 as in the case of %U and %W,
// so we add 1 to the final result except if day 1 of the year
// is a Monday (then %W returns 01).
// We also need to subtract 1 if the day 1 of the year is
// Friday-Sunday, so the resulting equation becomes:
var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);
if(idow === 53 && (new Date("" + d.getFullYear() + "/12/31")).getDay() < 4)
{
idow = 1;
}
else if(idow === 0)
{
idow = Dt.formats.V(new Date("" + (d.getFullYear()-1) + "/12/31"));
}
return xPad(idow, 0);
},
w: "getDay",
W: function (d) {
var doy = parseInt(Dt.formats.j(d), 10);
var rdow = 7-Dt.formats.u(d);
var woy = parseInt((doy+rdow)/7, 10);
return xPad(woy, 0, 10);
},
y: function (d) { return xPad(d.getFullYear()%100, 0); },
Y: "getFullYear",
z: function (d) {
var o = d.getTimezoneOffset();
var H = xPad(parseInt(Math.abs(o/60), 10), 0);
var M = xPad(Math.abs(o%60), 0);
return (o>0?"-":"+") + H + M;
},
Z: function (d) {
var tz = d.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/, "$2").replace(/[a-z ]/g, "");
if(tz.length > 4) {
tz = Dt.formats.z(d);
}
return tz;
},
"%": function (d) { return "%"; }
},
aggregates: {
c: "locale",
D: "%m/%d/%y",
F: "%Y-%m-%d",
h: "%b",
n: "\n",
r: "%I:%M:%S %p",
R: "%H:%M",
t: "\t",
T: "%H:%M:%S",
x: "locale",
X: "locale"
//"+": "%a %b %e %T %Z %Y"
},
/**
* Takes a native JavaScript Date and formats it as a string for display to user.
*
* @for DataType.Date
* @method format
* @param oDate {Date} Date.
* @param oConfig {Object} (Optional) Object literal of configuration values:
* <dl>
* <dt>format {String} (Optional)</dt>
* <dd>
* <p>
* Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at
* <a href="http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html">http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html</a>
* PHP added a few of its own, defined at <a href="http://www.php.net/strftime">http://www.php.net/strftime</a>
* </p>
* <p>
* This javascript implementation supports all the PHP specifiers and a few more. The full list is below.
* </p>
* <p>
* If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d.
* This may be overridden by the deprecated Y.config.dateFormat property.
* </p>
* <dl>
* <dt>%a</dt> <dd>abbreviated weekday name according to the current locale</dd>
* <dt>%A</dt> <dd>full weekday name according to the current locale</dd>
* <dt>%b</dt> <dd>abbreviated month name according to the current locale</dd>
* <dt>%B</dt> <dd>full month name according to the current locale</dd>
* <dt>%c</dt> <dd>preferred date and time representation for the current locale</dd>
* <dt>%C</dt> <dd>century number (the year divided by 100 and truncated to an integer, range 00 to 99)</dd>
* <dt>%d</dt> <dd>day of the month as a decimal number (range 01 to 31)</dd>
* <dt>%D</dt> <dd>same as %m/%d/%y</dd>
* <dt>%e</dt> <dd>day of the month as a decimal number, a single digit is preceded by a space (range " 1" to "31")</dd>
* <dt>%F</dt> <dd>same as %Y-%m-%d (ISO 8601 date format)</dd>
* <dt>%g</dt> <dd>like %G, but without the century</dd>
* <dt>%G</dt> <dd>The 4-digit year corresponding to the ISO week number</dd>
* <dt>%h</dt> <dd>same as %b</dd>
* <dt>%H</dt> <dd>hour as a decimal number using a 24-hour clock (range 00 to 23)</dd>
* <dt>%I</dt> <dd>hour as a decimal number using a 12-hour clock (range 01 to 12)</dd>
* <dt>%j</dt> <dd>day of the year as a decimal number (range 001 to 366)</dd>
* <dt>%k</dt> <dd>hour as a decimal number using a 24-hour clock (range 0 to 23); single digits are preceded by a blank. (See also %H.)</dd>
* <dt>%l</dt> <dd>hour as a decimal number using a 12-hour clock (range 1 to 12); single digits are preceded by a blank. (See also %I.) </dd>
* <dt>%m</dt> <dd>month as a decimal number (range 01 to 12)</dd>
* <dt>%M</dt> <dd>minute as a decimal number</dd>
* <dt>%n</dt> <dd>newline character</dd>
* <dt>%p</dt> <dd>either "AM" or "PM" according to the given time value, or the corresponding strings for the current locale</dd>
* <dt>%P</dt> <dd>like %p, but lower case</dd>
* <dt>%r</dt> <dd>time in a.m. and p.m. notation equal to %I:%M:%S %p</dd>
* <dt>%R</dt> <dd>time in 24 hour notation equal to %H:%M</dd>
* <dt>%s</dt> <dd>number of seconds since the Epoch, ie, since 1970-01-01 00:00:00 UTC</dd>
* <dt>%S</dt> <dd>second as a decimal number</dd>
* <dt>%t</dt> <dd>tab character</dd>
* <dt>%T</dt> <dd>current time, equal to %H:%M:%S</dd>
* <dt>%u</dt> <dd>weekday as a decimal number [1,7], with 1 representing Monday</dd>
* <dt>%U</dt> <dd>week number of the current year as a decimal number, starting with the
* first Sunday as the first day of the first week</dd>
* <dt>%V</dt> <dd>The ISO 8601:1988 week number of the current year as a decimal number,
* range 01 to 53, where week 1 is the first week that has at least 4 days
* in the current year, and with Monday as the first day of the week.</dd>
* <dt>%w</dt> <dd>day of the week as a decimal, Sunday being 0</dd>
* <dt>%W</dt> <dd>week number of the current year as a decimal number, starting with the
* first Monday as the first day of the first week</dd>
* <dt>%x</dt> <dd>preferred date representation for the current locale without the time</dd>
* <dt>%X</dt> <dd>preferred time representation for the current locale without the date</dd>
* <dt>%y</dt> <dd>year as a decimal number without a century (range 00 to 99)</dd>
* <dt>%Y</dt> <dd>year as a decimal number including the century</dd>
* <dt>%z</dt> <dd>numerical time zone representation</dd>
* <dt>%Z</dt> <dd>time zone name or abbreviation</dd>
* <dt>%%</dt> <dd>a literal "%" character</dd>
* </dl>
* </dd>
* <dt>locale {String} (Deprecated, optional)</dt>
* <dd>
* <b>Deprecated - use Y.config.lang instead, which provides access to a much larger set of built-in languages.</b>
* The locale to use when displaying days of week, months of the year, and other locale specific
* strings. If not specified, this defaults to "en" (though this may be overridden by the deprecated Y.config.locale).
* The following locales are built in:
* <dl>
* <dt>en</dt>
* <dd>English</dd>
* <dt>en-US</dt>
* <dd>US English</dd>
* <dt>en-GB</dt>
* <dd>British English</dd>
* <dt>en-AU</dt>
* <dd>Australian English (identical to British English)</dd>
* </dl>
* More locales may be added by subclassing of the deprecated Y.DataType.Date.Locale["en"].
* See Y.DataType.Date.Locale for more information.
* </dd>
* </dl>
* @return {String} Formatted date for display.
*/
format : function (oDate, oConfig) {
oConfig = oConfig || {};
if(!Y.Lang.isDate(oDate)) {
return Y.Lang.isValue(oDate) ? oDate : "";
}
var format, resources, compatMode, sLocale, LOCALE;
// Y.config.dateFormat is deprecated - remove from YUI 3.2
format = oConfig.format || Y.config.dateFormat || "%Y-%m-%d";
// compatMode supports deprecated features - remove from YUI 3.2
compatMode = Y.Lang.isUndefined(Y.config.lang) && (Y.Lang.isValue(oConfig.locale) || Y.Lang.isValue(Y.config.locale));
if (compatMode) {
sLocale = oConfig.locale || Y.config.locale;
LOCALE = Y.DataType.Date.Locale;
sLocale = sLocale.replace(/_/g, "-");
// Make sure we have a definition for the requested locale, or default to en.
if(!LOCALE[sLocale]) {
var tmpLocale = sLocale.replace(/-[a-zA-Z]+$/, "");
if(tmpLocale in LOCALE) {
sLocale = tmpLocale;
} else if(Y.config.locale in LOCALE) {
sLocale = Y.config.locale;
} else {
sLocale = "en";
}
}
resources = LOCALE[sLocale];
} else {
resources = Y.Intl.get('datatype-date-format');
}
var replace_aggs = function (m0, m1) {
if (compatMode && m1 === "r") {
return resources[m1];
}
var f = Dt.aggregates[m1];
return (f === "locale" ? resources[m1] : f);
};
var replace_formats = function (m0, m1) {
var f = Dt.formats[m1];
switch(Y.Lang.type(f)) {
case "string": // string => built in date function
return oDate[f]();
case "function": // function => our own function
return f.call(oDate, oDate, resources);
case "array": // built in function with padding
if(Y.Lang.type(f[0]) === "string") {
return xPad(oDate[f[0]](), f[1]);
} // no break; (fall through to default:)
default:
// Y.config.dateFormat is deprecated - remove from YUI 3.2
return m1;
}
};
// First replace aggregates (run in a loop because an agg may be made up of other aggs)
while(format.match(/%[cDFhnrRtTxX]/)) {
format = format.replace(/%([cDFhnrRtTxX])/g, replace_aggs);
}
// Now replace formats (do not run in a loop otherwise %%a will be replace with the value of %a)
var str = format.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g, replace_formats);
replace_aggs = replace_formats = undefined;
return str;
}
};
Y.mix(Y.namespace("DataType.Date"), Dt);
/**
* @module datatype
*/
/**
* The Date.Locale class is a container for all localised date strings
* used by Y.DataType.Date. It is used internally, but may be extended
* to provide new date localisations.
*
* To create your own Locale, follow these steps:
* <ol>
* <li>Find an existing locale that matches closely with your needs</li>
* <li>Use this as your base class. Use Y.DataType.Date.Locale["en"] if nothing
* matches.</li>
* <li>Create your own class as an extension of the base class using
* Y.merge, and add your own localisations where needed.</li>
* </ol>
* See the Y.DataType.Date.Locale["en-US"] and Y.DataType.Date.Locale["en-GB"]
* classes which extend Y.DataType.Date.Locale["en"].
*
* For example, to implement locales for French french and Canadian french,
* we would do the following:
* <ol>
* <li>For French french, we have no existing similar locale, so use
* Y.DataType.Date.Locale["en"] as the base, and extend it:
* <pre>
* Y.DataType.Date.Locale["fr"] = Y.merge(Y.DataType.Date.Locale, {
* a: ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"],
* A: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
* b: ["jan", "fév", "mar", "avr", "mai", "jun", "jui", "aoû", "sep", "oct", "nov", "déc"],
* B: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
* c: "%a %d %b %Y %T %Z",
* p: ["", ""],
* P: ["", ""],
* x: "%d.%m.%Y",
* X: "%T"
* });
* </pre>
* </li>
* <li>For Canadian french, we start with French french and change the meaning of \%x:
* <pre>
* Y.DataType.Date.Locale["fr-CA"] = Y.merge(Y.DataType.Date.Locale["fr"], {
* x: "%Y-%m-%d"
* });
* </pre>
* </li>
* </ol>
*
* With that, you can use your new locales:
* <pre>
* var d = new Date("2008/04/22");
* Y.DataType.Date.format(d, { format: "%A, %d %B == %x", locale: "fr" });
* </pre>
* will return:
* <pre>
* mardi, 22 avril == 22.04.2008
* </pre>
* And
* <pre>
* Y.DataType.Date.format(d, {format: "%A, %d %B == %x", locale: "fr-CA" });
* </pre>
* Will return:
* <pre>
* mardi, 22 avril == 2008-04-22
* </pre>
* @requires oop
* @class DataType.Date.Locale
* @static
* @deprecated - use Y.config.lang to request one of many built-in languages instead.
*/
var YDateEn = {
a: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
A: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
b: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
B: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
c: "%a %d %b %Y %T %Z",
p: ["AM", "PM"],
P: ["am", "pm"],
r: "%I:%M:%S %p",
x: "%d/%m/%y",
X: "%T"
};
Y.namespace("DataType.Date.Locale");
Y.DataType.Date.Locale["en"] = YDateEn;
Y.DataType.Date.Locale["en-US"] = Y.merge(YDateEn, {
c: "%a %d %b %Y %I:%M:%S %p %Z",
x: "%m/%d/%Y",
X: "%I:%M:%S %p"
});
Y.DataType.Date.Locale["en-GB"] = Y.merge(YDateEn, {
r: "%l:%M:%S %P %Z"
});
Y.DataType.Date.Locale["en-AU"] = Y.merge(YDateEn);
}, '@VERSION@' ,{lang:['ar','ar-JO','ca','ca-ES','da','da-DK','de','de-AT','de-DE','el','el-GR','en','en-AU','en-CA','en-GB','en-IE','en-IN','en-JO','en-MY','en-NZ','en-PH','en-SG','en-US','es','es-AR','es-BO','es-CL','es-CO','es-EC','es-ES','es-MX','es-PE','es-PY','es-US','es-UY','es-VE','fi','fi-FI','fr','fr-BE','fr-CA','fr-FR','hi','hi-IN','id','id-ID','it','it-IT','ja','ja-JP','ko','ko-KR','ms','ms-MY','nb','nb-NO','nl','nl-BE','nl-NL','pl','pl-PL','pt','pt-BR','ro','ro-RO','ru','ru-RU','sv','sv-SE','th','th-TH','tr','tr-TR','vi','vi-VN','zh-Hans','zh-Hans-CN','zh-Hant','zh-Hant-HK','zh-Hant-TW']});
YUI.add('datatype-date', function(Y){}, '@VERSION@' ,{use:['datatype-date-parse', 'datatype-date-format']});
| thetable/cdnjs | ajax/libs/yui/3.1.2/datatype/datatype-date.js | JavaScript | mit | 17,681 |
var createAggregator = require('../internal/createAggregator');
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` through `iteratee`. The corresponding value
* of each key is the last element responsible for generating the key. The
* iteratee function is bound to `thisArg` and invoked with three arguments:
* (value, index|key, collection).
*
* If a property name is provided for `iteratee` the created `_.property`
* style callback returns the property value of the given element.
*
* If a value is also provided for `thisArg` the created `_.matchesProperty`
* style callback returns `true` for elements that have a matching property
* value, else `false`.
*
* If an object is provided for `iteratee` the created `_.matches` style
* callback returns `true` for elements that have the properties of the given
* object, else `false`.
*
* @static
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function|Object|string} [iteratee=_.identity] The function invoked
* per iteration.
* @param {*} [thisArg] The `this` binding of `iteratee`.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* var keyData = [
* { 'dir': 'left', 'code': 97 },
* { 'dir': 'right', 'code': 100 }
* ];
*
* _.indexBy(keyData, 'dir');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*
* _.indexBy(keyData, function(object) {
* return String.fromCharCode(object.code);
* });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.indexBy(keyData, function(object) {
* return this.fromCharCode(object.code);
* }, String);
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*/
var indexBy = createAggregator(function(result, value, key) {
result[key] = value;
});
module.exports = indexBy;
| diegojromerolopez/djanban | src/djanban/static/angularapps/taskboard/node_modules/easy-extender/node_modules/lodash/collection/indexBy.js | JavaScript | mit | 1,985 |
var createAggregator = require('../internal/createAggregator');
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` through `iteratee`. The corresponding value
* of each key is the last element responsible for generating the key. The
* iteratee function is bound to `thisArg` and invoked with three arguments:
* (value, index|key, collection).
*
* If a property name is provided for `iteratee` the created `_.property`
* style callback returns the property value of the given element.
*
* If a value is also provided for `thisArg` the created `_.matchesProperty`
* style callback returns `true` for elements that have a matching property
* value, else `false`.
*
* If an object is provided for `iteratee` the created `_.matches` style
* callback returns `true` for elements that have the properties of the given
* object, else `false`.
*
* @static
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function|Object|string} [iteratee=_.identity] The function invoked
* per iteration.
* @param {*} [thisArg] The `this` binding of `iteratee`.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* var keyData = [
* { 'dir': 'left', 'code': 97 },
* { 'dir': 'right', 'code': 100 }
* ];
*
* _.indexBy(keyData, 'dir');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*
* _.indexBy(keyData, function(object) {
* return String.fromCharCode(object.code);
* });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.indexBy(keyData, function(object) {
* return this.fromCharCode(object.code);
* }, String);
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*/
var indexBy = createAggregator(function(result, value, key) {
result[key] = value;
});
module.exports = indexBy;
| joseluisluri/nand.me-viewer | node_modules/easy-extender/node_modules/lodash/collection/indexBy.js | JavaScript | mit | 1,985 |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"MONTH": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"SHORTDAY": [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
],
"SHORTMONTH": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"fullDate": "EEEE, d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y HH:mm:ss",
"mediumDate": "d MMM y",
"mediumTime": "HH:mm:ss",
"short": "dd/MM/yyyy HH:mm",
"shortDate": "dd/MM/yyyy",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u00a3",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"macFrac": 0,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"macFrac": 0,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4-",
"negSuf": "",
"posPre": "\u00a4",
"posSuf": ""
}
]
},
"id": "en-gb",
"pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]); | freak3dot/cdnjs | ajax/libs/angular-i18n/1.2.18/angular-locale_en-gb.js | JavaScript | mit | 1,919 |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"MONTH": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"SHORTDAY": [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
],
"SHORTMONTH": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"fullDate": "EEEE, d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y HH:mm:ss",
"mediumDate": "d MMM y",
"mediumTime": "HH:mm:ss",
"short": "dd/MM/yyyy HH:mm",
"shortDate": "dd/MM/yyyy",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u00a3",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"macFrac": 0,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"macFrac": 0,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4-",
"negSuf": "",
"posPre": "\u00a4",
"posSuf": ""
}
]
},
"id": "en-gb",
"pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]); | nolsherry/cdnjs | ajax/libs/angular.js/1.2.17/i18n/angular-locale_en-gb.js | JavaScript | mit | 1,919 |
/*!
* MiniCart
*
* @author Jeff Harrell <https://github.com/jeffharrell/>
* @license MIT <https://github.com/jeffharrell/MiniCart/blob/master/LICENSE>
*/
if (typeof PAYPAL === 'undefined' || !PAYPAL) {
var PAYPAL = {};
}
PAYPAL.apps = PAYPAL.apps || {};
(function () {
'use strict';
/**
* Default configuration
*/
var config = {
/**
* The parent element the cart should "pin" to
*/
parent: document.body,
/**
* Edge of the window to pin the cart to
*/
displayEdge: 'right',
/**
* Distance from the edge of the window
*/
edgeDistance: '50px',
/**
* HTML target property for the checkout form
*/
formTarget: null,
/**
* The base path of your website to set the cookie to
*/
cookiePath: '/',
/**
* The number of days to keep the cart data
*/
cartDuration: 30,
/**
* Strings used for display text
*/
strings: {
button: 'Checkout',
subtotal: 'Subtotal: ',
discount: 'Discount: ',
shipping: 'does not include shipping & tax',
processing: 'Processing...'
},
/**
* Unique ID used on the wrapper element
*/
name: 'PPMiniCart',
/**
* Boolean to determine if the cart should "peek" when it's hidden with items
*/
peekEnabled: true,
/**
* The URL of the PayPal website
*/
paypalURL: 'https://www.paypal.com/cgi-bin/webscr',
/**
* The base URL to the visual assets
*/
assetURL: 'http://www.minicartjs.com/build/',
/**
* Boolean to determine if the cart should be reset on payment completion
*/
resetCartOnSuccess: true,
/**
* Life-cycle events
*/
events: {
/**
* Custom event fired before the cart is rendered
*/
onRender: null,
/**
* Custom event fired after the cart is rendered
*/
afterRender: null,
/**
* Custom event fired before the cart is hidden
*
* @param e {event} The triggering event
*/
onHide: null,
/**
* Custom event fired after the cart is hidden
*
* @param e {event} The triggering event
*/
afterHide: null,
/**
* Custom event fired before the cart is shown
*
* @param e {event} The triggering event
*/
onShow: null,
/**
* Custom event fired after the cart is shown
*
* @param e {event} The triggering event
*/
afterShow: null,
/**
* Custom event fired before a product is added to the cart
*
* @param data {object} Product object
*/
onAddToCart: null,
/**
* Custom event fired after a product is added to the cart
*
* @param data {object} Product object
*/
afterAddToCart: null,
/**
* Custom event fired before a product is removed from the cart
*
* @param data {object} Product object
*/
onRemoveFromCart: null,
/**
* Custom event fired after a product is removed from the cart
*
* @param data {object} Product object
*/
afterRemoveFromCart: null,
/**
* Custom event fired before the checkout action takes place
*
* @param e {event} The triggering event
*/
onCheckout: null,
/**
* Custom event fired before the cart is reset
*/
onReset: null,
/**
* Custom event fired after the cart is reset
*/
afterReset: null
}
};
if (!PAYPAL.apps.MiniCart) {
/**
* Mini Cart application
*/
PAYPAL.apps.MiniCart = (function () {
var minicart = {},
isShowing = false,
isRendered = false;
/** PRIVATE **/
/**
* PayPal form cmd values which are supported
*/
var SUPPORTED_CMDS = { _cart: true, _xclick: true };
/**
* The form origin that is passed to PayPal
*/
var BN_VALUE = 'MiniCart_AddToCart_WPS_US';
/**
* Regex filter for cart settings, which appear only once in a cart
*/
var SETTING_FILTER = /^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/;
/**
* Adds the cart's CSS to the page in a <style> element.
* The CSS lives in this file so that it can leverage properties from the config
* and doesn't require an additional download. To override the CSS see the FAQ.
*/
var _addCSS = function () {
var name = config.name,
css = [],
style, head;
css.push('#' + name + ' form { position:fixed; float:none; top:-250px; ' + config.displayEdge + ':' + config.edgeDistance + '; width:265px; margin:0; padding:50px 10px 0; min-height:170px; background:#fff url(' + config.assetURL + 'images/minicart_sprite.png) no-repeat -125px -60px; border:1px solid #999; border-top:0; font:13px/normal arial, helvetica; color:#333; text-align:left; -moz-border-radius:0 0 8px 8px; -webkit-border-radius:0 0 8px 8px; border-radius:0 0 8px 8px; -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); } ');
css.push('#' + name + ' ul { position:relative; overflow-x:hidden; overflow-y:auto; height:130px; margin:0 0 7px; padding:0; list-style-type:none; border-top:1px solid #ccc; border-bottom:1px solid #ccc; } ');
css.push('#' + name + ' li { position:relative; margin:-1px 0 0; padding:6px 5px 6px 0; border-top:1px solid #f2f2f2; } ');
css.push('#' + name + ' li a { display: block; width: 155px; color:#333; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } ');
css.push('#' + name + ' li a span { display:block; color:#999; font-size:10px; } ');
css.push('#' + name + ' li .quantity { position:absolute; top:.5em; right:78px; width:22px; padding:1px; border:1px solid #83a8cc; text-align:right; } ');
css.push('#' + name + ' li .price { position:absolute; top:.5em; right:4px; } ');
css.push('#' + name + ' li .remove { position:absolute; top:9px; right:60px; width:14px; height:14px; background:url(' + config.assetURL + 'images/minicart_sprite.png) no-repeat -134px -4px; border:0; cursor:pointer; } ');
css.push('#' + name + ' p { margin:0; padding:0 0 0 20px; background:url(' + config.assetURL + 'images/minicart_sprite.png) no-repeat; font-size:13px; font-weight:bold; } ');
css.push('#' + name + ' p:hover { cursor:pointer; } ');
css.push('#' + name + ' p input { float:right; margin:4px 0 0; padding:1px 4px; text-decoration:none; font-weight:normal; color:#333; background:#ffa822 url(' + config.assetURL + 'images/minicart_sprite.png) repeat-x left center; border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } ');
css.push('#' + name + ' p .shipping { display:block; font-size:10px; font-weight:normal; color:#999; } ');
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet) {
style.styleSheet.cssText = css.join('');
} else {
style.appendChild(document.createTextNode(css.join('')));
}
head = document.getElementsByTagName('head')[0];
head.appendChild(style);
};
/**
* Builds the DOM elements required by the cart
*/
var _buildDOM = function () {
var UI = minicart.UI,
cmd, type, bn, parent, version;
UI.wrapper = document.createElement('div');
UI.wrapper.id = config.name;
cmd = document.createElement('input');
cmd.type = 'hidden';
cmd.name = 'cmd';
cmd.value = '_cart';
type = cmd.cloneNode(false);
type.name = 'upload';
type.value = '1';
bn = cmd.cloneNode(false);
bn.name = 'bn';
bn.value = BN_VALUE;
UI.cart = document.createElement('form');
UI.cart.method = 'post';
UI.cart.action = config.paypalURL;
if (config.formTarget) {
UI.cart.target = config.formTarget;
}
UI.cart.appendChild(cmd);
UI.cart.appendChild(type);
UI.cart.appendChild(bn);
UI.wrapper.appendChild(UI.cart);
UI.itemList = document.createElement('ul');
UI.cart.appendChild(UI.itemList);
UI.summary = document.createElement('p');
UI.cart.appendChild(UI.summary);
UI.button = document.createElement('input');
UI.button.type = 'submit';
UI.button.value = config.strings.button;
UI.summary.appendChild(UI.button);
UI.subtotal = document.createElement('span');
$.util.setText(UI.subtotal, config.strings.subtotal);
UI.subtotalAmount = document.createElement('span');
$.util.setText(UI.subtotalAmount, '0.00');
UI.subtotal.appendChild(UI.subtotalAmount);
UI.summary.appendChild(UI.subtotal);
UI.shipping = document.createElement('span');
UI.shipping.className = 'shipping';
$.util.setText(UI.shipping, config.strings.shipping);
UI.summary.appendChild(UI.shipping);
// Workaround: IE 6 and IE 7/8 in quirks mode do not support position: fixed in CSS
if (window.attachEvent && !window.opera) {
version = navigator.userAgent.match(/MSIE\s([^;]*)/);
if (version) {
version = parseFloat(version[1]);
if (version < 7 || (version >= 7 && document.compatMode === 'BackCompat')) {
UI.cart.style.position = 'absolute';
UI.wrapper.style[config.displayEdge] = '0';
UI.wrapper.style.setExpression('top', 'x = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop');
}
}
}
parent = (typeof config.parent === 'string') ? document.getElementById(config.parent) : config.parent;
parent.appendChild(UI.wrapper);
};
/**
* Attaches the cart events to it's DOM elements
*/
var _bindEvents = function () {
var ui = minicart.UI,
forms, form, i;
// Look for all "Cart" and "Buy Now" forms on the page and attach events
forms = document.getElementsByTagName('form');
for (i = 0; i < forms.length; i++) {
form = forms[i];
if (form.cmd && SUPPORTED_CMDS[form.cmd.value]) {
minicart.bindForm(form);
}
}
// Hide the Mini Cart for all non-cart related clicks
$.event.add(document, 'click', function (e) {
if (isShowing) {
var target = e.target,
cartEl = ui.cart;
if (!(/input|button|select|option/i.test(target.tagName))) {
while (target.nodeType === 1) {
if (target === cartEl) {
return;
}
target = target.parentNode;
}
minicart.hide(null);
}
}
});
// Run the checkout code when submitting the form
$.event.add(ui.cart, 'submit', function (e) {
_checkout(e);
});
// Show the cart when clicking on the summary
$.event.add(ui.summary, 'click', function (e) {
var target = e.target;
if (target !== ui.button) {
minicart.toggle(e);
}
});
// Redraw the cart if the back/forward cache doesn't re-render
$.event.add(window, 'pageshow', function (e) {
if (e.persisted) {
_redrawCartItems(true);
minicart.hide();
}
});
};
/**
* Parses the userConfig (if applicable) and overwrites the default values
*/
var _parseUserConfig = function (userConfig) {
var key;
// TODO: This should recursively merge the config values
for (key in userConfig) {
if (typeof config[key] !== undefined) {
config[key] = userConfig[key];
}
}
};
/**
* Loads the stored data and builds the cart
*/
var _parseStorage = function () {
var data, length, i;
if ((data = $.storage.load())) {
length = data.length;
for (i = 0; i < length; i++) {
if (_renderProduct(data[i])) {
isShowing = true;
}
}
}
};
/**
* Data parser used for forms
*
* @param form {HTMLElement} An HTML form
* @return {object}
*/
var _parseForm = function (form) {
var raw = form.elements,
data = {},
pair, value, i, len;
for (i = 0, len = raw.length; i < len; i++) {
pair = raw[i];
if ((value = $.util.getInputValue(pair))) {
data[pair.name] = value;
}
}
return data;
};
/**
* Massage's a object's data in preparation for adding it to the user's cart
*
* @param data {object} An object of WPS xclick style data to add to the cart. The format is { product: '', settings: '' }.
* @return {object}
*/
var _parseData = function (data) {
var product = {},
settings = {},
existing, option_index, key, len, match, i, j;
// Parse the data into a two categories: product and settings
for (key in data) {
if (SETTING_FILTER.test(key)) {
settings[key] = data[key];
} else {
product[key] = data[key];
}
}
// Check the products to see if this variation already exists
// If it does then reuse the same object
for (i = 0, len = minicart.products.length; i < len; i++) {
existing = minicart.products[i].product;
// Do the product name and number match
if (product.item_name === existing.item_name && product.item_number === existing.item_number) {
// Products are a match so far; Now do all of the products options match?
match = true;
j = 0;
while (existing['os' + j]) {
if (product['os' + j] !== existing['os' + j]) {
match = false;
break;
}
j++;
}
if (match) {
product.offset = existing.offset;
break;
}
}
}
// Normalize the values
product.href = product.href || window.location.href;
product.quantity = product.quantity || 1;
product.amount = product.amount || 0;
// Add Mini Cart specific settings
if (config.resetCartOnSuccess && settings['return'] && settings['return'].indexOf('#') === -1) {
settings['return'] += '#' + config.name + '=reset';
}
// Add option amounts to the total amount
option_index = (product.option_index) ? product.option_index : 0;
while (product['os' + option_index]) {
i = 0;
while (typeof product['option_select' + i] !== 'undefined') {
if (product['option_select' + i] === product['os' + option_index]) {
product.amount = product.amount + parseFloat(product['option_amount' + i]);
break;
}
i++;
}
option_index++;
}
return {
product: product,
settings: settings
};
};
/**
* Resets the cart and renders the products
*/
var _redrawCartItems = function (silent) {
minicart.products = [];
$.util.setText(minicart.UI.itemList, '');
$.util.setText(minicart.UI.subtotalAmount, '');
minicart.UI.button.value = config.strings.button;
_parseStorage();
minicart.updateSubtotal(silent);
};
/**
* Renders the product in the cart
*
* @param data {object} The data for the product
*/
var _renderProduct = function (data) {
var ui = minicart.UI,
cartEl = ui.cart,
product = new ProductNode(data, minicart.UI.itemList.children.length + 1),
offset = data.product.offset,
keyupTimer, hiddenInput, key;
minicart.products[offset] = product;
// Add hidden settings data to parent form
for (key in data.settings) {
if (cartEl.elements[key]) {
if (cartEl.elements[key].value) {
cartEl.elements[key].value = data.settings[key];
} else {
cartEl.elements[key] = data.settings[key];
}
} else {
hiddenInput = document.createElement('input');
hiddenInput.type = 'hidden';
hiddenInput.name = key;
hiddenInput.value = data.settings[key];
cartEl.appendChild(hiddenInput);
}
}
// if the product has no name or number then don't add it
if (product.isPlaceholder) {
return false;
// otherwise, setup the new element
} else {
// Click event for "x"
$.event.add(product.removeInput, 'click', function () {
_removeProduct(product, offset);
});
// Event for changing quantities
var currentValue = product.quantityInput.value;
$.event.add(product.quantityInput, 'keyup', function () {
var that = this;
keyupTimer = setTimeout(function () {
var value = parseInt(that.value, 10);
if (!isNaN(value) && value !== currentValue) {
currentValue = value;
product.setQuantity(value);
// Delete the product
if (!product.getQuantity()) {
_removeProduct(product, offset);
}
minicart.updateSubtotal();
$.storage.save(minicart.products);
}
}, 250);
});
// Add the item and fade it in
ui.itemList.insertBefore(product.liNode, ui.itemList.firstChild);
$.util.animate(product.liNode, 'opacity', { from: 0, to: 1 });
return true;
}
};
/**
* Removes a product from the cart
*
* @param product {ProductNode} The product object
* @param offset {Number} The offset for the product in the cart
*/
var _removeProduct = function (product, offset) {
var events = config.events,
onRemoveFromCart = events.onRemoveFromCart,
afterRemoveFromCart = events.afterRemoveFromCart;
if (typeof onRemoveFromCart === 'function') {
if (onRemoveFromCart.call(minicart, product) === false) {
return;
}
}
product.setQuantity(0);
product.quantityInput.style.display = 'none';
$.util.animate(product.liNode, 'opacity', { from: 1, to: 0 }, function () {
$.util.animate(product.liNode, 'height', { from: 18, to: 0 }, function () {
try {
product.liNode.parentNode.removeChild(product.liNode);
} catch (e) {
// fail
}
// regenerate the form element indexes
var products = minicart.UI.cart.getElementsByTagName('li'),
products_len = products.length,
inputs,
inputs_len,
input,
matches,
i, j, k = 1;
for (i = 0 ; i < products_len; i++) {
inputs = products[i].getElementsByTagName('input');
inputs_len = inputs.length;
for (j = 0; j < inputs_len; j++) {
input = inputs[j];
matches = /(.+)_[0-9]+$/.exec(input.name);
if (matches && matches[1]) {
input.name = matches[1] + '_' + k;
}
}
k++;
}
if (typeof afterRemoveFromCart === 'function') {
afterRemoveFromCart.call(minicart, product);
}
});
});
minicart.products[offset].product.item_name = '';
minicart.products[offset].product.item_number = '';
minicart.updateSubtotal();
$.storage.save(minicart.products, config.cartDuration);
};
/**
* Event when the cart form is submitted
*
* @param e {event} The form submission event
*/
var _checkout = function (e) {
var onCheckout = config.events.onCheckout;
if (typeof onCheckout === 'function') {
if (onCheckout.call(minicart, e) === false) {
e.preventDefault();
return;
}
}
minicart.UI.button.value = config.strings.processing;
};
/** PUBLIC **/
/**
* Array of ProductNode
*/
minicart.products = [];
/**
* Container for UI elements
*/
minicart.UI = {};
/**
* Renders the cart, creates the configuration and loads the data
*
* @param userConfig {object} User settings which override the default configuration
*/
minicart.render = function (userConfig) {
var events, onRender, afterRender, hash, cmd;
// Overwrite default configuration with user settings
_parseUserConfig(userConfig);
events = config.events;
onRender = events.onRender;
afterRender = events.afterRender;
if (typeof onRender === 'function') {
if (onRender.call(minicart) === false) {
return;
}
}
if (!isRendered) {
// Render the cart UI
_addCSS();
_buildDOM();
_bindEvents();
// Check if a transaction was completed
// The "return" form param is modified to contain a hash value
// with "PPMiniCart=reset". If this is seen then it's assumed
// that a transaction was completed and we should reset the cart.
hash = location.hash.substring(1);
if (hash.indexOf(config.name + '=') === 0) {
cmd = hash.split('=')[1];
if (cmd === 'reset') {
minicart.reset();
location.hash = '';
}
}
}
// Process any stored data and render it
// TODO: _parseStorage shouldn't be so tightly coupled here and one
// should be able to redraw without re-parsing the storage
_redrawCartItems(true);
// Trigger the cart to peek on first load if any products were loaded
if (!isRendered) {
if (isShowing) {
setTimeout(function () {
minicart.hide(null);
}, 500);
} else {
$.storage.remove();
}
}
isRendered = true;
if (typeof afterRender === 'function') {
afterRender.call(minicart);
}
};
/**
* Binds a form to the Mini Cart
*
* @param form {HTMLElement} The form element to bind
*/
minicart.bindForm = function (form) {
if (form.add) {
$.event.add(form, 'submit', function (e) {
e.preventDefault(e);
var data = _parseForm(e.target);
minicart.addToCart(data);
});
} else if (form.display) {
$.event.add(form, 'submit', function (e) {
e.preventDefault();
minicart.show(e);
});
} else {
return false;
}
return true;
};
/**
* Adds a product to the cart
*
* @param data {object} Product object. See _parseData for format
* @return {boolean} True if the product was added, false otherwise
*/
minicart.addToCart = function (data) {
var events = config.events,
onAddToCart = events.onAddToCart,
afterAddToCart = events.afterAddToCart,
success = false,
productNode, offset;
data = _parseData(data);
offset = data.product.offset;
if (typeof onAddToCart === 'function') {
if (onAddToCart.call(minicart, data.product) === false) {
return;
}
}
// Check if the product has already been added; update if so
if ((productNode = this.getProductAtOffset(offset))) {
productNode.product.quantity += parseInt(data.product.quantity || 1, 10);
productNode.setPrice(data.product.amount * productNode.product.quantity);
productNode.setQuantity(productNode.product.quantity);
success = true;
// Add a new DOM element for the product
} else {
data.product.offset = minicart.products.length;
success = _renderProduct(data);
}
minicart.updateSubtotal();
minicart.show(null);
$.storage.save(minicart.products, config.cartDuration);
if (typeof afterAddToCart === 'function') {
afterAddToCart.call(minicart, data);
}
return success;
};
/**
* Returns a product from the Mini Cart's interal storage
*
* @param offset {number} The offset of the product
* @return {ProductNode}
*/
minicart.getProductAtOffset = function (offset) {
return (typeof offset !== 'undefined' && this.products[offset]);
};
/**
* Iterates over each product and calculates the subtotal
*
* @return {number} The subtotal
*/
minicart.calculateSubtotal = function () {
var amount = 0,
products = minicart.products,
product, item, price, discount, len, i;
for (i = 0, len = products.length; i < len; i++) {
item = products[i];
if ((product = item.product)) {
if (product.quantity && product.amount) {
price = product.amount;
discount = item.getDiscount();
amount += parseFloat((price * product.quantity) - discount);
}
}
}
return amount.toFixed(2);
};
/**
* Updates the UI with the current subtotal and currency code
*/
minicart.updateSubtotal = function (silent) {
var ui = minicart.UI,
cartEl = ui.cart.elements,
subtotalEl = ui.subtotalAmount,
subtotal = minicart.calculateSubtotal(),
level = 1,
currency_code, currency_symbol, hex, len, i;
// Get the currency
currency_code = '';
currency_symbol = '';
if (cartEl.currency_code) {
currency_code = cartEl.currency_code.value || cartEl.currency_code;
} else {
for (i = 0, len = cartEl.length; i < len; i++) {
if (cartEl[i].name === 'currency_code') {
currency_code = cartEl[i].value || cartEl[i];
break;
}
}
}
// Update the UI
$.util.setText(subtotalEl, $.util.formatCurrency(subtotal, currency_code));
// Yellow fade on update
if (!silent) {
(function doFade() {
hex = level.toString(16);
level++;
subtotalEl.style.backgroundColor = '#ff' + hex;
if (level >= 15) {
subtotalEl.style.backgroundColor = 'transparent';
// hide the cart if there's no total
if (subtotal === '0.00') {
minicart.reset();
}
return;
}
setTimeout(doFade, 30);
})();
}
};
/**
* Shows the cart
*
* @param e {event} The triggering event
*/
minicart.show = function (e) {
var from = parseInt(minicart.UI.cart.offsetTop, 10),
to = 0,
events = config.events,
onShow = events.onShow,
afterShow = events.afterShow;
if (e && e.preventDefault) { e.preventDefault(); }
if (typeof onShow === 'function') {
if (onShow.call(minicart, e) === false) {
return;
}
}
$.util.animate(minicart.UI.cart, 'top', { from: from, to: to }, function () {
if (typeof afterShow === 'function') {
afterShow.call(minicart, e);
}
});
minicart.UI.summary.style.backgroundPosition = '-195px 2px';
isShowing = true;
};
/**
* Hides the cart off the screen
*
* @param e {event} The triggering event
* @param fully {boolean} Should the cart be fully hidden? Optional. Defaults to false.
*/
minicart.hide = function (e, fully) {
var ui = minicart.UI,
cartEl = ui.cart,
summaryEl = ui.summary,
cartHeight = (cartEl.offsetHeight) ? cartEl.offsetHeight : document.defaultView.getComputedStyle(cartEl, '').getPropertyValue('height'),
summaryHeight = (summaryEl.offsetHeight) ? summaryEl.offsetHeight : document.defaultView.getComputedStyle(summaryEl, '').getPropertyValue('height'),
from = parseInt(cartEl.offsetTop, 10),
events = config.events,
onHide = events.onHide,
afterHide = events.afterHide,
to;
// make the cart fully hidden
if (fully || minicart.products.length === 0 || !config.peekEnabled) {
to = cartHeight * -1;
// otherwise only show a little teaser portion of it
} else {
to = (cartHeight - summaryHeight - 8) * -1;
}
if (e && e.preventDefault) { e.preventDefault(); }
if (typeof onHide === 'function') {
if (onHide.call(minicart, e) === false) {
return;
}
}
$.util.animate(cartEl, 'top', { from: from, to: to }, function () {
if (typeof afterHide === 'function') {
afterHide.call(minicart, e);
}
});
summaryEl.style.backgroundPosition = '-195px -32px';
isShowing = false;
};
/**
* Toggles the display of the cart
*
* @param e {event} The triggering event
*/
minicart.toggle = function (e) {
if (isShowing) {
minicart.hide(e);
} else {
minicart.show(e);
}
};
/**
* Resets the cart to it's initial state
*/
minicart.reset = function () {
var ui = minicart.UI,
events = config.events,
onReset = events.onReset,
afterReset = events.afterReset;
if (typeof onReset === 'function') {
if (onReset.call(minicart) === false) {
return;
}
}
minicart.products = [];
if (isShowing) {
$.util.setText(ui.itemList, '');
$.util.setText(ui.subtotalAmount, '');
minicart.hide(null, true);
}
$.storage.remove();
if (typeof afterReset === 'function') {
afterReset.call(minicart);
}
};
// Expose the object as public methods
return minicart;
})();
/**
* An HTMLElement which displays each product
*
* @param data {object} The data for the product
* @param position {number} The product number
*/
var ProductNode = function (data, position) {
this._view(data, position);
};
ProductNode.prototype = {
/**
* Creates the DOM nodes and adds the product content
*
* @param data {object} The data for the product
* @param position {number} The product number
*/
_view: function (data, position) {
var name, price, quantity, discount, options, hiddenInput, key;
this.product = data.product;
this.settings = data.settings;
this.liNode = document.createElement('li');
this.nameNode = document.createElement('a');
this.metaNode = document.createElement('span');
this.discountNode = document.createElement('span');
this.discountInput = document.createElement('input');
this.priceNode = document.createElement('span');
this.quantityInput = document.createElement('input');
this.removeInput = document.createElement('input');
// Don't add blank products
if (!this.product || (!this.product.item_name && !this.product.item_number)) {
this.isPlaceholder = true;
return;
}
// Name
if (this.product.item_name) {
name = this.product.item_name;
}
$.util.setText(this.nameNode, name);
this.nameNode.href = this.product.href;
this.nameNode.appendChild(this.metaNode);
// Meta info
if (this.product.item_number) {
$.util.setText(this.metaNode, this.product.item_number, null, '<br>');
}
// Options
options = this.getOptions();
for (key in options) {
$.util.setText(this.metaNode, key + ': ' + options[key], this.metaNode.innerHTML, '<br>');
}
// Discount
discount = this.getDiscount();
if (discount >= 0) {
this.discountInput.type = 'hidden';
this.discountInput.name = 'discount_amount_' + position;
this.discountInput.value = discount;
this.metaNode.appendChild(this.discountInput);
}
// Price
price = this.getPrice();
this.priceNode.className = 'price';
// Quantity
quantity = this.getQuantity();
this.quantityInput.name = 'quantity_' + position;
this.quantityInput.className = 'quantity';
this.quantityInput.setAttribute('autocomplete', 'off');
this.setQuantity(quantity);
// Remove button
this.removeInput.type = 'button';
this.removeInput.className = 'remove';
// Build out the DOM
this.liNode.appendChild(this.nameNode);
this.liNode.appendChild(this.quantityInput);
if (discount) {
this.liNode.appendChild(this.discountInput);
}
this.liNode.appendChild(this.removeInput);
this.liNode.appendChild(this.priceNode);
// Add in hidden product data
for (key in this.product) {
if (key !== 'quantity' && key.indexOf('discount_') === -1) {
hiddenInput = document.createElement('input');
hiddenInput.type = 'hidden';
hiddenInput.name = key + '_' + position;
hiddenInput.value = this.product[key];
this.liNode.appendChild(hiddenInput);
}
}
},
/**
* Calculates the discount for a product
*
* @return {Object} An object with the discount amount or percentage
*/
getDiscount: function () {
var discount = 0,
discountNum = this.product.discount_num || -1,
quantity;
// Discounts: Amount-based
if (this.product.discount_amount >= 0) {
// Discount amount for the first item
discount = parseFloat(this.product.discount_amount);
// Discount amount for each additional item
if (this.product.discount_amount2) {
quantity = this.getQuantity();
if (quantity > 1) {
discount += Math.min(quantity - 1, discountNum) * parseFloat(this.product.discount_amount2);
}
}
// Discounts: Percentage-based
} else if (this.product.discount_rate >= 0) {
// Discount amount on the first item
discount = this.product.amount * parseFloat(this.product.discount_rate) / 100;
// Discount amount for each additional item
if (this.product.discount_rate2) {
quantity = this.getQuantity();
if (quantity > 1) {
discount += Math.min(quantity - 1, discountNum) * this.product.amount * parseFloat(this.product.discount_amount2) / 100;
}
}
}
return discount && discount.toFixed(2);
},
/**
* Returns an object of options for the product
*
* @return {Object}
*/
getOptions: function () {
var options = {},
i = 0;
while (typeof this.product['on' + i] !== 'undefined') {
options[this.product['on' + i]] = this.product['os' + i];
i++;
}
return options;
},
/**
* Utility function to set the quantity of this product
*
* @param value {number} The new value
*/
setQuantity: function (value) {
var discount;
value = parseInt(value, 10);
this.product.quantity = value;
if (this.quantityInput.value !== value) {
this.quantityInput.value = value;
if ((discount = this.getDiscount())) {
this.discountInput.value = discount;
/**
* Append the discount node if it doesn't already exist
*
* @author Ethan Schroeder <ethan.schroeder@gmail.com>
*/
if (!this.discountNode.innerHTML) {
this.metaNode.appendChild(this.discountNode);
}
$.util.setText(this.discountNode, this.discountNode.innerHTML + config.strings.discount + $.util.formatCurrency(discount, this.settings.currency_code));
}
}
this.setPrice(this.product.amount * value);
},
/**
* Utility function to get the quantity of this product
*
* @return {number}
*/
getQuantity: function () {
return (typeof this.product.quantity !== undefined) ? this.product.quantity : 1;
},
/**
* Utility function to set the price of this product
*
* @param value {number} The new value
*/
setPrice: function (value) {
value = parseFloat(value, 10);
$.util.setText(this.priceNode, $.util.formatCurrency(value.toFixed(2), this.settings.currency_code));
},
/**
* Utility function to get the price of this product
*
* @return {number}
*/
getPrice: function () {
return (this.product.amount * this.getQuantity()).toFixed(2);
}
};
/** UTILITY **/
var $ = {};
$.storage = (function () {
var name = config.name;
// Use HTML5 client side storage
if (window.localStorage) {
return {
/**
* Loads the saved data
*
* @return {object}
*/
load: function () {
var data = localStorage.getItem(name),
todayDate, expiresDate;
if (data) {
data = JSON.parse(decodeURIComponent(data));
}
if (data && data.expires) {
todayDate = new Date();
expiresDate = new Date(data.expires);
if (todayDate > expiresDate) {
$.storage.remove();
return;
}
}
// A little bit of backwards compatibility for the moment
if (data && data.value) {
return data.value;
} else {
return data;
}
},
/**
* Saves the data
*
* @param items {object} The list of items to save
* @param duration {Number} The number of days to keep the data
*/
save: function (items, duration) {
var date = new Date(),
data = [],
wrappedData, item, len, i;
if (items) {
for (i = 0, len = items.length; i < len; i++) {
item = items[i];
data.push({
product: item.product,
settings: item.settings
});
}
date.setTime(date.getTime() + duration * 24 * 60 * 60 * 1000);
wrappedData = {
value: data,
expires: date.toGMTString()
};
localStorage.setItem(name, encodeURIComponent(JSON.stringify(wrappedData)));
}
},
/**
* Removes the saved data
*/
remove: function () {
localStorage.removeItem(name);
}
};
// Otherwise use cookie based storage
} else {
return {
/**
* Loads the saved data
*
* @return {object}
*/
load: function () {
var key = name + '=',
data, cookies, cookie, value, i;
try {
cookies = document.cookie.split(';');
for (i = 0; i < cookies.length; i++) {
cookie = cookies[i];
while (cookie.charAt(0) === ' ') {
cookie = cookie.substring(1, cookie.length);
}
if (cookie.indexOf(key) === 0) {
value = cookie.substring(key.length, cookie.length);
data = JSON.parse(decodeURIComponent(value));
}
}
} catch (e) {}
return data;
},
/**
* Saves the data
*
* @param items {object} The list of items to save
* @param duration {Number} The number of days to keep the data
*/
save: function (items, duration) {
var date = new Date(),
data = [],
item, len, i;
if (items) {
for (i = 0, len = items.length; i < len; i++) {
item = items[i];
data.push({
product: item.product,
settings: item.settings
});
}
date.setTime(date.getTime() + duration * 24 * 60 * 60 * 1000);
document.cookie = config.name + '=' + encodeURIComponent(JSON.stringify(data)) + '; expires=' + date.toGMTString() + '; path=' + config.cookiePath;
}
},
/**
* Removes the saved data
*/
remove: function () {
this.save(null, -1);
}
};
}
})();
$.event = (function () {
/**
* Events are added here for easy reference
*/
var cache = [];
// Non-IE events
if (document.addEventListener) {
return {
/**
* Add an event to an object and optionally adjust it's scope
*
* @param obj {HTMLElement} The object to attach the event to
* @param type {string} The type of event excluding "on"
* @param fn {function} The function
* @param scope {object} Object to adjust the scope to (optional)
*/
add: function (obj, type, fn, scope) {
scope = scope || obj;
var wrappedFn = function (e) { fn.call(scope, e); };
obj.addEventListener(type, wrappedFn, false);
cache.push([obj, type, fn, wrappedFn]);
},
/**
* Remove an event from an object
*
* @param obj {HTMLElement} The object to remove the event from
* @param type {string} The type of event excluding "on"
* @param fn {function} The function
*/
remove: function (obj, type, fn) {
var wrappedFn, item, len = cache.length, i;
for (i = 0; i < len; i++) {
item = cache[i];
if (item[0] === obj && item[1] === type && item[2] === fn) {
wrappedFn = item[3];
if (wrappedFn) {
obj.removeEventListener(type, wrappedFn, false);
delete cache[i];
}
}
}
}
};
// IE events
} else if (document.attachEvent) {
return {
/**
* Add an event to an object and optionally adjust it's scope (IE)
*
* @param obj {HTMLElement} The object to attach the event to
* @param type {string} The type of event excluding "on"
* @param fn {function} The function
* @param scope {object} Object to adjust the scope to (optional)
*/
add: function (obj, type, fn, scope) {
scope = scope || obj;
var wrappedFn = function () {
var e = window.event;
e.target = e.target || e.srcElement;
e.preventDefault = function () {
e.returnValue = false;
};
fn.call(scope, e);
};
obj.attachEvent('on' + type, wrappedFn);
cache.push([obj, type, fn, wrappedFn]);
},
/**
* Remove an event from an object (IE)
*
* @param obj {HTMLElement} The object to remove the event from
* @param type {string} The type of event excluding "on"
* @param fn {function} The function
*/
remove: function (obj, type, fn) {
var wrappedFn, item, len = cache.length, i;
for (i = 0; i < len; i++) {
item = cache[i];
if (item[0] === obj && item[1] === type && item[2] === fn) {
wrappedFn = item[3];
if (wrappedFn) {
obj.detachEvent('on' + type, wrappedFn);
delete cache[i];
}
}
}
}
};
}
})();
$.util = {
/**
* Animation method for elements
*
* @param el {HTMLElement} The element to animate
* @param prop {string} Name of the property to change
* @param config {object} Properties of the animation
* @param callback {function} Callback function after the animation is complete
*/
animate: function (el, prop, config, callback) {
config = config || {};
config.from = config.from || 0;
config.to = config.to || 0;
config.duration = config.duration || 10;
config.unit = (/top|bottom|left|right|width|height/.test(prop)) ? 'px' : '';
var step = (config.to - config.from) / 20,
current = config.from;
(function doAnimate() {
el.style[prop] = current + config.unit;
current += step;
if ((step > 0 && current > config.to) || (step < 0 && current < config.to) || step === 0) {
el.style[prop] = config.to + config.unit;
if (typeof callback === 'function') {
callback();
}
return;
}
setTimeout(doAnimate, config.duration);
})();
},
/**
* Convenience method to return the value of any type of form input
*
* @param input {HTMLElement} The element who's value is returned
*/
getInputValue: function (input) {
var tag = input.tagName.toLowerCase();
if (tag === 'select') {
return input.options[input.selectedIndex].value;
} else if (tag === 'textarea') {
return input.innerText;
} else {
if (input.type === 'radio') {
return (input.checked) ? input.value : null;
} else if (input.type === 'checkbox') {
return (input.checked) ? input.value : null;
} else {
return input.value;
}
}
},
/**
* Convenient method to set the innerText of an element
*
* @param node {HTMLElement} The element
* @param contetn {String} The content to escape
* @param after {String} The content before
* @param after {String} The content afterwards
*/
setText: function (node, content, before, after) {
var str = before || '';
str += content = content.replace('<', '<').replace('>', '>');
str += (after || '');
node.innerHTML = str;
},
/**
* Formats a float into a currency
*
* @param amount {float} The currency amount
* @param code {string} The three letter currency code
*/
formatCurrency: function (amount, code) {
// TODO: The supported currency patterns need to be refined and
// should support values for before, after, decimal, and separator.
var currencies = {
AED: { before: '\u062c' },
ANG: { before: '\u0192' },
ARS: { before: '$' },
AUD: { before: '$' },
AWG: { before: '\u0192' },
BBD: { before: '$' },
BGN: { before: '\u043b\u0432' },
BMD: { before: '$' },
BND: { before: '$' },
BRL: { before: 'R$' },
BSD: { before: '$' },
CAD: { before: '$' },
CHF: { before: '' },
CLP: { before: '$' },
CNY: { before: '\u00A5' },
COP: { before: '$' },
CRC: { before: '\u20A1' },
CZK: { before: 'Kc' },
DKK: { before: 'kr' },
DOP: { before: '$' },
EEK: { before: 'kr' },
EUR: { before: '\u20AC' },
GBP: { before: '\u00A3' },
GTQ: { before: 'Q' },
HKD: { before: '$' },
HRK: { before: 'kn' },
HUF: { before: 'Ft' },
IDR: { before: 'Rp' },
ILS: { before: '\u20AA' },
INR: { before: 'Rs.' },
ISK: { before: 'kr' },
JMD: { before: 'J$' },
JPY: { before: '\u00A5' },
KRW: { before: '\u20A9' },
KYD: { before: '$' },
LTL: { before: 'Lt' },
LVL: { before: 'Ls' },
MXN: { before: '$' },
MYR: { before: 'RM' },
NOK: { before: 'kr' },
NZD: { before: '$' },
PEN: { before: 'S/' },
PHP: { before: 'Php' },
PLN: { before: 'z' },
QAR: { before: '\ufdfc' },
RON: { before: 'lei' },
RUB: { before: '\u0440\u0443\u0431' },
SAR: { before: '\ufdfc' },
SEK: { before: 'kr' },
SGD: { before: '$' },
THB: { before: '\u0E3F' },
TRY: { before: 'TL' },
TTD: { before: 'TT$' },
TWD: { before: 'NT$' },
UAH: { before: '\u20b4' },
USD: { before: '$' },
UYU: { before: '$U' },
VEF: { before: 'Bs' },
VND: { before: '\u20ab' },
XCD: { before: '$' },
ZAR: { before: 'R' }
},
currency = currencies[code] || {},
before = currency.before || '',
after = currency.after || '';
return before + amount + after;
}
};
}
})();
/*
json2.js
2012-10-08
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
NOT CONTROL.
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
replacer an optional parameter that determines how object
values are stringified for objects. It can be a
function or an array of strings.
space an optional parameter that specifies the indentation
of nested structures. If it is omitted, the text will
be packed without extra whitespace. If it is a number,
it will specify the number of spaces to indent at each
level. If it is a string (such as '\t' or ' '),
it contains the characters used to indent at each level.
This method produces a JSON text from a JavaScript value.
When an object value is found, if the object contains a toJSON
method, its toJSON method will be called and the result will be
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
will be passed the key associated with the value, and this will be
bound to the value
For example, this would serialize Dates as ISO strings.
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
You can provide an optional replacer method. It will be passed the
key and value of each member, with this bound to the containing
object. The value that is returned from your method will be
serialized. If your method returns undefined, then the member will
be excluded from the serialization.
If the replacer parameter is an array of strings, then it will be
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.
Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects will be
dropped; in arrays they will be replaced with null. You can use
a replacer function to replace those with JSON values.
JSON.stringify(undefined) returns undefined.
The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.
If the space parameter is a non-empty string, then that string will
be used for indentation. If the space parameter is a number, then
the indentation will be that many spaces.
Example:
text = JSON.stringify(['e', {pluribus: 'unum'}]);
// text is '["e",{"pluribus":"unum"}]'
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
});
// text is '["Date(---current time---)"]'
JSON.parse(text, reviver)
This method parses a JSON text to produce an object or array.
It can throw a SyntaxError exception.
The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.
Example:
// Parse the text. Values that look like ISO date strings will
// be converted to Date objects.
myData = JSON.parse(text, function (key, value) {
var a;
if (typeof value === 'string') {
a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
if (a) {
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+a[5], +a[6]));
}
}
return value;
});
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
var d;
if (typeof value === 'string' &&
value.slice(0, 5) === 'Date(' &&
value.slice(-1) === ')') {
d = new Date(value.slice(5, -1));
if (d) {
return d;
}
}
return value;
});
This is a reference implementation. You are free to copy, modify, or
redistribute.
*/
/*jslint evil: true, regexp: true */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
*/
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
if (typeof JSON !== 'object') {
JSON = {};
}
(function () {
'use strict';
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON !== 'function') {
Date.prototype.toJSON = function (key) {
return isFinite(this.valueOf())
? this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z'
: null;
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string'
? c
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0
? '[]'
: gap
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
: '[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
if (typeof rep[i] === 'string') {
k = rep[i];
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0
? '{}'
: gap
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
: '{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function'
? walk({'': j}, '')
: j;
}
// If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse');
};
}
}());
| AMoo-Miki/cdnjs | ajax/libs/minicart/2.6.1/minicart.js | JavaScript | mit | 62,710 |
/*! =======================================================
VERSION 5.0.13
========================================================= */
/*! =========================================================
* bootstrap-slider.js
*
* Maintainers:
* Kyle Kemp
* - Twitter: @seiyria
* - Github: seiyria
* Rohit Kalkur
* - Twitter: @Rovolutionary
* - Github: rovolution
*
* =========================================================
*
* 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.
* ========================================================= */
.slider {
display: inline-block;
vertical-align: middle;
position: relative;
}
.slider.slider-horizontal {
width: 210px;
height: 20px;
}
.slider.slider-horizontal .slider-track {
height: 10px;
width: 100%;
margin-top: -5px;
top: 50%;
left: 0;
}
.slider.slider-horizontal .slider-selection,
.slider.slider-horizontal .slider-track-low,
.slider.slider-horizontal .slider-track-high {
height: 100%;
top: 0;
bottom: 0;
}
.slider.slider-horizontal .slider-tick,
.slider.slider-horizontal .slider-handle {
margin-left: -10px;
margin-top: -5px;
}
.slider.slider-horizontal .slider-tick.triangle,
.slider.slider-horizontal .slider-handle.triangle {
border-width: 0 10px 10px 10px;
width: 0;
height: 0;
border-bottom-color: #0480be;
margin-top: 0;
}
.slider.slider-horizontal .slider-tick-label-container {
white-space: nowrap;
margin-top: 20px;
}
.slider.slider-horizontal .slider-tick-label-container .slider-tick-label {
padding-top: 4px;
display: inline-block;
text-align: center;
}
.slider.slider-vertical {
height: 210px;
width: 20px;
}
.slider.slider-vertical .slider-track {
width: 10px;
height: 100%;
margin-left: -5px;
left: 50%;
top: 0;
}
.slider.slider-vertical .slider-selection {
width: 100%;
left: 0;
top: 0;
bottom: 0;
}
.slider.slider-vertical .slider-track-low,
.slider.slider-vertical .slider-track-high {
width: 100%;
left: 0;
right: 0;
}
.slider.slider-vertical .slider-tick,
.slider.slider-vertical .slider-handle {
margin-left: -5px;
margin-top: -10px;
}
.slider.slider-vertical .slider-tick.triangle,
.slider.slider-vertical .slider-handle.triangle {
border-width: 10px 0 10px 10px;
width: 1px;
height: 1px;
border-left-color: #0480be;
margin-left: 0;
}
.slider.slider-disabled .slider-handle {
background-image: -webkit-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);
background-image: -o-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);
background-image: linear-gradient(to bottom, #dfdfdf 0%, #bebebe 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdfdfdf', endColorstr='#ffbebebe', GradientType=0);
}
.slider.slider-disabled .slider-track {
background-image: -webkit-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);
background-image: -o-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);
background-image: linear-gradient(to bottom, #e5e5e5 0%, #e9e9e9 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe5e5e5', endColorstr='#ffe9e9e9', GradientType=0);
cursor: not-allowed;
}
.slider input {
display: none;
}
.slider .tooltip.top {
margin-top: -36px;
}
.slider .tooltip-inner {
white-space: nowrap;
}
.slider .hide {
display: none;
}
.slider-track {
position: absolute;
cursor: pointer;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%);
background-image: linear-gradient(to bottom, #f5f5f5 0%, #f9f9f9 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.slider-selection {
position: absolute;
background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 4px;
}
.slider-selection.tick-slider-selection {
background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);
background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);
background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);
}
.slider-track-low,
.slider-track-high {
position: absolute;
background: transparent;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 4px;
}
.slider-handle {
position: absolute;
width: 20px;
height: 20px;
background-color: #337ab7;
background-image: -webkit-linear-gradient(top, #149bdf 0%, #0480be 100%);
background-image: -o-linear-gradient(top, #149bdf 0%, #0480be 100%);
background-image: linear-gradient(to bottom, #149bdf 0%, #0480be 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
filter: none;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
border: 0px solid transparent;
}
.slider-handle.round {
border-radius: 50%;
}
.slider-handle.triangle {
background: transparent none;
}
.slider-handle.custom {
background: transparent none;
}
.slider-handle.custom::before {
line-height: 20px;
font-size: 20px;
content: '\2605';
color: #726204;
}
.slider-tick {
position: absolute;
width: 20px;
height: 20px;
background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
filter: none;
opacity: 0.8;
border: 0px solid transparent;
}
.slider-tick.round {
border-radius: 50%;
}
.slider-tick.triangle {
background: transparent none;
}
.slider-tick.custom {
background: transparent none;
}
.slider-tick.custom::before {
line-height: 20px;
font-size: 20px;
content: '\2605';
color: #726204;
}
.slider-tick.in-selection {
background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);
background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);
background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);
opacity: 1;
}
| maruilian11/cdnjs | ajax/libs/bootstrap-slider/5.1.0/css/bootstrap-slider.css | CSS | mit | 8,062 |
// install : cordova plugin add https://github.com/christocracy/cordova-plugin-background-geolocation.git
// link : https://github.com/christocracy/cordova-plugin-background-geolocation
angular.module('ngCordova.plugins.backgroundGeolocation', [])
.factory('$cordovaBackgroundGeolocation', ['$q', '$window', function ($q, $window) {
return {
init: function () {
$window.navigator.geolocation.getCurrentPosition(function (location) {
return location;
});
},
configure: function (options) {
this.init();
var q = $q.defer();
$window.plugins.backgroundGeoLocation.configure(
function (result) {
q.notify(result);
$window.plugins.backgroundGeoLocation.finish();
},
function (err) {
q.reject(err);
}, options);
this.start();
return q.promise;
},
start: function () {
var q = $q.defer();
$window.plugins.backgroundGeoLocation.start(
function (result) {
q.resolve(result);
},
function (err) {
q.reject(err);
});
return q.promise;
},
stop: function () {
var q = $q.defer();
$window.plugins.backgroundGeoLocation.stop(
function (result) {
q.resolve(result);
},
function (err) {
q.reject(err);
});
return q.promise;
}
};
}
]);
| florianeckerstorfer/ng-cordova | src/plugins/backgroundGeolocation.js | JavaScript | mit | 1,527 |
/*!
* Inspire Tree v1.6.1
* https://github.com/helion3/inspire-tree
*
* Copyright 2015 Helion3, and other contributors
* Licensed under MIT. https://github.com/helion3/inspire-tree/blob/master/LICENSE
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["InspireTree"] = factory();
else
root["InspireTree"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// Libs
var _difference2 = __webpack_require__(1);
var _difference3 = _interopRequireDefault(_difference2);
var _isRegExp2 = __webpack_require__(57);
var _isRegExp3 = _interopRequireDefault(_isRegExp2);
var _isEmpty2 = __webpack_require__(58);
var _isEmpty3 = _interopRequireDefault(_isEmpty2);
var _isNumber2 = __webpack_require__(75);
var _isNumber3 = _interopRequireDefault(_isNumber2);
var _castArray2 = __webpack_require__(76);
var _castArray3 = _interopRequireDefault(_castArray2);
var _isString2 = __webpack_require__(66);
var _isString3 = _interopRequireDefault(_isString2);
var _tail2 = __webpack_require__(77);
var _tail3 = _interopRequireDefault(_tail2);
var _head2 = __webpack_require__(80);
var _head3 = _interopRequireDefault(_head2);
var _get2 = __webpack_require__(81);
var _get3 = _interopRequireDefault(_get2);
var _transform2 = __webpack_require__(89);
var _transform3 = _interopRequireDefault(_transform2);
var _assign2 = __webpack_require__(126);
var _assign3 = _interopRequireDefault(_assign2);
var _sortBy2 = __webpack_require__(131);
var _sortBy3 = _interopRequireDefault(_sortBy2);
var _sortedIndexBy2 = __webpack_require__(140);
var _sortedIndexBy3 = _interopRequireDefault(_sortedIndexBy2);
var _remove2 = __webpack_require__(142);
var _remove3 = _interopRequireDefault(_remove2);
var _slice2 = __webpack_require__(146);
var _slice3 = _interopRequireDefault(_slice2);
var _findIndex2 = __webpack_require__(147);
var _findIndex3 = _interopRequireDefault(_findIndex2);
var _find2 = __webpack_require__(149);
var _find3 = _interopRequireDefault(_find2);
var _findLast2 = __webpack_require__(151);
var _findLast3 = _interopRequireDefault(_findLast2);
var _indexOf2 = __webpack_require__(155);
var _indexOf3 = _interopRequireDefault(_indexOf2);
var _isArrayLike2 = __webpack_require__(46);
var _isArrayLike3 = _interopRequireDefault(_isArrayLike2);
var _cloneDeep2 = __webpack_require__(156);
var _cloneDeep3 = _interopRequireDefault(_cloneDeep2);
var _each2 = __webpack_require__(178);
var _each3 = _interopRequireDefault(_each2);
var _defaults2 = __webpack_require__(180);
var _defaults3 = _interopRequireDefault(_defaults2);
var _isObject2 = __webpack_require__(11);
var _isObject3 = _interopRequireDefault(_isObject2);
var _isFunction2 = __webpack_require__(10);
var _isFunction3 = _interopRequireDefault(_isFunction2);
var _isArray2 = __webpack_require__(51);
var _isArray3 = _interopRequireDefault(_isArray2);
var _isBoolean2 = __webpack_require__(187);
var _isBoolean3 = _interopRequireDefault(_isBoolean2);
var _defaultsDeep2 = __webpack_require__(188);
var _defaultsDeep3 = _interopRequireDefault(_defaultsDeep2);
var _cuid = __webpack_require__(196);
var _cuid2 = _interopRequireDefault(_cuid);
var _eventemitter = __webpack_require__(197);
var _eventemitter2 = _interopRequireDefault(_eventemitter);
var _es6Promise = __webpack_require__(198);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// CSS
__webpack_require__(202);
function InspireTree(opts) {
var initialized = false;
var noop = function noop() {};
var tree = this;
var lastSelectedNode;
var muted = false;
var preventDeselection = false;
if (!opts.data) {
throw new TypeError('Invalid data loader.');
}
// Assign defaults
tree.config = (0, _defaultsDeep3.default)({}, opts, {
allowLoadEvents: [],
contextMenu: false,
dragTargets: false,
nodes: {
resetStateOnRestore: true
},
renderer: false,
search: false,
selection: {
allow: noop,
autoDeselect: true,
autoSelectChildren: false,
mode: 'default',
multiple: false,
require: false
},
showCheckboxes: false,
sort: false,
tabindex: -1
});
// If checkbox mode, we must force auto-selecting children
if (tree.config.selection.mode === 'checkbox') {
tree.config.selection.autoSelectChildren = true;
tree.config.selection.autoDeselect = false;
if (!(0, _isBoolean3.default)(opts.showCheckboxes)) {
tree.config.showCheckboxes = true;
}
}
// If auto-selecting children, we must force multiselect
if (tree.config.selection.autoSelectChildren) {
tree.config.selection.multiple = true;
}
// Default node state values
var defaultState = {
collapsed: true,
focused: false,
hidden: false,
indeterminate: false,
loading: false,
removed: false,
selectable: true,
selected: false
};
// Cache some configs
var allowsLoadEvents = (0, _isArray3.default)(tree.config.allowLoadEvents) && tree.config.allowLoadEvents.length > 0;
var isDynamic = (0, _isFunction3.default)(tree.config.data);
// Rendering
var dom;
// Override emitter so we can better control flow
var emit = tree.emit;
tree.emit = function () {
if (!muted) {
emit.apply(tree, arguments);
}
};
// Webpack has a DOM boolean that when false,
// allows us to exclude this library from our build.
// For those doing their own rendering, it's useless.
if (false) {
dom = new (require('./dom'))(tree);
}
// Validation
if (dom && (!(0, _isObject3.default)(opts) || !opts.target)) {
throw new TypeError('Property "target" is required, either an element or a selector.');
}
// Load custom/empty renderer
if (!dom) {
var renderer = (0, _isFunction3.default)(tree.config.renderer) ? tree.config.renderer(tree) : {};
dom = (0, _defaults3.default)(renderer, {
applyChanges: noop,
attach: noop,
batch: noop,
end: noop
});
}
/**
* Represents a singe node object within the tree.
*
* @category TreeNode
* @param {TreeNode} source TreeNode to copy.
* @return {TreeNode} Tree node object.
*/
function TreeNode(source) {
var node = this;
(0, _each3.default)(source, function (value, key) {
if ((0, _isObject3.default)(value)) {
if ((0, _isFunction3.default)(value.clone)) {
node[key] = value.clone();
} else {
node[key] = (0, _cloneDeep3.default)(value);
}
} else {
node[key] = value;
}
});
};
/**
* Add a child to this node.
*
* @category TreeNode
* @param {object} child Node object.
* @return {TreeNode} Node object.
*/
TreeNode.prototype.addChild = function (child) {
if ((0, _isArray3.default)(this.children) || !(0, _isArrayLike3.default)(this.children)) {
this.children = new TreeNodes();
this.children._context = this;
}
return this.children.addNode(child);
};
/**
* Get if node available.
*
* @category TreeNode
* @return {boolean} If available.
*/
TreeNode.prototype.available = function () {
return !this.hidden() && !this.removed();
};
/**
* Blur focus from this node.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.blur = function () {
return baseStateChange('focused', false, 'blurred', this);
};
/**
* Hides parents without any visible children.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.clean = function () {
this.recurseUp(function (node) {
if (node.hasParent()) {
var parent = node.getParent();
if (!parent.hasVisibleChildren()) {
parent.hide();
}
}
});
return this;
};
/**
* Clones this node.
*
* @category TreeNode
* @return {TreeNode} New node object.
*/
TreeNode.prototype.clone = function () {
var newClone = new TreeNode(this);
if (this.hasChildren()) {
newClone.children = this.children.clone();
}
return newClone;
};
/**
* Collapse this node.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.collapse = function () {
return baseStateChange('collapsed', true, 'collapsed', this);
};
/**
* Get if node collapsed.
*
* @category TreeNode
* @return {boolean} If collapsed.
*/
TreeNode.prototype.collapsed = function () {
return this.itree.state.collapsed;
};
/**
* Get the containing context. If no parent present, the root context is returned.
*
* @category TreeNode
* @return {TreeNodes} Node array object.
*/
TreeNode.prototype.context = function () {
return this.hasParent() ? this.getParent().children : model;
};
/**
* Copies node to a new tree instance.
*
* @category TreeNode
* @param {boolean} hierarchy Include necessary ancestors to match hierarchy.
* @return {object} Property "to" for defining destination.
*/
TreeNode.prototype.copy = function (hierarchy) {
var node = this;
if (hierarchy) {
node = node.copyHierarchy();
}
return {
/**
* Sets a destination.
*
* @category CopyNode
* @param {object} dest Destination Inspire Tree.
* @return {object} New node object.
*/
to: function to(dest) {
if (!(0, _isFunction3.default)(dest.addNode)) {
throw new Error('Destination must be an Inspire Tree instance.');
}
return dest.addNode(node.export());
}
};
};
/**
* Copies all parents of a node.
*
* @category TreeNode
* @param {boolean} excludeNode Exclude given node from hierarchy.
* @return {TreeNode} Root node object with hierarchy.
*/
TreeNode.prototype.copyHierarchy = function (excludeNode) {
var node = this;
var parents = node.getParents();
var nodes = [];
// Remove old hierarchy data
(0, _each3.default)(parents, function (node) {
var clone = (0, _cloneDeep3.default)(node);
delete clone.itree.parent;
delete clone.children;
nodes.push(clone);
});
parents = nodes.reverse();
if (!excludeNode) {
var clone = (0, _cloneDeep3.default)(node);
// Filter out hidden children
if (node.hasChildren()) {
clone.children = node.children.filter(function (n) {
return !n.itree.state.hidden;
}).clone();
clone.children._context = clone;
}
nodes.push(clone);
}
var hierarchy = nodes[0];
var pointer = hierarchy;
var l = nodes.length;
(0, _each3.default)(nodes, function (parent, key) {
var children = new TreeNodes();
if (key + 1 < l) {
children.push(nodes[key + 1]);
pointer.children = children;
pointer = pointer.children[0];
}
});
return hierarchy;
};
/**
* Deselect this node.
*
* If selection.require is true and this is the last selected
* node, the node will remain in a selected state.
*
* @category TreeNode
* @param {boolean} skipParentIndeterminate Skip refreshing parent indeterminate states.
* @return {TreeNode} Node object.
*/
TreeNode.prototype.deselect = function (skipParentIndeterminate) {
if (this.selected() && (!tree.config.selection.require || tree.selected().length > 1)) {
var node = this;
dom.batch();
node.itree.state.indeterminate = false;
baseStateChange('selected', false, 'deselected', this);
// If children were auto-selected
if (tree.config.selection.autoSelectChildren) {
// Deselect all children
if (node.hasChildren()) {
node.children.each(function (child) {
child.deselect(true);
});
}
if (node.hasParent()) {
// Set indeterminate state for parent
if (tree.config.showCheckboxes && !skipParentIndeterminate) {
node.getParent().refreshIndeterminateState();
} else {
// Deselect parent node
baseStateChange('selected', false, 'deselected', node.getParent());
}
}
}
dom.end();
}
return this;
};
/**
* Expand this node.
*
* @category TreeNode
* @return {Promise} Promise resolved on successful load and expand of children.
*/
TreeNode.prototype.expand = function () {
var node = this;
return new _es6Promise.Promise(function (resolve, reject) {
var allow = node.hasChildren() || isDynamic && node.children === true;
if (allow && (node.collapsed() || node.hidden())) {
node.itree.state.collapsed = false;
node.itree.state.hidden = false;
tree.emit('node.expanded', node);
if (isDynamic && node.children === true) {
node.loadChildren().then(resolve).catch(reject);
} else {
node.markDirty();
dom.applyChanges();
resolve(node);
}
} else {
// Resolve immediately
resolve(node);
}
});
};
/**
* Get if node expanded.
*
* @category TreeNode
* @return {boolean} If expanded.
*/
TreeNode.prototype.expanded = function () {
return !this.collapsed();
};
/**
* Expand parent nodes.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.expandParents = function () {
if (this.hasParent()) {
this.getParent().recurseUp(function (node) {
node.expand();
});
}
return this;
};
/**
* Clones a node, removes itree property, and returns it
* as a native object.
*
* Note: does not use node.clone() because we don't want a
* TreeNode and we need to avoid redundant cloning children.
*
* @category TreeNode
* @return {object} Cloned/modified node object.
*/
TreeNode.prototype.export = function () {
var clone = (0, _cloneDeep3.default)(this);
delete clone.itree;
if (clone.hasChildren()) {
clone.children = clone.children.export();
}
return clone.toObject();
};
/**
* Focus a node without changing its selection.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.focus = function () {
var node = this;
if (!node.focused()) {
// Batch selection changes
dom.batch();
tree.blurDeep();
node.itree.state.focused = true;
// Emit this event
tree.emit('node.focused', node);
// Mark hierarchy dirty and apply
node.markDirty();
dom.end();
}
return node;
};
/**
* Get whether node has focus or not.
*
* @category TreeNode
* @return {boolean} If focused.
*/
TreeNode.prototype.focused = function () {
return this.itree.state.focused;
};
/**
* Get children for this node. If no children exist, an empty TreeNodes
* collection is returned for safe chaining.
*
* @category TreeNode
* @return {TreeNodes} Array of node objects.
*/
TreeNode.prototype.getChildren = function () {
return this.hasChildren() ? this.children : new TreeNodes();
};
/**
* Get the immediate parent, if any.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.getParent = function () {
return this.itree.parent;
};
/**
* Returns parent nodes. Excludes any siblings.
*
* @category TreeNode
* @return {TreeNodes} Node objects.
*/
TreeNode.prototype.getParents = function () {
var parents = new TreeNodes();
if (this.hasParent()) {
this.getParent().recurseUp(function (node) {
parents.push(node);
});
}
return parents;
};
/**
* Get a textual hierarchy for a given node. An array
* of text from this node's root ancestor to the given node.
*
* @category TreeNode
* @return {array} Array of node texts.
*/
TreeNode.prototype.getTextualHierarchy = function () {
var paths = [];
this.recurseUp(function (node) {
paths.unshift(node.text);
});
return paths;
};
/**
* If node has any children.
*
* @category TreeNode
* @return {boolean} If children.
*/
TreeNode.prototype.hasChildren = function () {
return (0, _isArrayLike3.default)(this.children) && this.children.length > 0;
};
/**
* If node has a parent.
*
* @category TreeNode
* @return {boolean} If parent.
*/
TreeNode.prototype.hasParent = function () {
return Boolean(this.itree.parent);
};
/**
* If node has any visible children.
*
* @category TreeNode
* @return {boolean} If visible children.
*/
TreeNode.prototype.hasVisibleChildren = function () {
var hasVisibleChildren = false;
if (this.hasChildren()) {
hasVisibleChildren = this.children.filter('available').length > 0;
}
return hasVisibleChildren;
};
/**
* Get if node hidden.
*
* @category TreeNode
* @return {boolean} If hidden.
*/
TreeNode.prototype.hidden = function () {
return this.itree.state.hidden;
};
/**
* Hide this node.
*
* @category TreeNode
* @return {object} Node object.
*/
TreeNode.prototype.hide = function () {
var node = baseStateChange('hidden', true, 'hidden', this);
// Update children
if (node.hasChildren()) {
node.children.hide();
}
return node;
};
/**
* Get if node is indeterminately selected.
*
* @category TreeNode
* @return {boolean} If indeterminately selected.
*/
TreeNode.prototype.indeterminate = function () {
return this.itree.state.indeterminate;
};
/**
* Returns a "path" of indices, values which map this node's location within all parent contexts.
*
* @category TreeNode
* @return {string} Index path
*/
TreeNode.prototype.indexPath = function () {
var indices = [];
this.recurseUp(function (node) {
indices.push((0, _indexOf3.default)(node.context(), node));
});
return indices.reverse().join('.');
};
/**
* Find the last + deepest visible child of the previous sibling.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.lastDeepestVisibleChild = function () {
var found;
if (this.hasChildren() && !this.collapsed()) {
found = (0, _findLast3.default)(this.children, function (node) {
return node.visible();
});
var res = found.lastDeepestVisibleChild();
if (res) {
found = res;
}
}
return found;
};
/**
* Initiate a dynamic load of children for a given node.
*
* This requires `tree.config.data` to be a function which accepts
* three arguments: node, resolve, reject.
*
* Use the `node` to filter results.
*
* On load success, pass the result array to `resolve`.
* On error, pass the Error to `reject`.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.loadChildren = function () {
var node = this;
return new _es6Promise.Promise(function (resolve, reject) {
if (!isDynamic || node.children !== true) {
reject(new Error('Node does not have or support dynamic children.'));
}
node.itree.state.loading = true;
node.markDirty();
dom.applyChanges();
var complete = function complete(results) {
dom.batch();
node.itree.state.loading = false;
node.children = collectionToModel(results, node);
node.markDirty();
dom.end();
resolve(node.children);
tree.emit('children.loaded', node);
};
var error = function error(err) {
node.itree.state.loading = false;
node.children = new TreeNodes();
node.children._context = node;
node.markDirty();
dom.applyChanges();
reject(err);
tree.emit('tree.loaderror', err);
};
var loader = tree.config.data(node, complete, error);
// Data loader is likely a promise
if ((0, _isObject3.default)(loader)) {
standardizePromise(loader).then(complete).catch(error);
}
});
};
/**
* Mark a node as dirty, rebuilding this node in the virtual DOM
* and rerendering to the live DOM, next time applyChanges is called.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.markDirty = function () {
if (!this.itree.dirty) {
this.itree.dirty = true;
if (this.hasParent()) {
this.getParent().markDirty();
}
}
return this;
};
/**
* Find the next visible sibling of our ancestor. Continues
* seeking up the tree until a valid node is found or we
* reach the root node.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.nextVisibleAncestralSiblingNode = function () {
var next;
if (this.hasParent()) {
var parent = this.getParent();
next = parent.nextVisibleSiblingNode();
if (!next) {
next = parent.nextVisibleAncestralSiblingNode();
}
}
return next;
};
/**
* Find next visible child node.
*
* @category TreeNode
* @return {TreeNode} Node object, if any.
*/
TreeNode.prototype.nextVisibleChildNode = function () {
var startingNode = this;
var next;
if (startingNode.hasChildren()) {
next = (0, _find3.default)(startingNode.children, function (child) {
return child.visible();
});
}
return next;
};
/**
* Get the next visible node.
*
* @category TreeNode
* @return {TreeNode} Node object if any.
*/
TreeNode.prototype.nextVisibleNode = function () {
var startingNode = this;
var next;
// 1. Any visible children
next = startingNode.nextVisibleChildNode();
// 2. Any Siblings
if (!next) {
next = startingNode.nextVisibleSiblingNode();
}
// 3. Find sibling of ancestor(s)
if (!next) {
next = startingNode.nextVisibleAncestralSiblingNode();
}
return next;
};
/**
* Find the next visible sibling node.
*
* @category TreeNode
* @return {object} Node object, if any.
*/
TreeNode.prototype.nextVisibleSiblingNode = function () {
var startingNode = this;
var context = startingNode.hasParent() ? startingNode.getParent().children : tree.nodes();
var i = (0, _findIndex3.default)(context, { id: startingNode.id });
return (0, _find3.default)((0, _slice3.default)(context, i + 1), function (node) {
return node.visible();
});
};
/**
* Find the previous visible node.
*
* @category TreeNode
* @return {TreeNode} Node object, if any.
*/
TreeNode.prototype.previousVisibleNode = function () {
var startingNode = this;
var prev;
// 1. Any Siblings
prev = startingNode.previousVisibleSiblingNode();
// 2. If that sibling has children though, go there
if (prev && prev.hasChildren() && !prev.collapsed()) {
prev = prev.lastDeepestVisibleChild();
}
// 3. Parent
if (!prev && startingNode.hasParent()) {
prev = startingNode.getParent();
}
return prev;
};
/**
* Find the previous visible sibling node.
*
* @category TreeNode
* @return {TreeNode} Node object, if any.
*/
TreeNode.prototype.previousVisibleSiblingNode = function () {
var context = this.hasParent() ? this.getParent().children : tree.nodes();
var i = (0, _findIndex3.default)(context, { id: this.id });
return (0, _findLast3.default)((0, _slice3.default)(context, 0, i), function (node) {
return node.visible();
});
};
/**
* Iterate down node and any children.
*
* @category TreeNode
* @param {function} iteratee Iteratee function.
* @return {TreeNode} Resulting node.
*/
TreeNode.prototype.recurseDown = function (iteratee) {
recurseDown(this, iteratee);
return this;
};
/**
* Iterate up a node and its parents.
*
* @category TreeNode
* @param {function} iteratee Iteratee function.
* @return {TreeNode} Resulting node.
*/
TreeNode.prototype.recurseUp = function (iteratee) {
var result = iteratee(this);
if (result !== false && this.hasParent()) {
this.getParent().recurseUp(iteratee);
}
return this;
};
/**
* Updates the indeterminate state of this node.
*
* Only available when checkbox=true.
* True if some, but not all children are selected.
* False if no children are selected.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.refreshIndeterminateState = function () {
var node = this;
var oldValue = node.itree.state.indeterminate;
node.itree.state.indeterminate = false;
if (tree.config.showCheckboxes) {
if (node.hasChildren()) {
var childrenCount = node.children.length;
var indeterminate = 0;
var selected = 0;
node.children.each(function (n) {
if (n.selected()) {
selected++;
}
if (n.indeterminate()) {
indeterminate++;
}
});
// Set selected if all children are
node.itree.state.selected = selected === childrenCount;
// Set indeterminate if any children are, or some children are selected
if (!node.selected()) {
node.itree.state.indeterminate = indeterminate > 0 || childrenCount > 0 && selected > 0 && selected < childrenCount;
}
}
if (node.hasParent()) {
node.getParent().refreshIndeterminateState();
}
if (oldValue !== node.itree.state.indeterminate) {
node.markDirty();
}
}
return node;
};
/**
* Remove a node from the tree.
*
* @category TreeNode
* @return {object} Removed tree node object.
*/
TreeNode.prototype.remove = function () {
var node = this;
var parent;
if (node.hasParent()) {
parent = node.getParent();
}
var context = parent ? parent.children : model;
(0, _remove3.default)(context, { id: node.id });
if (parent) {
parent.refreshIndeterminateState();
}
var exported = node.export();
tree.emit('node.removed', exported);
dom.applyChanges();
return exported;
};
/**
* Get if node soft-removed.
*
* @category TreeNode
* @return {boolean} If soft-removed.
*/
TreeNode.prototype.removed = function () {
return this.itree.state.removed;
};
/**
* Restore state if soft-removed.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.restore = function () {
return baseStateChange('removed', false, 'restored', this);
};
/**
* Select this node.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.select = function () {
var node = this;
if (!node.selected() && node.selectable()) {
// Batch selection changes
dom.batch();
node.focus();
if (tree.canAutoDeselect()) {
var oldVal = tree.config.selection.require;
tree.config.selection.require = false;
tree.deselectDeep();
tree.config.selection.require = oldVal;
}
node.itree.state.selected = true;
if (tree.config.selection.autoSelectChildren) {
if (node.hasChildren()) {
node.children.recurseDown(function (child) {
baseStateChange('selected', true, 'selected', child);
});
}
if (tree.config.showCheckboxes && node.hasParent()) {
node.getParent().refreshIndeterminateState();
}
}
// Cache as the last selected node
lastSelectedNode = node;
// Emit this event
tree.emit('node.selected', node);
// Mark hierarchy dirty and apply
node.markDirty();
dom.end();
}
return node;
};
/**
* Get if node selectable.
*
* @category TreeNode
* @return {boolean} If node selectable.
*/
TreeNode.prototype.selectable = function () {
var allow = tree.config.selection.allow(this);
return typeof allow === 'boolean' ? allow : this.itree.state.selectable;
};
/**
* Get if node selected.
*
* @category TreeNode
* @return {boolean} If selected.
*/
TreeNode.prototype.selected = function () {
return this.itree.state.selected;
};
/**
* Set a root property on this node.
*
* @category TreeNode
* @param {string|number} property Property name.
* @param {*} value New value.
* @return {TreeNode} Node object.
*/
TreeNode.prototype.set = function (property, value) {
this[property] = value;
this.markDirty();
return this;
};
/**
* Show this node.
*
* @category TreeNode
* @param {boolean} selectable Selectable state.
* @return {TreeNode} Node object.
*/
TreeNode.prototype.setSelectable = function (selectable) {
return baseStateChange('selectable', selectable, 'selectability-changed', this);
};
/**
* Show this node.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.show = function () {
return baseStateChange('hidden', false, 'shown', this);
};
/**
* Mark this node as "removed" without actually removing it.
*
* Expand/show methods will never reveal this node until restored.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.softRemove = function () {
return baseStateChange('removed', true, 'softremoved', this, 'softRemove');
};
/**
* Toggles collapsed state.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.toggleCollapse = function () {
return this.collapsed() ? this.expand() : this.collapse();
};
/**
* Toggles selected state.
*
* @category TreeNode
* @return {TreeNode} Node object.
*/
TreeNode.prototype.toggleSelect = function () {
return this.selected() ? this.deselect() : this.select();
};
/**
* Export this node as a native Object.
*
* @category TreeNode
* @return {object} Node object.
*/
TreeNode.prototype.toObject = function () {
var object = {};
(0, _each3.default)(this, function (value, property) {
object[property] = value;
});
if (this.hasChildren() && (0, _isFunction3.default)(this.children.toArray)) {
object.children = this.children.toArray();
}
return object;
};
/**
* Checks whether a node is visible to a user. Returns false
* if it's hidden, or if any ancestor is hidden or collapsed.
*
* @category TreeNode
* @param {object} node Node object.
* @return {boolean} Whether visible.
*/
TreeNode.prototype.visible = function () {
var node = this;
var isVisible = true;
if (node.hidden() || node.removed()) {
isVisible = false;
} else if (node.hasParent()) {
if (node.getParent().collapsed()) {
isVisible = false;
} else {
isVisible = node.getParent().visible();
}
} else {
isVisible = true;
}
return isVisible;
};
/**
* An Array-like collection of TreeNodes.
*
* @category TreeNodes
* @param {array} array Array of TreeNode objects.
* @return {TreeNodes} Collection of TreeNode
*/
function TreeNodes(array) {
var treeNodes = this;
if ((0, _isArray3.default)(array)) {
(0, _each3.default)(array, function (node) {
treeNodes.push(node);
});
}
};
TreeNodes.prototype = Object.create(Array.prototype);
TreeNodes.prototype.constructor = TreeNodes;
/**
* Adds a new node to this collection. If a sort
* method is configured, the node will be added
* in the appropriate order.
*
* @category TreeNodes
* @param {object} object Node
* @return {TreeNode} Node object.
*/
TreeNodes.prototype.addNode = function (object) {
// Base insertion index
var index = this.length;
// If tree is sorted, insert in correct position
if (tree.config.sort) {
index = (0, _sortedIndexBy3.default)(this, object, tree.config.sort);
}
return this.insertAt(index, object);
};
/**
* Clones (deep) the array of nodes.
*
* Note: Cloning will *not* clone the context pointer.
*
* @category TreeNodes
* @return {TreeNodes} Array of cloned nodes.
*/
TreeNodes.prototype.clone = function () {
var newNodes = new TreeNodes();
(0, _each3.default)(this, function (node) {
newNodes.push(node.clone());
});
return newNodes;
};
/**
* Concat nodes like an Array would.
*
* @category TreeNodes
* @param {TreeNodes} nodes Array of nodes.
* @return {TreeNodes} Resulting node array.
*/
TreeNodes.prototype.concat = function (nodes) {
var newNodes = new TreeNodes();
newNodes._context = this._context;
var pusher = function pusher(node) {
newNodes.push(node);
};
(0, _each3.default)(this, pusher);
(0, _each3.default)(nodes, pusher);
return newNodes;
};
/**
* Get the context of this collection. If a collection
* of children, context is the parent node. Otherwise
* the context is the tree itself.
*
* @category TreeNodes
* @return {TreeNode|object} Node object or tree instance.
*/
TreeNodes.prototype.context = function () {
return this._context || tree;
};
/**
* Copies nodes to a new tree instance.
*
* @category TreeNodes
* @param {boolean} hierarchy Include necessary ancestors to match hierarchy.
* @return {object} Methods to perform action on copied nodes.
*/
TreeNodes.prototype.copy = function (hierarchy) {
var nodes = this;
return {
/**
* Sets a destination.
*
* @category CopyNode
* @param {object} dest Destination Inspire Tree.
* @return {array} Array of new nodes.
*/
to: function to(dest) {
if (!(0, _isFunction3.default)(dest.addNodes)) {
throw new Error('Destination must be an Inspire Tree instance.');
}
var newNodes = new TreeNodes();
(0, _each3.default)(nodes, function (node) {
newNodes.push(node.copy(hierarchy).to(dest));
});
return newNodes;
}
};
};
/**
* Returns deepest nodes from this array.
*
* @category TreeNodes
* @return {TreeNodes} Array of node objects.
*/
TreeNodes.prototype.deepest = function () {
var matches = new TreeNodes();
this.recurseDown(function (node) {
if (!node.children) {
matches.push(node);
}
});
return matches;
};
/**
* Iterate every TreeNode in this collection.
*
* @category TreeNodes
* @param {function} iteratee Iteratee invoke for each node.
* @return {TreeNodes} Array of node objects.
*/
TreeNodes.prototype.each = function (iteratee) {
(0, _each3.default)(this, iteratee);
return this;
};
/**
* Recursively expands all nodes, loading all dynamic calls.
*
* @category TreeNodes
* @return {Promise} Promise resolved only when all children have loaded and expanded.
*/
TreeNodes.prototype.expandDeep = function () {
var nodes = this;
return new _es6Promise.Promise(function (resolve) {
var waitCount = 0;
var done = function done() {
if (--waitCount === 0) {
resolve(nodes);
}
};
nodes.recurseDown(function (node) {
waitCount++;
// Ignore nodes without children
if (node.children) {
node.expand().catch(done).then(function () {
// Manually trigger expansion on newly loaded children
node.children.expandDeep().catch(done).then(done);
});
} else {
done();
}
});
});
};
/**
* Clones an array of node objects and removes any
* itree instance information/state.
*
* @category TreeNodes
* @return {array} Array of node objects.
*/
TreeNodes.prototype.export = function () {
var clones = [];
(0, _each3.default)(this, function (node) {
clones.push(node.export());
});
return clones;
};
/**
* Returns a cloned hierarchy of all nodes matching a predicate.
*
* Because it filters deeply, we must clone all nodes so that we
* don't affect the actual node array.
*
* @category TreeNodes
* @param {string|function} predicate State flag or custom function.
* @return {TreeNodes} Array of node objects.
*/
TreeNodes.prototype.extract = function (predicate) {
var flat = this.flatten(predicate);
var matches = new TreeNodes();
(0, _each3.default)(flat, function (node) {
matches.push(node.copyHierarchy());
});
return matches;
};
/**
* Returns nodes which match a predicate.
*
* @category TreeNodes
* @param {string|function} predicate State flag or custom function.
* @return {TreeNodes} Array of node objects.
*/
TreeNodes.prototype.filter = function (predicate) {
var fn = getPredicateFunction(predicate);
var matches = new TreeNodes();
(0, _each3.default)(this, function (node) {
if (fn(node)) {
matches.push(node);
}
});
return matches;
};
/**
* Flattens a hierarchy, returning only node(s) matching the
* expected state or predicate function.
*
* @category TreeNodes
* @param {string|function} predicate State property or custom function.
* @return {TreeNodes} Flat array of matching nodes.
*/
TreeNodes.prototype.flatten = function (predicate) {
var flat = new TreeNodes();
var fn = getPredicateFunction(predicate);
this.recurseDown(function (node) {
if (fn(node)) {
flat.push(node);
}
});
return flat;
};
/**
* Get a specific node in the collection, or undefined if it doesn't exist.
*
* @category TreeNodes
* @param {int} index Numeric index of requested node.
* @return {TreeNode} Node object. Undefined if invalid index.
*/
TreeNodes.prototype.get = function (index) {
return this[index];
};
/**
* Insert a new node at a given position.
*
* @category TreeNodes
* @param {integer} index Index at which to insert the node.
* @param {object} object Raw node object or TreeNode.
* @return {TreeNode} Node object.
*/
TreeNodes.prototype.insertAt = function (index, object) {
// If node has a pre-existing ID
if (object.id) {
// Is it already in the tree?
var existingNode = tree.node(object.id);
if (existingNode) {
existingNode.restore().show();
// Merge children
if ((0, _isArrayLike3.default)(object.children)) {
// Setup existing node's children property if needed
if (!(0, _isArrayLike3.default)(existingNode.children)) {
existingNode.children = new TreeNodes();
existingNode.children._context = existing;
}
// Copy each child (using addNode, which uses insertAt)
(0, _each3.default)(object.children, function (child) {
existingNode.children.addNode(child);
});
}
// Merge truthy children
else if (object.children) {
existingNode.children = object.children;
}
existingNode.markDirty();
dom.applyChanges();
// Node merged, return it.
return existingNode;
}
}
// Node is new, insert at given location.
var node = tree.isNode(object) ? object : objectToModel(object);
// Insert
this.splice(index, 0, node);
// Refresh parent state and mark dirty
if (this._context) {
node.itree.parent = this._context;
this._context.refreshIndeterminateState().markDirty();
}
// Event
tree.emit('node.added', node);
node.markDirty();
dom.applyChanges();
return node;
};
/**
* Iterate down all nodes and any children.
*
* @category TreeNodes
* @param {function} iteratee Iteratee function.
* @return {TreeNodes} Resulting nodes.
*/
TreeNodes.prototype.recurseDown = function (iteratee) {
recurseDown(this, iteratee);
return this;
};
/**
* Sorts all TreeNode objects in this collection.
*
* If no custom sorter given, the configured "sort" value will be used.
*
* @category TreeNodes
* @param {string|function} sorter Sort function or property name.
* @return {TreeNodes} Array of node obejcts.
*/
TreeNodes.prototype.sort = function (sorter) {
var nodes = this;
sorter = sorter || tree.config.sort;
// Only apply sort if one provided
if (sorter) {
var sorted = (0, _sortBy3.default)(nodes, sorter);
nodes.length = 0;
(0, _each3.default)(sorted, function (node) {
nodes.push(node);
});
}
return nodes;
};
/**
* Chained method for returning a chain to the tree context.
*
* @category TreeNodes
* @return {[type]} [description]
*/
TreeNodes.prototype.tree = function () {
return tree;
};
/**
* Returns a native Array of nodes.
*
* @category TreeNodes
* @return {array} Array of node objects.
*/
TreeNodes.prototype.toArray = function () {
var array = [];
(0, _each3.default)(this, function (node) {
array.push(node.toObject());
});
return array;
};
/**
* Map shallow to each TreeNode
*
* @private
* @param {string} method Method name.
* @return {void}
*/
function mapToEach(method) {
TreeNodes.prototype[method] = function () {
dom.batch();
(0, _each3.default)(this, function (node) {
node[method]();
});
dom.end();
return this;
};
}
/**
* Map deeply to all TreeNodes and children
*
* @private
* @param {string} method Method name.
* @return {void}
*/
function mapToEachDeeply(method) {
TreeNodes.prototype[method + 'Deep'] = function () {
dom.batch();
this.recurseDown(function (node) {
node[method]();
});
dom.end();
return this;
};
}
// Methods we can map to each/deeply TreeNode
var mapped = ['blur', 'collapse', 'deselect', 'hide', 'restore', 'select', 'setSelectable', 'show'];
(0, _each3.default)(mapped, function (method) {
mapToEach(method);
mapToEachDeeply(method);
});
// Methods we can map to each TreeNode
(0, _each3.default)(['clean', 'expand', 'expandParents', 'softRemove'], mapToEach);
// Predicate methods we can map
(0, _each3.default)(['available', 'collapsed', 'expanded', 'focused', 'hidden', 'removed', 'selectable', 'selected', 'visible'], function (state) {
TreeNodes.prototype[state] = function (full) {
if (full) {
return this.extract(state);
}
// Cache a state predicate function
var fn = getPredicateFunction(state);
return this.flatten(function (node) {
// Never include removed nodes unless specifically requested
if (state !== 'removed' && node.removed()) {
return false;
}
return fn(node);
});
};
});
/**
* Stores repetitive state change logic for most state methods.
*
* @private
* @param {string} prop State property name.
* @param {boolean} value New state value.
* @param {string} verb Verb used for events.
* @param {TreeNode} node Node object.
* @param {string} deep Optional name of state method to call recursively.
* @return {TreeNode} Node object.
*/
function baseStateChange(prop, value, verb, node, deep) {
if (node.itree.state[prop] !== value) {
if (tree.config.nodes.resetStateOnRestore && verb === 'restored') {
resetState(node);
}
node.itree.state[prop] = value;
tree.emit('node.' + verb, node);
if (deep && node.hasChildren()) {
node.getChildren().recurseDown(function (child) {
child[deep]();
});
}
node.markDirty();
dom.applyChanges();
}
return node;
}
/**
* Parses a raw collection of objects into a model used
* within a tree. Adds state and other internal properties.
*
* @private
* @param {array|object} array Array of nodes
* @param {object} parent Pointer to parent object
* @return {array|object} Object model.
*/
function collectionToModel(array, parent) {
var collection = new TreeNodes();
// Sort
if (tree.config.sort) {
array = (0, _sortBy3.default)(array, tree.config.sort);
}
(0, _each3.default)(array, function (node) {
collection.push(objectToModel(node, parent));
});
collection._context = parent;
return collection;
};
/**
* Creates a predicate function.
*
* @private
* @param {string|function} predicate Property name or custom function.
* @return {function} Predicate function.
*/
function getPredicateFunction(predicate) {
var fn = predicate;
if (typeof predicate === 'string') {
fn = function fn(node) {
return (0, _isFunction3.default)(node[predicate]) ? node[predicate]() : node[predicate];
};
}
return fn;
}
/**
* Parse a raw object into a model used within a tree.
*
* Note: Uses native js over lodash where performance
* benefits most, since this handles every node.
*
* @private
* @param {object} object Source object
* @param {object} parent Pointer to parent object.
* @return {object} Final object
*/
function objectToModel(object, parent) {
// Create or type-ensure ID
object.id = object.id || (0, _cuid2.default)();
if (typeof object.id !== 'string') {
object.id = object.id.toString();
}
// High-performance default assignments
var itree = object.itree = object.itree || {};
itree.icon = itree.icon || false;
var li = itree.li = itree.li || {};
li.attributes = li.attributes || {};
var state = itree.state = itree.state || {};
// Enabled by default
state.collapsed = typeof state.collapsed === 'boolean' ? state.collapsed : defaultState.collapsed;
state.selectable = typeof state.selectable === 'boolean' ? state.selectable : defaultState.selectable;
// Disabled by default
state.focused = state.focused || defaultState.focused;
state.hidden = state.hidden || defaultState.hidden;
state.indeterminate = state.indeterminate || defaultState.indeterminate;
state.loading = state.loading || defaultState.loading;
state.removed = state.removed || defaultState.removed;
state.selected = state.selected || defaultState.selected;
// Save parent, if any.
object.itree.parent = parent;
// Wrap
object = (0, _assign3.default)(new TreeNode(), object);
if (object.hasChildren()) {
object.children = collectionToModel(object.children, object);
}
// Fire events for pre-set states, if enabled
if (allowsLoadEvents) {
(0, _each3.default)(tree.config.allowLoadEvents, function (eventName) {
if (state[eventName]) {
tree.emit('node.' + eventName, object);
}
});
}
return object;
};
/**
* Base recursion function for a collection or node.
*
* Returns false if execution should cease.
*
* @private
* @param {TreeNode|TreeNodes} obj Node or collection.
* @param {function} iteratee Iteratee function
* @return {boolean} Cease iteration.
*/
function recurseDown(obj, iteratee) {
var res;
if ((0, _isArrayLike3.default)(obj)) {
(0, _each3.default)(obj, function (node) {
res = recurseDown(node, iteratee);
return res;
});
} else {
res = iteratee(obj);
// Recurse children
if (res !== false && obj.hasChildren()) {
res = recurseDown(obj.children, iteratee);
}
}
return res;
}
/**
* Reset a node's state to the tree default.
*
* @private
* @param {TreeNode} node Node object.
* @returns {TreeNode} Node object.
*/
function resetState(node) {
(0, _each3.default)(defaultState, function (val, prop) {
node.itree.state[prop] = val;
});
return node;
}
var model = new TreeNodes();
// Map some model.TreeNodes method to the tree to make life easier for users
for (var method in TreeNodes.prototype) {
if (method !== 'constructor' && !tree[method] && (0, _isFunction3.default)(TreeNodes.prototype[method])) {
(function (methodName) {
tree[methodName] = function () {
return model[methodName].apply(model, arguments);
};
})(method);
}
}
/**
* Resolve promise-like objects consistently.
*
* @private
* @param {object} promise Promise-like object.
* @returns {Promise} Promise
*/
function standardizePromise(promise) {
return new _es6Promise.Promise(function (resolve, reject) {
if (!(0, _isObject3.default)(promise)) {
return reject(new Error('Invalid Promise'));
}
if ((0, _isFunction3.default)(promise.then)) {
promise.then(resolve);
}
// jQuery promises use "error"
if ((0, _isFunction3.default)(promise.error)) {
promise.error(reject);
} else if ((0, _isFunction3.default)(promise.catch)) {
promise.catch(reject);
}
});
};
/**
* Add nodes.
*
* @category Tree
* @param {array} nodes Array of node objects.
* @return {TreeNodes} Added node objects.
*/
tree.addNodes = function (nodes) {
dom.batch();
var newNodes = new TreeNodes();
(0, _each3.default)(nodes, function (node) {
newNodes.push(tree.addNode(node));
});
dom.end();
return newNodes;
};
/**
* Compares any number of TreeNode objects and returns
* the minimum and maximum (starting/ending) nodes.
*
* @category Tree
* @return {array} Array with two TreeNode objects.
*/
tree.boundingNodes = function () {
var pathMap = (0, _transform3.default)(arguments, function (map, node) {
map[node.indexPath().replace(/\./g, '')] = node;
}, {});
var paths = (0, _sortBy3.default)(Object.keys(pathMap));
return [(0, _get3.default)(pathMap, (0, _head3.default)(paths)), (0, _get3.default)(pathMap, (0, _tail3.default)(paths))];
};
/**
* Get if the tree will auto-deselect currently selected nodes
* when a new selection is made.
*
* @category Tree
* @return {boolean} If tree will auto-deselect nodes.
*/
tree.canAutoDeselect = function () {
return tree.config.selection.autoDeselect && !preventDeselection;
};
/**
* Shows all nodes and collapses parents.
*
* @category Tree
* @return {Tree} Tree instance.
*/
tree.clearSearch = function () {
return tree.showDeep().collapseDeep().tree();
};
/**
* Disable auto-deselection of currently selected nodes.
*
* @category Tree
* @return {Tree} Tree instance.
*/
tree.disableDeselection = function () {
if (tree.config.selection.multiple) {
preventDeselection = true;
}
return tree;
};
/**
* Enable auto-deselection of currently selected nodes.
*
* @category Tree
* @return {Tree} Tree instance.
*/
tree.enableDeselection = function () {
preventDeselection = false;
return tree;
};
/**
* Check if an object is a TreeNode.
*
* @category Tree
* @param {object} object Object
* @return {boolean} If object is a TreeNode.
*/
tree.isNode = function (object) {
if (object.constructor) {
return object.constructor.name === 'TreeNode';
}
return false;
};
/**
* Get the most recently selected node, if any.
*
* @category Tree
* @return {TreeNode} Last selected node, or undefined.
*/
tree.lastSelectedNode = function () {
return lastSelectedNode;
};
/**
* Loads tree. Accepts an array or a promise.
*
* @category Tree
* @param {array|function} loader Array of nodes, or promise resolving an array of nodes.
* @return {Promise} Promise resolved upon successful load, rejected on error.
* @example
*
* tree.load($.getJSON('nodes.json'));
*/
tree.load = function (loader) {
return new _es6Promise.Promise(function (resolve, reject) {
var complete = function complete(nodes) {
// Delay event for synchronous loader. Otherwise it fires
// before the user has a chance to listen.
if (!initialized && (0, _isArray3.default)(nodes)) {
setTimeout(function () {
tree.emit('data.loaded', nodes);
});
} else {
tree.emit('data.loaded', nodes);
}
// Clear and call rendering on existing data
if (model.length > 0) {
tree.removeAll();
}
model = collectionToModel(nodes);
if (tree.config.selection.require && !tree.selected().length) {
tree.selectFirstAvailableNode();
}
// Delay event for synchronous loader
if (!initialized && (0, _isArray3.default)(nodes)) {
setTimeout(function () {
tree.emit('model.loaded', model);
});
} else {
tree.emit('model.loaded', model);
}
resolve(model);
dom.applyChanges();
if ((0, _isFunction3.default)(dom.scrollSelectedIntoView)) {
dom.scrollSelectedIntoView();
}
};
var error = function error(err) {
tree.emit('data.loaderror', err);
reject(err);
};
// Data given already as an array
if ((0, _isArrayLike3.default)(loader)) {
complete(loader);
}
// Data loader requires a caller/callback
else if ((0, _isFunction3.default)(loader)) {
var resp = loader(null, complete, error);
// Loader returned its own object
if (resp) {
loader = resp;
}
}
// Data loader is likely a promise
if ((0, _isObject3.default)(loader)) {
standardizePromise(loader).then(complete).catch(error);
} else {
throw new Error('Invalid data loader.');
}
});
};
/*
* Pause events.
*
* @category Tree
* @param {array} events Event names to mute.
* @return {Tree} Tree instance.
*/
tree.mute = function (events) {
if ((0, _isString3.default)(events) || (0, _isArray3.default)(events)) {
muted = (0, _castArray3.default)(events);
} else {
muted = true;
}
return tree;
};
/**
* Get current mute settings.
*
* @category Tree
* @return {boolean|array} Muted events. If all, true.
*/
tree.muted = function () {
return muted;
};
/**
* Get a node.
*
* @category Tree
* @param {string|number} id ID of node.
* @param {TreeNodes} nodes Base collection to search in.
* @return {TreeNode} Node object.
*/
tree.node = function (id, nodes) {
var match;
if ((0, _isNumber3.default)(id)) {
id = id.toString();
}
(nodes || model).recurseDown(function (node) {
if (node.id === id) {
match = node;
return false;
}
});
return match;
};
/**
* Get all nodes in a tree, or nodes for an array of IDs.
*
* @category Tree
* @param {array} refs Array of ID references.
* @return {TreeNodes} Array of node objects.
* @example
*
* var all = tree.nodes()
* var some = tree.nodes([1, 2, 3])
*/
tree.nodes = function (refs) {
var nodes = model;
if ((0, _isArray3.default)(refs)) {
nodes = new TreeNodes();
(0, _each3.default)(refs, function (ref) {
var node = tree.node(ref);
if (node) {
nodes.push(node);
}
});
}
return nodes;
};
/**
* Reloads/re-executes the original data loader.
*
* @category Tree
* @return {Promise} Load method promise.
*/
tree.reload = function () {
return tree.load(opts.data || tree.config.data);
};
/**
* Removes all nodes.
*
* @category Tree
* @return {Tree} Tree instance.
*/
tree.removeAll = function () {
model = new TreeNodes();
dom.applyChanges();
return tree;
};
/**
* Search nodes, showing only those that match and the necessary hierarchy.
*
* @category Tree
* @param {*} query Search string, RegExp, or function.
* @return {TreeNodes} Array of matching node objects.
*/
tree.search = function (query) {
var matches = new TreeNodes();
var custom = tree.config.search;
if ((0, _isFunction3.default)(custom)) {
return custom(query, function resolver(nodes) {
dom.batch();
tree.hideDeep();
(0, _each3.default)(nodes, function (node) {
tree.addNode(node);
});
dom.end();
}, function rejecter(err) {
tree.emit('tree.loaderror', err);
});
}
// Don't search if query empty
if (!query || (0, _isString3.default)(query) && (0, _isEmpty3.default)(query)) {
return tree.clearSearch();
}
if ((0, _isString3.default)(query)) {
query = new RegExp(query, 'i');
}
var predicate;
if ((0, _isRegExp3.default)(query)) {
predicate = function predicate(node) {
return query.test(node.text);
};
} else {
predicate = query;
}
dom.batch();
model.recurseDown(function (node) {
if (!node.removed()) {
var match = predicate(node);
var wasHidden = node.hidden();
node.itree.state.hidden = !match;
// If hidden state will change
if (wasHidden !== node.hidden()) {
node.markDirty();
}
if (match) {
matches.push(node);
node.expandParents();
}
}
});
dom.end();
return matches;
};
/**
* Select all nodes between a start and end node.
* Starting node must have a higher index path so we can work down to endNode.
*
* @category Tree
* @param {TreeNode} startNode Starting node
* @param {TreeNode} endNode Ending node
* @return {Tree} Tree instance.
*/
tree.selectBetween = function (startNode, endNode) {
dom.batch();
var node = startNode.nextVisibleNode();
while (node) {
if (node.id === endNode.id) {
break;
}
node.select();
node = node.nextVisibleNode();
}
dom.end();
return tree;
};
/**
* Select the first available node at the root level.
*
* @category Tree
* @return {TreeNode} Selected node object.
*/
tree.selectFirstAvailableNode = function () {
var node = model.filter('available').get(0);
if (node) {
node.select();
}
return node;
};
/**
* Resume events.
*
* @category Tree
* @param {array} events Events to unmute.
* @return {Tree} Tree instance.
*/
tree.unmute = function (events) {
// Diff array and set to false if we're now empty
if ((0, _isString3.default)(events) || (0, _isArray3.default)(events)) {
muted = (0, _difference3.default)(muted, (0, _castArray3.default)(events));
if (!muted.length) {
muted = false;
}
} else {
muted = false;
}
return tree;
};
// Connect to our target DOM element
dom.attach(tree.config.target);
// Load initial user data
tree.load(tree.config.data);
initialized = true;
return tree;
};
// Mixin EventEmitter
InspireTree.prototype = Object.create(_eventemitter2.default.prototype);
module.exports = InspireTree;
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseDifference = __webpack_require__(2),
baseFlatten = __webpack_require__(41),
isArrayLikeObject = __webpack_require__(45),
rest = __webpack_require__(52);
/**
* Creates an array of unique `array` values not included in the other given
* arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons. The order of result values is determined by the
* order they occur in the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.difference([3, 2, 1], [4, 2]);
* // => [3, 1]
*/
var difference = rest(function (array, values) {
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
});
module.exports = difference;
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var SetCache = __webpack_require__(3),
arrayIncludes = __webpack_require__(34),
arrayIncludesWith = __webpack_require__(37),
arrayMap = __webpack_require__(38),
baseUnary = __webpack_require__(39),
cacheHas = __webpack_require__(40);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
} else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer: while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
} else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
module.exports = baseDifference;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var MapCache = __webpack_require__(4),
cachePush = __webpack_require__(33);
/**
*
* Creates a set cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values ? values.length : 0;
this.__data__ = new MapCache();
while (++index < length) {
this.push(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.push = cachePush;
module.exports = SetCache;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var mapClear = __webpack_require__(5),
mapDelete = __webpack_require__(18),
mapGet = __webpack_require__(25),
mapHas = __webpack_require__(28),
mapSet = __webpack_require__(30);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function MapCache(values) {
var index = -1,
length = values ? values.length : 0;
this.clear();
while (++index < length) {
var entry = values[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapClear;
MapCache.prototype['delete'] = mapDelete;
MapCache.prototype.get = mapGet;
MapCache.prototype.has = mapHas;
MapCache.prototype.set = mapSet;
module.exports = MapCache;
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Hash = __webpack_require__(6),
Map = __webpack_require__(14);
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapClear() {
this.__data__ = {
'hash': new Hash(),
'map': Map ? new Map() : [],
'string': new Hash()
};
}
module.exports = mapClear;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var nativeCreate = __webpack_require__(7);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Creates a hash object.
*
* @private
* @constructor
* @returns {Object} Returns the new hash object.
*/
function Hash() {}
// Avoid inheriting from `Object.prototype` when possible.
Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
module.exports = Hash;
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getNative = __webpack_require__(8);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isNative = __webpack_require__(9);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = object[key];
return isNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isFunction = __webpack_require__(10),
isHostObject = __webpack_require__(12),
isObject = __webpack_require__(11),
toSource = __webpack_require__(13);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
/**
* Checks if `value` is a native function.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (!isObject(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = isNative;
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isObject = __webpack_require__(11);
/** `Object#toString` result references. */
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors,
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
module.exports = isFunction;
/***/ },
/* 11 */
/***/ function(module, exports) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
return !!value && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ },
/* 12 */
/***/ function(module, exports) {
'use strict';
/**
* Checks if `value` is a host object in IE < 9.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
*/
function isHostObject(value) {
// Many host objects are `Object` objects that can coerce to strings
// despite having improperly defined `toString` methods.
var result = false;
if (value != null && typeof value.toString != 'function') {
try {
result = !!(value + '');
} catch (e) {}
}
return result;
}
module.exports = isHostObject;
/***/ },
/* 13 */
/***/ function(module, exports) {
'use strict';
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to process.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return func + '';
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getNative = __webpack_require__(8),
root = __webpack_require__(15);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module, global) {'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var checkGlobal = __webpack_require__(17);
/** Used to determine if values are of the language type `Object`. */
var objectTypes = {
'function': true,
'object': true
};
/** Detect free variable `exports`. */
var freeExports = objectTypes[ false ? 'undefined' : _typeof(exports)] && exports && !exports.nodeType ? exports : undefined;
/** Detect free variable `module`. */
var freeModule = objectTypes[ false ? 'undefined' : _typeof(module)] && module && !module.nodeType ? module : undefined;
/** Detect free variable `global` from Node.js. */
var freeGlobal = checkGlobal(freeExports && freeModule && (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global);
/** Detect free variable `self`. */
var freeSelf = checkGlobal(objectTypes[typeof self === 'undefined' ? 'undefined' : _typeof(self)] && self);
/** Detect free variable `window`. */
var freeWindow = checkGlobal(objectTypes[typeof window === 'undefined' ? 'undefined' : _typeof(window)] && window);
/** Detect `this` as the global object. */
var thisGlobal = checkGlobal(objectTypes[_typeof(undefined)] && undefined);
/**
* Used as a reference to the global object.
*
* The `this` value is used if it's the global object to avoid Greasemonkey's
* restricted `window` object, otherwise the `window` object is used.
*/
var root = freeGlobal || freeWindow !== (thisGlobal && thisGlobal.window) && freeWindow || freeSelf || thisGlobal || Function('return this')();
module.exports = root;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)(module), (function() { return this; }())))
/***/ },
/* 16 */
/***/ function(module, exports) {
"use strict";
module.exports = function (module) {
if (!module.webpackPolyfill) {
module.deprecate = function () {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
};
/***/ },
/* 17 */
/***/ function(module, exports) {
"use strict";
/**
* Checks if `value` is a global object.
*
* @private
* @param {*} value The value to check.
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
*/
function checkGlobal(value) {
return value && value.Object === Object ? value : null;
}
module.exports = checkGlobal;
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Map = __webpack_require__(14),
assocDelete = __webpack_require__(19),
hashDelete = __webpack_require__(22),
isKeyable = __webpack_require__(24);
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapDelete(key) {
var data = this.__data__;
if (isKeyable(key)) {
return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map['delete'](key) : assocDelete(data.map, key);
}
module.exports = mapDelete;
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocIndexOf = __webpack_require__(20);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the associative array.
*
* @private
* @param {Array} array The array to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function assocDelete(array, key) {
var index = assocIndexOf(array, key);
if (index < 0) {
return false;
}
var lastIndex = array.length - 1;
if (index == lastIndex) {
array.pop();
} else {
splice.call(array, index, 1);
}
return true;
}
module.exports = assocDelete;
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var eq = __webpack_require__(21);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to search.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ },
/* 21 */
/***/ function(module, exports) {
"use strict";
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'user': 'fred' };
* var other = { 'user': 'fred' };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || value !== value && other !== other;
}
module.exports = eq;
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var hashHas = __webpack_require__(23);
/**
* Removes `key` and its value from the hash.
*
* @private
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(hash, key) {
return hashHas(hash, key) && delete hash[key];
}
module.exports = hashDelete;
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var nativeCreate = __webpack_require__(7);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @param {Object} hash The hash to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(hash, key) {
return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
}
module.exports = hashHas;
/***/ },
/* 24 */
/***/ function(module, exports) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
return type == 'number' || type == 'boolean' || type == 'string' && value != '__proto__' || value == null;
}
module.exports = isKeyable;
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Map = __webpack_require__(14),
assocGet = __webpack_require__(26),
hashGet = __webpack_require__(27),
isKeyable = __webpack_require__(24);
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapGet(key) {
var data = this.__data__;
if (isKeyable(key)) {
return hashGet(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map.get(key) : assocGet(data.map, key);
}
module.exports = mapGet;
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocIndexOf = __webpack_require__(20);
/**
* Gets the associative array value for `key`.
*
* @private
* @param {Array} array The array to query.
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function assocGet(array, key) {
var index = assocIndexOf(array, key);
return index < 0 ? undefined : array[index][1];
}
module.exports = assocGet;
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var nativeCreate = __webpack_require__(7);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @param {Object} hash The hash to query.
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(hash, key) {
if (nativeCreate) {
var result = hash[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
}
module.exports = hashGet;
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Map = __webpack_require__(14),
assocHas = __webpack_require__(29),
hashHas = __webpack_require__(23),
isKeyable = __webpack_require__(24);
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapHas(key) {
var data = this.__data__;
if (isKeyable(key)) {
return hashHas(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map.has(key) : assocHas(data.map, key);
}
module.exports = mapHas;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocIndexOf = __webpack_require__(20);
/**
* Checks if an associative array value for `key` exists.
*
* @private
* @param {Array} array The array to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function assocHas(array, key) {
return assocIndexOf(array, key) > -1;
}
module.exports = assocHas;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Map = __webpack_require__(14),
assocSet = __webpack_require__(31),
hashSet = __webpack_require__(32),
isKeyable = __webpack_require__(24);
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapSet(key, value) {
var data = this.__data__;
if (isKeyable(key)) {
hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
} else if (Map) {
data.map.set(key, value);
} else {
assocSet(data.map, key, value);
}
return this;
}
module.exports = mapSet;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocIndexOf = __webpack_require__(20);
/**
* Sets the associative array `key` to `value`.
*
* @private
* @param {Array} array The array to modify.
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
*/
function assocSet(array, key, value) {
var index = assocIndexOf(array, key);
if (index < 0) {
array.push([key, value]);
} else {
array[index][1] = value;
}
}
module.exports = assocSet;
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var nativeCreate = __webpack_require__(7);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
*/
function hashSet(hash, key, value) {
hash[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
}
module.exports = hashSet;
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isKeyable = __webpack_require__(24);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Adds `value` to the set cache.
*
* @private
* @name push
* @memberOf SetCache
* @param {*} value The value to cache.
*/
function cachePush(value) {
var map = this.__data__;
if (isKeyable(value)) {
var data = map.__data__,
hash = typeof value == 'string' ? data.string : data.hash;
hash[value] = HASH_UNDEFINED;
} else {
map.set(value, HASH_UNDEFINED);
}
}
module.exports = cachePush;
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIndexOf = __webpack_require__(35);
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} array The array to search.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
return !!array.length && baseIndexOf(array, value, 0) > -1;
}
module.exports = arrayIncludes;
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var indexOfNaN = __webpack_require__(36);
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to search.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
if (value !== value) {
return indexOfNaN(array, fromIndex);
}
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = baseIndexOf;
/***/ },
/* 36 */
/***/ function(module, exports) {
"use strict";
/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
*
* @private
* @param {Array} array The array to search.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched `NaN`, else `-1`.
*/
function indexOfNaN(array, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 0 : -1);
while (fromRight ? index-- : ++index < length) {
var other = array[index];
if (other !== other) {
return index;
}
}
return -1;
}
module.exports = indexOfNaN;
/***/ },
/* 37 */
/***/ function(module, exports) {
"use strict";
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} array The array to search.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
module.exports = arrayIncludesWith;
/***/ },
/* 38 */
/***/ function(module, exports) {
"use strict";
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ },
/* 39 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.unary` without support for storing wrapper metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new function.
*/
function baseUnary(func) {
return function (value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isKeyable = __webpack_require__(24);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Checks if `value` is in `cache`.
*
* @private
* @param {Object} cache The set cache to search.
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function cacheHas(cache, value) {
var map = cache.__data__;
if (isKeyable(value)) {
var data = map.__data__,
hash = typeof value == 'string' ? data.string : data.hash;
return hash[value] === HASH_UNDEFINED;
}
return map.has(value);
}
module.exports = cacheHas;
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arrayPush = __webpack_require__(42),
isFlattenable = __webpack_require__(43);
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
module.exports = baseFlatten;
/***/ },
/* 42 */
/***/ function(module, exports) {
"use strict";
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
module.exports = arrayPush;
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArguments = __webpack_require__(44),
isArray = __webpack_require__(51),
isArrayLikeObject = __webpack_require__(45);
/**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
}
module.exports = isFlattenable;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArrayLikeObject = __webpack_require__(45);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
module.exports = isArguments;
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArrayLike = __webpack_require__(46),
isObjectLike = __webpack_require__(50);
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
module.exports = isArrayLikeObject;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getLength = __webpack_require__(47),
isFunction = __webpack_require__(10),
isLength = __webpack_require__(49);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(getLength(value)) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseProperty = __webpack_require__(48);
/**
* Gets the "length" property value of `object`.
*
* **Note:** This function is used to avoid a
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
* Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
* @returns {*} Returns the "length" value.
*/
var getLength = baseProperty('length');
module.exports = getLength;
/***/ },
/* 48 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new function.
*/
function baseProperty(key) {
return function (object) {
return object == null ? undefined : object[key];
};
}
module.exports = baseProperty;
/***/ },
/* 49 */
/***/ function(module, exports) {
'use strict';
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This function is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length,
* else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ },
/* 50 */
/***/ function(module, exports) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object';
}
module.exports = isObjectLike;
/***/ },
/* 51 */
/***/ function(module, exports) {
"use strict";
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @type {Function}
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var apply = __webpack_require__(53),
toInteger = __webpack_require__(54);
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as
* an array.
*
* **Note:** This method is based on the
* [rest parameter](https://mdn.io/rest_parameters).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.rest(function(what, names) {
* return what + ' ' + _.initial(names).join(', ') +
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
* });
*
* say('hello', 'fred', 'barney', 'pebbles');
* // => 'hello fred, barney, & pebbles'
*/
function rest(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = nativeMax(start === undefined ? func.length - 1 : toInteger(start), 0);
return function () {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
switch (start) {
case 0:
return func.call(this, array);
case 1:
return func.call(this, args[0], array);
case 2:
return func.call(this, args[0], args[1], array);
}
var otherArgs = Array(start + 1);
index = -1;
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = array;
return apply(func, this, otherArgs);
};
}
module.exports = rest;
/***/ },
/* 53 */
/***/ function(module, exports) {
"use strict";
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
var length = args.length;
switch (length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var toNumber = __webpack_require__(55);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_INTEGER = 1.7976931348623157e+308;
/**
* Converts `value` to an integer.
*
* **Note:** This function is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3');
* // => 3
*/
function toInteger(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = value < 0 ? -1 : 1;
return sign * MAX_INTEGER;
}
var remainder = value % 1;
return value === value ? remainder ? value - remainder : value : 0;
}
module.exports = toInteger;
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isFunction = __webpack_require__(10),
isObject = __webpack_require__(11),
isSymbol = __webpack_require__(56);
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3);
* // => 3
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3');
* // => 3
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? other + '' : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
module.exports = toNumber;
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var isObjectLike = __webpack_require__(50);
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
}
module.exports = isSymbol;
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isObject = __webpack_require__(11);
/** `Object#toString` result references. */
var regexpTag = '[object RegExp]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `RegExp` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isRegExp(/abc/);
* // => true
*
* _.isRegExp('/abc/');
* // => false
*/
function isRegExp(value) {
return isObject(value) && objectToString.call(value) == regexpTag;
}
module.exports = isRegExp;
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getTag = __webpack_require__(59),
isArguments = __webpack_require__(44),
isArray = __webpack_require__(51),
isArrayLike = __webpack_require__(46),
isBuffer = __webpack_require__(64),
isFunction = __webpack_require__(10),
isObjectLike = __webpack_require__(50),
isString = __webpack_require__(66),
keys = __webpack_require__(67);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
setTag = '[object Set]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
/**
* Checks if `value` is an empty object, collection, map, or set.
*
* Objects are considered empty if they have no own enumerable string keyed
* properties.
*
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
* jQuery-like collections are considered empty if they have a `length` of `0`.
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
* @example
*
* _.isEmpty(null);
* // => true
*
* _.isEmpty(true);
* // => true
*
* _.isEmpty(1);
* // => true
*
* _.isEmpty([1, 2, 3]);
* // => false
*
* _.isEmpty({ 'a': 1 });
* // => false
*/
function isEmpty(value) {
if (isArrayLike(value) && (isArray(value) || isString(value) || isFunction(value.splice) || isArguments(value) || isBuffer(value))) {
return !value.length;
}
if (isObjectLike(value)) {
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
return false;
}
}
return !(nonEnumShadows && keys(value).length);
}
module.exports = isEmpty;
/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var DataView = __webpack_require__(60),
Map = __webpack_require__(14),
Promise = __webpack_require__(61),
Set = __webpack_require__(62),
WeakMap = __webpack_require__(63),
toSource = __webpack_require__(13);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function getTag(value) {
return objectToString.call(value);
}
// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge, and promises in Node.js.
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = function getTag(value) {
var result = objectToString.call(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : undefined;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
module.exports = getTag;
/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getNative = __webpack_require__(8),
root = __webpack_require__(15);
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView');
module.exports = DataView;
/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getNative = __webpack_require__(8),
root = __webpack_require__(15);
/* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise');
module.exports = Promise;
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getNative = __webpack_require__(8),
root = __webpack_require__(15);
/* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set');
module.exports = Set;
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getNative = __webpack_require__(8),
root = __webpack_require__(15);
/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var constant = __webpack_require__(65),
root = __webpack_require__(15);
/** Used to determine if values are of the language type `Object`. */
var objectTypes = {
'function': true,
'object': true
};
/** Detect free variable `exports`. */
var freeExports = objectTypes[ false ? 'undefined' : _typeof(exports)] && exports && !exports.nodeType ? exports : undefined;
/** Detect free variable `module`. */
var freeModule = objectTypes[ false ? 'undefined' : _typeof(module)] && module && !module.nodeType ? module : undefined;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports ? freeExports : undefined;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = !Buffer ? constant(false) : function (value) {
return value instanceof Buffer;
};
module.exports = isBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)(module)))
/***/ },
/* 65 */
/***/ function(module, exports) {
"use strict";
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new function.
* @example
*
* var object = { 'user': 'fred' };
* var getter = _.constant(object);
*
* getter() === object;
* // => true
*/
function constant(value) {
return function () {
return value;
};
}
module.exports = constant;
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArray = __webpack_require__(51),
isObjectLike = __webpack_require__(50);
/** `Object#toString` result references. */
var stringTag = '[object String]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag;
}
module.exports = isString;
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseHas = __webpack_require__(68),
baseKeys = __webpack_require__(70),
indexKeys = __webpack_require__(71),
isArrayLike = __webpack_require__(46),
isIndex = __webpack_require__(73),
isPrototype = __webpack_require__(74);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
var isProto = isPrototype(object);
if (!(isProto || isArrayLike(object))) {
return baseKeys(object);
}
var indexes = indexKeys(object),
skipIndexes = !!indexes,
result = indexes || [],
length = result.length;
for (var key in object) {
if (baseHas(object, key) && !(skipIndexes && (key == 'length' || isIndex(key, length))) && !(isProto && key == 'constructor')) {
result.push(key);
}
}
return result;
}
module.exports = keys;
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var getPrototype = __webpack_require__(69);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
// that are composed entirely of index properties, return `false` for
// `hasOwnProperty` checks of them.
return hasOwnProperty.call(object, key) || (typeof object === 'undefined' ? 'undefined' : _typeof(object)) == 'object' && key in object && getPrototype(object) === null;
}
module.exports = baseHas;
/***/ },
/* 69 */
/***/ function(module, exports) {
"use strict";
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetPrototype = Object.getPrototypeOf;
/**
* Gets the `[[Prototype]]` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {null|Object} Returns the `[[Prototype]]`.
*/
function getPrototype(value) {
return nativeGetPrototype(Object(value));
}
module.exports = getPrototype;
/***/ },
/* 70 */
/***/ function(module, exports) {
"use strict";
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = Object.keys;
/**
* The base implementation of `_.keys` which doesn't skip the constructor
* property of prototypes or treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
return nativeKeys(Object(object));
}
module.exports = baseKeys;
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseTimes = __webpack_require__(72),
isArguments = __webpack_require__(44),
isArray = __webpack_require__(51),
isLength = __webpack_require__(49),
isString = __webpack_require__(66);
/**
* Creates an array of index keys for `object` values of arrays,
* `arguments` objects, and strings, otherwise `null` is returned.
*
* @private
* @param {Object} object The object to query.
* @returns {Array|null} Returns index keys, else `null`.
*/
function indexKeys(object) {
var length = object ? object.length : undefined;
if (isLength(length) && (isArray(object) || isString(object) || isArguments(object))) {
return baseTimes(length, String);
}
return null;
}
module.exports = indexKeys;
/***/ },
/* 72 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
/***/ },
/* 73 */
/***/ function(module, exports) {
'use strict';
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
value = typeof value == 'number' || reIsUint.test(value) ? +value : -1;
length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length;
}
module.exports = isIndex;
/***/ },
/* 74 */
/***/ function(module, exports) {
'use strict';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
return value === proto;
}
module.exports = isPrototype;
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isObjectLike = __webpack_require__(50);
/** `Object#toString` result references. */
var numberTag = '[object Number]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' || isObjectLike(value) && objectToString.call(value) == numberTag;
}
module.exports = isNumber;
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArray = __webpack_require__(51);
/**
* Casts `value` as an array if it's not one.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Lang
* @param {*} value The value to inspect.
* @returns {Array} Returns the cast array.
* @example
*
* _.castArray(1);
* // => [1]
*
* _.castArray({ 'a': 1 });
* // => [{ 'a': 1 }]
*
* _.castArray('abc');
* // => ['abc']
*
* _.castArray(null);
* // => [null]
*
* _.castArray(undefined);
* // => [undefined]
*
* _.castArray();
* // => []
*
* var array = [1, 2, 3];
* console.log(_.castArray(array) === array);
* // => true
*/
function castArray() {
if (!arguments.length) {
return [];
}
var value = arguments[0];
return isArray(value) ? value : [value];
}
module.exports = castArray;
/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var drop = __webpack_require__(78);
/**
* Gets all but the first element of `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.tail([1, 2, 3]);
* // => [2, 3]
*/
function tail(array) {
return drop(array, 1);
}
module.exports = tail;
/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseSlice = __webpack_require__(79),
toInteger = __webpack_require__(54);
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.drop([1, 2, 3]);
* // => [2, 3]
*
* _.drop([1, 2, 3], 2);
* // => [3]
*
* _.drop([1, 2, 3], 5);
* // => []
*
* _.drop([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
var length = array ? array.length : 0;
if (!length) {
return [];
}
n = guard || n === undefined ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
module.exports = drop;
/***/ },
/* 79 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : length + start;
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : end - start >>> 0;
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
module.exports = baseSlice;
/***/ },
/* 80 */
/***/ function(module, exports) {
"use strict";
/**
* Gets the first element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias first
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @example
*
* _.head([1, 2, 3]);
* // => 1
*
* _.head([]);
* // => undefined
*/
function head(array) {
return array && array.length ? array[0] : undefined;
}
module.exports = head;
/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseGet = __webpack_require__(82);
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is used in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
module.exports = get;
/***/ },
/* 82 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var castPath = __webpack_require__(83),
isKey = __webpack_require__(88);
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = isKey(path, object) ? [path] : castPath(path);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[path[index++]];
}
return index && index == length ? object : undefined;
}
module.exports = baseGet;
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArray = __webpack_require__(51),
stringToPath = __webpack_require__(84);
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
module.exports = castPath;
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var memoize = __webpack_require__(85),
toString = __webpack_require__(86);
/** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoize(function (string) {
var result = [];
toString(string).replace(rePropName, function (match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
});
return result;
});
module.exports = stringToPath;
/***/ },
/* 85 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var MapCache = __webpack_require__(4);
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoizing function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || resolver && typeof resolver != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function memoized() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
// Assign cache to `_.memoize`.
memoize.Cache = MapCache;
module.exports = memoize;
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _Symbol = __webpack_require__(87),
isSymbol = __webpack_require__(56);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {string} Returns the string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (value == null) {
return '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
module.exports = toString;
/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var root = __webpack_require__(15);
/** Built-in value references. */
var _Symbol = root.Symbol;
module.exports = _Symbol;
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var isArray = __webpack_require__(51),
isSymbol = __webpack_require__(56);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
if (type == 'number' || type == 'symbol') {
return true;
}
return !isArray(value) && (isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object));
}
module.exports = isKey;
/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arrayEach = __webpack_require__(90),
baseCreate = __webpack_require__(91),
baseForOwn = __webpack_require__(92),
baseIteratee = __webpack_require__(95),
getPrototype = __webpack_require__(69),
isArray = __webpack_require__(51),
isFunction = __webpack_require__(10),
isObject = __webpack_require__(11),
isTypedArray = __webpack_require__(113);
/**
* An alternative to `_.reduce`; this method transforms `object` to a new
* `accumulator` object which is the result of running each of its own
* enumerable string keyed properties thru `iteratee`, with each invocation
* potentially mutating the `accumulator` object. The iteratee is invoked
* with four arguments: (accumulator, value, key, object). Iteratee functions
* may exit iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Object
* @param {Array|Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The custom accumulator value.
* @returns {*} Returns the accumulated value.
* @example
*
* _.transform([2, 3, 4], function(result, n) {
* result.push(n *= n);
* return n % 2 == 0;
* }, []);
* // => [4, 9]
*
* _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] }
*/
function transform(object, iteratee, accumulator) {
var isArr = isArray(object) || isTypedArray(object);
iteratee = baseIteratee(iteratee, 4);
if (accumulator == null) {
if (isArr || isObject(object)) {
var Ctor = object.constructor;
if (isArr) {
accumulator = isArray(object) ? new Ctor() : [];
} else {
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
}
} else {
accumulator = {};
}
}
(isArr ? arrayEach : baseForOwn)(object, function (value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
}
module.exports = transform;
/***/ },
/* 90 */
/***/ function(module, exports) {
"use strict";
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
module.exports = arrayEach;
/***/ },
/* 91 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isObject = __webpack_require__(11);
/** Built-in value references. */
var objectCreate = Object.create;
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} prototype The object to inherit from.
* @returns {Object} Returns the new object.
*/
function baseCreate(proto) {
return isObject(proto) ? objectCreate(proto) : {};
}
module.exports = baseCreate;
/***/ },
/* 92 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseFor = __webpack_require__(93),
keys = __webpack_require__(67);
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
module.exports = baseForOwn;
/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var createBaseFor = __webpack_require__(94);
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
module.exports = baseFor;
/***/ },
/* 94 */
/***/ function(module, exports) {
"use strict";
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function (object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
module.exports = createBaseFor;
/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var baseMatches = __webpack_require__(96),
baseMatchesProperty = __webpack_require__(119),
identity = __webpack_require__(123),
isArray = __webpack_require__(51),
property = __webpack_require__(124);
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object') {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
module.exports = baseIteratee;
/***/ },
/* 96 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIsMatch = __webpack_require__(97),
getMatchData = __webpack_require__(114),
matchesStrictComparable = __webpack_require__(118);
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new function.
*/
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function (object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
module.exports = baseMatches;
/***/ },
/* 97 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Stack = __webpack_require__(98),
baseIsEqual = __webpack_require__(104);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack();
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
return false;
}
}
}
return true;
}
module.exports = baseIsMatch;
/***/ },
/* 98 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var stackClear = __webpack_require__(99),
stackDelete = __webpack_require__(100),
stackGet = __webpack_require__(101),
stackHas = __webpack_require__(102),
stackSet = __webpack_require__(103);
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function Stack(values) {
var index = -1,
length = values ? values.length : 0;
this.clear();
while (++index < length) {
var entry = values[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ },
/* 99 */
/***/ function(module, exports) {
'use strict';
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = { 'array': [], 'map': null };
}
module.exports = stackClear;
/***/ },
/* 100 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocDelete = __webpack_require__(19);
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
array = data.array;
return array ? assocDelete(array, key) : data.map['delete'](key);
}
module.exports = stackDelete;
/***/ },
/* 101 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocGet = __webpack_require__(26);
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
var data = this.__data__,
array = data.array;
return array ? assocGet(array, key) : data.map.get(key);
}
module.exports = stackGet;
/***/ },
/* 102 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assocHas = __webpack_require__(29);
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
var data = this.__data__,
array = data.array;
return array ? assocHas(array, key) : data.map.has(key);
}
module.exports = stackHas;
/***/ },
/* 103 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var MapCache = __webpack_require__(4),
assocSet = __webpack_require__(31);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__,
array = data.array;
if (array) {
if (array.length < LARGE_ARRAY_SIZE - 1) {
assocSet(array, key, value);
} else {
data.array = null;
data.map = new MapCache(array);
}
}
var map = data.map;
if (map) {
map.set(key, value);
}
return this;
}
module.exports = stackSet;
/***/ },
/* 104 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIsEqualDeep = __webpack_require__(105),
isObject = __webpack_require__(11),
isObjectLike = __webpack_require__(50);
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {Function} [customizer] The function to customize comparisons.
* @param {boolean} [bitmask] The bitmask of comparison flags.
* The bitmask may be composed of the following flags:
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, customizer, bitmask, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}
module.exports = baseIsEqual;
/***/ },
/* 105 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Stack = __webpack_require__(98),
equalArrays = __webpack_require__(106),
equalByTag = __webpack_require__(108),
equalObjects = __webpack_require__(112),
getTag = __webpack_require__(59),
isArray = __webpack_require__(51),
isHostObject = __webpack_require__(12),
isTypedArray = __webpack_require__(113);
/** Used to compose bitmasks for comparison styles. */
var PARTIAL_COMPARE_FLAG = 2;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = arrayTag,
othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag && !isHostObject(object),
othIsObj = othTag == objectTag && !isHostObject(other),
isSameTag = objTag == othTag;
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
module.exports = baseIsEqualDeep;
/***/ },
/* 106 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arraySome = __webpack_require__(107);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
var index = -1,
isPartial = bitmask & PARTIAL_COMPARE_FLAG,
isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked) {
return stacked == other;
}
var result = true;
stack.set(array, other);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (isUnordered) {
if (!arraySome(other, function (othValue) {
return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack);
})) {
result = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
result = false;
break;
}
}
stack['delete'](array);
return result;
}
module.exports = equalArrays;
/***/ },
/* 107 */
/***/ function(module, exports) {
"use strict";
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;
/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _Symbol = __webpack_require__(87),
Uint8Array = __webpack_require__(109),
equalArrays = __webpack_require__(106),
mapToArray = __webpack_require__(110),
setToArray = __webpack_require__(111);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
// Coerce dates and booleans to numbers, dates to milliseconds and
// booleans to `1` or `0` treating invalid dates coerced to `NaN` as
// not equal.
return +object == +other;
case errorTag:
return object.name == other.name && object.message == other.message;
case numberTag:
// Treat `NaN` vs. `NaN` as equal.
return object != +object ? other != +other : object == +other;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
// for more details.
return object == other + '';
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= UNORDERED_COMPARE_FLAG;
stack.set(object, other);
// Recursively compare objects (susceptible to call stack limits).
return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;
/***/ },
/* 109 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var root = __webpack_require__(15);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ },
/* 110 */
/***/ function(module, exports) {
"use strict";
/**
* Converts `map` to an array.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the converted array.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function (value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;
/***/ },
/* 111 */
/***/ function(module, exports) {
"use strict";
/**
* Converts `set` to an array.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the converted array.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function (value) {
result[++index] = value;
});
return result;
}
module.exports = setToArray;
/***/ },
/* 112 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseHas = __webpack_require__(68),
keys = __webpack_require__(67);
/** Used to compose bitmasks for comparison styles. */
var PARTIAL_COMPARE_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
* for more details.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : baseHas(other, key))) {
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
var result = true;
stack.set(object, other);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
return result;
}
module.exports = equalObjects;
/***/ },
/* 113 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isLength = __webpack_require__(49),
isObjectLike = __webpack_require__(50);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
function isTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
module.exports = isTypedArray;
/***/ },
/* 114 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isStrictComparable = __webpack_require__(115),
toPairs = __webpack_require__(116);
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = toPairs(object),
length = result.length;
while (length--) {
result[length][2] = isStrictComparable(result[length][1]);
}
return result;
}
module.exports = getMatchData;
/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isObject = __webpack_require__(11);
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject(value);
}
module.exports = isStrictComparable;
/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseToPairs = __webpack_require__(117),
keys = __webpack_require__(67);
/**
* Creates an array of own enumerable string keyed-value pairs for `object`
* which can be consumed by `_.fromPairs`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias entries
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the new array of key-value pairs.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.toPairs(new Foo);
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
*/
function toPairs(object) {
return baseToPairs(object, keys(object));
}
module.exports = toPairs;
/***/ },
/* 117 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arrayMap = __webpack_require__(38);
/**
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
* of key-value pairs for `object` corresponding to the property names of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the new array of key-value pairs.
*/
function baseToPairs(object, props) {
return arrayMap(props, function (key) {
return [key, object[key]];
});
}
module.exports = baseToPairs;
/***/ },
/* 118 */
/***/ function(module, exports) {
"use strict";
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new function.
*/
function matchesStrictComparable(key, srcValue) {
return function (object) {
if (object == null) {
return false;
}
return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
};
}
module.exports = matchesStrictComparable;
/***/ },
/* 119 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIsEqual = __webpack_require__(104),
get = __webpack_require__(81),
hasIn = __webpack_require__(120),
isKey = __webpack_require__(88),
isStrictComparable = __webpack_require__(115),
matchesStrictComparable = __webpack_require__(118);
/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
PARTIAL_COMPARE_FLAG = 2;
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(path, srcValue);
}
return function (object) {
var objValue = get(object, path);
return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
};
}
module.exports = baseMatchesProperty;
/***/ },
/* 120 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseHasIn = __webpack_require__(121),
hasPath = __webpack_require__(122);
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
module.exports = hasIn;
/***/ },
/* 121 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return key in Object(object);
}
module.exports = baseHasIn;
/***/ },
/* 122 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var castPath = __webpack_require__(83),
isArguments = __webpack_require__(44),
isArray = __webpack_require__(51),
isIndex = __webpack_require__(73),
isKey = __webpack_require__(88),
isLength = __webpack_require__(49),
isString = __webpack_require__(66);
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
var result,
index = -1,
length = path.length;
while (++index < length) {
var key = path[index];
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result) {
return result;
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isString(object) || isArguments(object));
}
module.exports = hasPath;
/***/ },
/* 123 */
/***/ function(module, exports) {
"use strict";
/**
* This method returns the first argument given to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'user': 'fred' };
*
* _.identity(object) === object;
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ },
/* 124 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseProperty = __webpack_require__(48),
basePropertyDeep = __webpack_require__(125),
isKey = __webpack_require__(88);
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
}
module.exports = property;
/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseGet = __webpack_require__(82);
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new function.
*/
function basePropertyDeep(path) {
return function (object) {
return baseGet(object, path);
};
}
module.exports = basePropertyDeep;
/***/ },
/* 126 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assignValue = __webpack_require__(127),
copyObject = __webpack_require__(128),
createAssigner = __webpack_require__(129),
isArrayLike = __webpack_require__(46),
isPrototype = __webpack_require__(74),
keys = __webpack_require__(67);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
/**
* Assigns own enumerable string keyed properties of source objects to the
* destination object. Source objects are applied from left to right.
* Subsequent sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object` and is loosely based on
* [`Object.assign`](https://mdn.io/Object/assign).
*
* @static
* @memberOf _
* @since 0.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* function Foo() {
* this.c = 3;
* }
*
* function Bar() {
* this.e = 5;
* }
*
* Foo.prototype.d = 4;
* Bar.prototype.f = 6;
*
* _.assign({ 'a': 1 }, new Foo, new Bar);
* // => { 'a': 1, 'c': 3, 'e': 5 }
*/
var assign = createAssigner(function (object, source) {
if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
assignValue(object, key, source[key]);
}
}
});
module.exports = assign;
/***/ },
/* 127 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var eq = __webpack_require__(21);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
object[key] = value;
}
}
module.exports = assignValue;
/***/ },
/* 128 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assignValue = __webpack_require__(127);
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
assignValue(object, key, newValue);
}
return object;
}
module.exports = copyObject;
/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isIterateeCall = __webpack_require__(130),
rest = __webpack_require__(52);
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return rest(function (object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
module.exports = createAssigner;
/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var eq = __webpack_require__(21),
isArrayLike = __webpack_require__(46),
isIndex = __webpack_require__(73),
isObject = __webpack_require__(11);
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index === 'undefined' ? 'undefined' : _typeof(index);
if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {
return eq(object[index], value);
}
return false;
}
module.exports = isIterateeCall;
/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseFlatten = __webpack_require__(41),
baseOrderBy = __webpack_require__(132),
isArray = __webpack_require__(51),
isFlattenableIteratee = __webpack_require__(139),
isIterateeCall = __webpack_require__(130),
rest = __webpack_require__(52);
/**
* Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection thru each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
* [iteratees=[_.identity]] The iteratees to sort by.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, function(o) { return o.user; });
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
*
* _.sortBy(users, 'user', function(o) {
* return Math.floor(o.age / 10);
* });
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
var sortBy = rest(function (collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
iteratees = iteratees.length == 1 && isArray(iteratees[0]) ? iteratees[0] : baseFlatten(iteratees, 1, isFlattenableIteratee);
return baseOrderBy(collection, iteratees, []);
});
module.exports = sortBy;
/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arrayMap = __webpack_require__(38),
baseIteratee = __webpack_require__(95),
baseMap = __webpack_require__(133),
baseSortBy = __webpack_require__(136),
baseUnary = __webpack_require__(39),
compareMultiple = __webpack_require__(137),
identity = __webpack_require__(123);
/**
* The base implementation of `_.orderBy` without param guards.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
* @param {string[]} orders The sort orders of `iteratees`.
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
var result = baseMap(collection, function (value, key, collection) {
var criteria = arrayMap(iteratees, function (iteratee) {
return iteratee(value);
});
return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return baseSortBy(result, function (object, other) {
return compareMultiple(object, other, orders);
});
}
module.exports = baseOrderBy;
/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseEach = __webpack_require__(134),
isArrayLike = __webpack_require__(46);
/**
* The base implementation of `_.map` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function (value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
module.exports = baseMap;
/***/ },
/* 134 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseForOwn = __webpack_require__(92),
createBaseEach = __webpack_require__(135);
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEach = createBaseEach(baseForOwn);
module.exports = baseEach;
/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArrayLike = __webpack_require__(46);
/**
* Creates a `baseEach` or `baseEachRight` function.
*
* @private
* @param {Function} eachFunc The function to iterate over a collection.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseEach(eachFunc, fromRight) {
return function (collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while (fromRight ? index-- : ++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
module.exports = createBaseEach;
/***/ },
/* 136 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*
* @private
* @param {Array} array The array to sort.
* @param {Function} comparer The function to define sort order.
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
module.exports = baseSortBy;
/***/ },
/* 137 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var compareAscending = __webpack_require__(138);
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
module.exports = compareMultiple;
/***/ },
/* 138 */
/***/ function(module, exports) {
"use strict";
/**
* Compares values to sort them in ascending order.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {number} Returns the sort order indicator for `value`.
*/
function compareAscending(value, other) {
if (value !== other) {
var valIsNull = value === null,
valIsUndef = value === undefined,
valIsReflexive = value === value;
var othIsNull = other === null,
othIsUndef = other === undefined,
othIsReflexive = other === other;
if (value > other && !othIsNull || !valIsReflexive || valIsNull && !othIsUndef && othIsReflexive || valIsUndef && othIsReflexive) {
return 1;
}
if (value < other && !valIsNull || !othIsReflexive || othIsNull && !valIsUndef && valIsReflexive || othIsUndef && valIsReflexive) {
return -1;
}
}
return 0;
}
module.exports = compareAscending;
/***/ },
/* 139 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isArray = __webpack_require__(51),
isFunction = __webpack_require__(10);
/**
* Checks if `value` is a flattenable array and not a `_.matchesProperty`
* iteratee shorthand.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenableIteratee(value) {
return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
}
module.exports = isFlattenableIteratee;
/***/ },
/* 140 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIteratee = __webpack_require__(95),
baseSortedIndexBy = __webpack_require__(141);
/**
* This method is like `_.sortedIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Array|Function|Object|string} [iteratee=_.identity]
* The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
*
* _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
* // => 1
*
* // The `_.property` iteratee shorthand.
* _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, baseIteratee(iteratee));
}
module.exports = sortedIndexBy;
/***/ },
/* 141 */
/***/ function(module, exports) {
"use strict";
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeFloor = Math.floor,
nativeMin = Math.min;
/**
* The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
* which invokes `iteratee` for `value` and each element of `array` to compute
* their sort ranking. The iteratee is invoked with one argument; (value).
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} iteratee The iteratee invoked per element.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
value = iteratee(value);
var low = 0,
high = array ? array.length : 0,
valIsNaN = value !== value,
valIsNull = value === null,
valIsUndef = value === undefined;
while (low < high) {
var mid = nativeFloor((low + high) / 2),
computed = iteratee(array[mid]),
isDef = computed !== undefined,
isReflexive = computed === computed;
if (valIsNaN) {
var setLow = isReflexive || retHighest;
} else if (valIsNull) {
setLow = isReflexive && isDef && (retHighest || computed != null);
} else if (valIsUndef) {
setLow = isReflexive && (retHighest || isDef);
} else if (computed == null) {
setLow = false;
} else {
setLow = retHighest ? computed <= value : computed < value;
}
if (setLow) {
low = mid + 1;
} else {
high = mid;
}
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
module.exports = baseSortedIndexBy;
/***/ },
/* 142 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIteratee = __webpack_require__(95),
basePullAt = __webpack_require__(143);
/**
* Removes all elements from `array` that `predicate` returns truthy for
* and returns an array of the removed elements. The predicate is invoked
* with three arguments: (value, index, array).
*
* **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
* to pull elements from an array by value.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array|Function|Object|string} [predicate=_.identity]
* The function invoked per iteration.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = [1, 2, 3, 4];
* var evens = _.remove(array, function(n) {
* return n % 2 == 0;
* });
*
* console.log(array);
* // => [1, 3]
*
* console.log(evens);
* // => [2, 4]
*/
function remove(array, predicate) {
var result = [];
if (!(array && array.length)) {
return result;
}
var index = -1,
indexes = [],
length = array.length;
predicate = baseIteratee(predicate, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result.push(value);
indexes.push(index);
}
}
basePullAt(array, indexes);
return result;
}
module.exports = remove;
/***/ },
/* 143 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var castPath = __webpack_require__(83),
isIndex = __webpack_require__(73),
isKey = __webpack_require__(88),
last = __webpack_require__(144),
parent = __webpack_require__(145);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* The base implementation of `_.pullAt` without support for individual
* indexes or capturing the removed elements.
*
* @private
* @param {Array} array The array to modify.
* @param {number[]} indexes The indexes of elements to remove.
* @returns {Array} Returns `array`.
*/
function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (lastIndex == length || index != previous) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
} else if (!isKey(index, array)) {
var path = castPath(index),
object = parent(array, path);
if (object != null) {
delete object[last(path)];
}
} else {
delete array[index];
}
}
}
return array;
}
module.exports = basePullAt;
/***/ },
/* 144 */
/***/ function(module, exports) {
"use strict";
/**
* Gets the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the last element of `array`.
* @example
*
* _.last([1, 2, 3]);
* // => 3
*/
function last(array) {
var length = array ? array.length : 0;
return length ? array[length - 1] : undefined;
}
module.exports = last;
/***/ },
/* 145 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseGet = __webpack_require__(82),
baseSlice = __webpack_require__(79);
/**
* Gets the parent value at `path` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path to get the parent value of.
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
}
module.exports = parent;
/***/ },
/* 146 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseSlice = __webpack_require__(79),
isIterateeCall = __webpack_require__(130),
toInteger = __webpack_require__(54);
/**
* Creates a slice of `array` from `start` up to, but not including, `end`.
*
* **Note:** This method is used instead of
* [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
* returned.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function slice(array, start, end) {
var length = array ? array.length : 0;
if (!length) {
return [];
}
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
start = 0;
end = length;
} else {
start = start == null ? 0 : toInteger(start);
end = end === undefined ? length : toInteger(end);
}
return baseSlice(array, start, end);
}
module.exports = slice;
/***/ },
/* 147 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseFindIndex = __webpack_require__(148),
baseIteratee = __webpack_require__(95);
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to search.
* @param {Array|Function|Object|string} [predicate=_.identity]
* The function invoked per iteration.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate) {
return array && array.length ? baseFindIndex(array, baseIteratee(predicate, 3)) : -1;
}
module.exports = findIndex;
/***/ },
/* 148 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to search.
* @param {Function} predicate The function invoked per iteration.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromRight) {
var length = array.length,
index = fromRight ? length : -1;
while (fromRight ? index-- : ++index < length) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
module.exports = baseFindIndex;
/***/ },
/* 149 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseEach = __webpack_require__(134),
baseFind = __webpack_require__(150),
baseFindIndex = __webpack_require__(148),
baseIteratee = __webpack_require__(95),
isArray = __webpack_require__(51);
/**
* Iterates over elements of `collection`, returning the first element
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to search.
* @param {Array|Function|Object|string} [predicate=_.identity]
* The function invoked per iteration.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false },
* { 'user': 'pebbles', 'age': 1, 'active': true }
* ];
*
* _.find(users, function(o) { return o.age < 40; });
* // => object for 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.find(users, { 'age': 1, 'active': true });
* // => object for 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.find(users, ['active', false]);
* // => object for 'fred'
*
* // The `_.property` iteratee shorthand.
* _.find(users, 'active');
* // => object for 'barney'
*/
function find(collection, predicate) {
predicate = baseIteratee(predicate, 3);
if (isArray(collection)) {
var index = baseFindIndex(collection, predicate);
return index > -1 ? collection[index] : undefined;
}
return baseFind(collection, predicate, baseEach);
}
module.exports = find;
/***/ },
/* 150 */
/***/ function(module, exports) {
"use strict";
/**
* The base implementation of methods like `_.find` and `_.findKey`, without
* support for iteratee shorthands, which iterates over `collection` using
* `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to search.
* @param {Function} predicate The function invoked per iteration.
* @param {Function} eachFunc The function to iterate over `collection`.
* @param {boolean} [retKey] Specify returning the key of the found element
* instead of the element itself.
* @returns {*} Returns the found element or its key, else `undefined`.
*/
function baseFind(collection, predicate, eachFunc, retKey) {
var result;
eachFunc(collection, function (value, key, collection) {
if (predicate(value, key, collection)) {
result = retKey ? key : value;
return false;
}
});
return result;
}
module.exports = baseFind;
/***/ },
/* 151 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseEachRight = __webpack_require__(152),
baseFind = __webpack_require__(150),
baseFindIndex = __webpack_require__(148),
baseIteratee = __webpack_require__(95),
isArray = __webpack_require__(51);
/**
* This method is like `_.find` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to search.
* @param {Array|Function|Object|string} [predicate=_.identity]
* The function invoked per iteration.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* _.findLast([1, 2, 3, 4], function(n) {
* return n % 2 == 1;
* });
* // => 3
*/
function findLast(collection, predicate) {
predicate = baseIteratee(predicate, 3);
if (isArray(collection)) {
var index = baseFindIndex(collection, predicate, true);
return index > -1 ? collection[index] : undefined;
}
return baseFind(collection, predicate, baseEachRight);
}
module.exports = findLast;
/***/ },
/* 152 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseForOwnRight = __webpack_require__(153),
createBaseEach = __webpack_require__(135);
/**
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEachRight = createBaseEach(baseForOwnRight, true);
module.exports = baseEachRight;
/***/ },
/* 153 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseForRight = __webpack_require__(154),
keys = __webpack_require__(67);
/**
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwnRight(object, iteratee) {
return object && baseForRight(object, iteratee, keys);
}
module.exports = baseForOwnRight;
/***/ },
/* 154 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var createBaseFor = __webpack_require__(94);
/**
* This function is like `baseFor` except that it iterates over properties
* in the opposite order.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseForRight = createBaseFor(true);
module.exports = baseForRight;
/***/ },
/* 155 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseIndexOf = __webpack_require__(35),
toInteger = __webpack_require__(54);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Gets the index at which the first occurrence of `value` is found in `array`
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the
* offset from the end of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to search.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 1
*
* // Search from the `fromIndex`.
* _.indexOf([1, 2, 1, 2], 2, 2);
* // => 3
*/
function indexOf(array, value, fromIndex) {
var length = array ? array.length : 0;
if (!length) {
return -1;
}
fromIndex = toInteger(fromIndex);
if (fromIndex < 0) {
fromIndex = nativeMax(length + fromIndex, 0);
}
return baseIndexOf(array, value, fromIndex);
}
module.exports = indexOf;
/***/ },
/* 156 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseClone = __webpack_require__(157);
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, true, true);
}
module.exports = cloneDeep;
/***/ },
/* 157 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Stack = __webpack_require__(98),
arrayEach = __webpack_require__(90),
assignValue = __webpack_require__(127),
baseAssign = __webpack_require__(158),
cloneBuffer = __webpack_require__(159),
copyArray = __webpack_require__(160),
copySymbols = __webpack_require__(161),
getAllKeys = __webpack_require__(163),
getTag = __webpack_require__(59),
initCloneArray = __webpack_require__(165),
initCloneByTag = __webpack_require__(166),
initCloneObject = __webpack_require__(177),
isArray = __webpack_require__(51),
isBuffer = __webpack_require__(64),
isHostObject = __webpack_require__(12),
isObject = __webpack_require__(11),
keys = __webpack_require__(67);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @param {boolean} [isFull] Specify a clone including symbols.
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
var result;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || isFunc && !object) {
if (isHostObject(value)) {
return object ? value : {};
}
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
return copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, baseClone, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new Stack());
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
if (!isArr) {
var props = isFull ? getAllKeys(value) : keys(value);
}
// Recursively populate clone (susceptible to call stack limits).
arrayEach(props || value, function (subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
});
return result;
}
module.exports = baseClone;
/***/ },
/* 158 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var copyObject = __webpack_require__(128),
keys = __webpack_require__(67);
/**
* The base implementation of `_.assign` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
module.exports = baseAssign;
/***/ },
/* 159 */
/***/ function(module, exports) {
"use strict";
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var result = new buffer.constructor(buffer.length);
buffer.copy(result);
return result;
}
module.exports = cloneBuffer;
/***/ },
/* 160 */
/***/ function(module, exports) {
"use strict";
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
module.exports = copyArray;
/***/ },
/* 161 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var copyObject = __webpack_require__(128),
getSymbols = __webpack_require__(162);
/**
* Copies own symbol properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
module.exports = copySymbols;
/***/ },
/* 162 */
/***/ function(module, exports) {
"use strict";
/** Built-in value references. */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own enumerable symbol properties of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
function getSymbols(object) {
// Coerce `object` to an object to avoid non-object errors in V8.
// See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
return getOwnPropertySymbols(Object(object));
}
// Fallback for IE < 11.
if (!getOwnPropertySymbols) {
getSymbols = function getSymbols() {
return [];
};
}
module.exports = getSymbols;
/***/ },
/* 163 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseGetAllKeys = __webpack_require__(164),
getSymbols = __webpack_require__(162),
keys = __webpack_require__(67);
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
module.exports = getAllKeys;
/***/ },
/* 164 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arrayPush = __webpack_require__(42),
isArray = __webpack_require__(51);
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
module.exports = baseGetAllKeys;
/***/ },
/* 165 */
/***/ function(module, exports) {
'use strict';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
module.exports = initCloneArray;
/***/ },
/* 166 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var cloneArrayBuffer = __webpack_require__(167),
cloneDataView = __webpack_require__(168),
cloneMap = __webpack_require__(169),
cloneRegExp = __webpack_require__(172),
cloneSet = __webpack_require__(173),
cloneSymbol = __webpack_require__(175),
cloneTypedArray = __webpack_require__(176);
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag:case float64Tag:
case int8Tag:case int16Tag:case int32Tag:
case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return cloneMap(object, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return cloneSet(object, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object);
}
}
module.exports = initCloneByTag;
/***/ },
/* 167 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Uint8Array = __webpack_require__(109);
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
module.exports = cloneArrayBuffer;
/***/ },
/* 168 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var cloneArrayBuffer = __webpack_require__(167);
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
module.exports = cloneDataView;
/***/ },
/* 169 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var addMapEntry = __webpack_require__(170),
arrayReduce = __webpack_require__(171),
mapToArray = __webpack_require__(110);
/**
* Creates a clone of `map`.
*
* @private
* @param {Object} map The map to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned map.
*/
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor());
}
module.exports = cloneMap;
/***/ },
/* 170 */
/***/ function(module, exports) {
"use strict";
/**
* Adds the key-value `pair` to `map`.
*
* @private
* @param {Object} map The map to modify.
* @param {Array} pair The key-value pair to add.
* @returns {Object} Returns `map`.
*/
function addMapEntry(map, pair) {
// Don't return `Map#set` because it doesn't return the map instance in IE 11.
map.set(pair[0], pair[1]);
return map;
}
module.exports = addMapEntry;
/***/ },
/* 171 */
/***/ function(module, exports) {
"use strict";
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
module.exports = arrayReduce;
/***/ },
/* 172 */
/***/ function(module, exports) {
"use strict";
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
module.exports = cloneRegExp;
/***/ },
/* 173 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var addSetEntry = __webpack_require__(174),
arrayReduce = __webpack_require__(171),
setToArray = __webpack_require__(111);
/**
* Creates a clone of `set`.
*
* @private
* @param {Object} set The set to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned set.
*/
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor());
}
module.exports = cloneSet;
/***/ },
/* 174 */
/***/ function(module, exports) {
"use strict";
/**
* Adds `value` to `set`.
*
* @private
* @param {Object} set The set to modify.
* @param {*} value The value to add.
* @returns {Object} Returns `set`.
*/
function addSetEntry(set, value) {
set.add(value);
return set;
}
module.exports = addSetEntry;
/***/ },
/* 175 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _Symbol = __webpack_require__(87);
/** Used to convert symbols to primitives and strings. */
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
module.exports = cloneSymbol;
/***/ },
/* 176 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var cloneArrayBuffer = __webpack_require__(167);
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
module.exports = cloneTypedArray;
/***/ },
/* 177 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseCreate = __webpack_require__(91),
getPrototype = __webpack_require__(69),
isPrototype = __webpack_require__(74);
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
}
module.exports = initCloneObject;
/***/ },
/* 178 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(179);
/***/ },
/* 179 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var arrayEach = __webpack_require__(90),
baseEach = __webpack_require__(134),
baseIteratee = __webpack_require__(95),
isArray = __webpack_require__(51);
/**
* Iterates over elements of `collection` and invokes `iteratee` for each element.
* The iteratee is invoked with three arguments: (value, index|key, collection).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* **Note:** As with other "Collections" methods, objects with a "length"
* property are iterated like arrays. To avoid this behavior use `_.forIn`
* or `_.forOwn` for object iteration.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias each
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @example
*
* _([1, 2]).forEach(function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
*
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
return typeof iteratee == 'function' && isArray(collection) ? arrayEach(collection, iteratee) : baseEach(collection, baseIteratee(iteratee));
}
module.exports = forEach;
/***/ },
/* 180 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var apply = __webpack_require__(53),
assignInDefaults = __webpack_require__(181),
assignInWith = __webpack_require__(182),
rest = __webpack_require__(52);
/**
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to `undefined`. Source objects are applied from left to right.
* Once a property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
* // => { 'user': 'barney', 'age': 36 }
*/
var defaults = rest(function (args) {
args.push(undefined, assignInDefaults);
return apply(assignInWith, undefined, args);
});
module.exports = defaults;
/***/ },
/* 181 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var eq = __webpack_require__(21);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used by `_.defaults` to customize its `_.assignIn` use.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to assign.
* @param {Object} object The parent object of `objValue`.
* @returns {*} Returns the value to assign.
*/
function assignInDefaults(objValue, srcValue, key, object) {
if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
return srcValue;
}
return objValue;
}
module.exports = assignInDefaults;
/***/ },
/* 182 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var copyObject = __webpack_require__(128),
createAssigner = __webpack_require__(129),
keysIn = __webpack_require__(183);
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function (object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
module.exports = assignInWith;
/***/ },
/* 183 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseKeysIn = __webpack_require__(184),
indexKeys = __webpack_require__(71),
isIndex = __webpack_require__(73),
isPrototype = __webpack_require__(74);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
var index = -1,
isProto = isPrototype(object),
props = baseKeysIn(object),
propsLength = props.length,
indexes = indexKeys(object),
skipIndexes = !!indexes,
result = indexes || [],
length = result.length;
while (++index < propsLength) {
var key = props[index];
if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = keysIn;
/***/ },
/* 184 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Reflect = __webpack_require__(185),
iteratorToArray = __webpack_require__(186);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Built-in value references. */
var enumerate = Reflect ? Reflect.enumerate : undefined,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* The base implementation of `_.keysIn` which doesn't skip the constructor
* property of prototypes or treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
object = object == null ? object : Object(object);
var result = [];
for (var key in object) {
result.push(key);
}
return result;
}
// Fallback for IE < 9 with es6-shim.
if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
baseKeysIn = function baseKeysIn(object) {
return iteratorToArray(enumerate(object));
};
}
module.exports = baseKeysIn;
/***/ },
/* 185 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var root = __webpack_require__(15);
/** Built-in value references. */
var Reflect = root.Reflect;
module.exports = Reflect;
/***/ },
/* 186 */
/***/ function(module, exports) {
"use strict";
/**
* Converts `iterator` to an array.
*
* @private
* @param {Object} iterator The iterator to convert.
* @returns {Array} Returns the converted array.
*/
function iteratorToArray(iterator) {
var data,
result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
module.exports = iteratorToArray;
/***/ },
/* 187 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isObjectLike = __webpack_require__(50);
/** `Object#toString` result references. */
var boolTag = '[object Boolean]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is classified as a boolean primitive or object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isBoolean(false);
* // => true
*
* _.isBoolean(null);
* // => false
*/
function isBoolean(value) {
return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag;
}
module.exports = isBoolean;
/***/ },
/* 188 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var apply = __webpack_require__(53),
mergeDefaults = __webpack_require__(189),
mergeWith = __webpack_require__(195),
rest = __webpack_require__(52);
/**
* This method is like `_.defaults` except that it recursively assigns
* default properties.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
* // => { 'user': { 'name': 'barney', 'age': 36 } }
*
*/
var defaultsDeep = rest(function (args) {
args.push(undefined, mergeDefaults);
return apply(mergeWith, undefined, args);
});
module.exports = defaultsDeep;
/***/ },
/* 189 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseMerge = __webpack_require__(190),
isObject = __webpack_require__(11);
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to merge.
* @param {Object} object The parent object of `objValue`.
* @param {Object} source The parent object of `srcValue`.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
* @returns {*} Returns the value to assign.
*/
function mergeDefaults(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
}
return objValue;
}
module.exports = mergeDefaults;
/***/ },
/* 190 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Stack = __webpack_require__(98),
arrayEach = __webpack_require__(90),
assignMergeValue = __webpack_require__(191),
baseMergeDeep = __webpack_require__(192),
isArray = __webpack_require__(51),
isObject = __webpack_require__(11),
isTypedArray = __webpack_require__(113),
keysIn = __webpack_require__(183);
/**
* The base implementation of `_.merge` without support for multiple sources.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {number} srcIndex The index of `source`.
* @param {Function} [customizer] The function to customize merged values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
if (!(isArray(source) || isTypedArray(source))) {
var props = keysIn(source);
}
arrayEach(props || source, function (srcValue, key) {
if (props) {
key = srcValue;
srcValue = source[key];
}
if (isObject(srcValue)) {
stack || (stack = new Stack());
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
} else {
var newValue = customizer ? customizer(object[key], srcValue, key + '', object, source, stack) : undefined;
if (newValue === undefined) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
});
}
module.exports = baseMerge;
/***/ },
/* 191 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var eq = __webpack_require__(21);
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if (value !== undefined && !eq(object[key], value) || typeof key == 'number' && value === undefined && !(key in object)) {
object[key] = value;
}
}
module.exports = assignMergeValue;
/***/ },
/* 192 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var assignMergeValue = __webpack_require__(191),
baseClone = __webpack_require__(157),
copyArray = __webpack_require__(160),
isArguments = __webpack_require__(44),
isArray = __webpack_require__(51),
isArrayLikeObject = __webpack_require__(45),
isFunction = __webpack_require__(10),
isObject = __webpack_require__(11),
isPlainObject = __webpack_require__(193),
isTypedArray = __webpack_require__(113),
toPlainObject = __webpack_require__(194);
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;
var isCommon = newValue === undefined;
if (isCommon) {
newValue = srcValue;
if (isArray(srcValue) || isTypedArray(srcValue)) {
if (isArray(objValue)) {
newValue = objValue;
} else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
} else {
isCommon = false;
newValue = baseClone(srcValue, true);
}
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
} else if (!isObject(objValue) || srcIndex && isFunction(objValue)) {
isCommon = false;
newValue = baseClone(srcValue, true);
} else {
newValue = objValue;
}
} else {
isCommon = false;
}
}
stack.set(srcValue, newValue);
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
}
stack['delete'](srcValue);
assignMergeValue(object, key, newValue);
}
module.exports = baseMergeDeep;
/***/ },
/* 193 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var getPrototype = __webpack_require__(69),
isHostObject = __webpack_require__(12),
isObjectLike = __webpack_require__(50);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object,
* else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
module.exports = isPlainObject;
/***/ },
/* 194 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var copyObject = __webpack_require__(128),
keysIn = __webpack_require__(183);
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
module.exports = toPlainObject;
/***/ },
/* 195 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var baseMerge = __webpack_require__(190),
createAssigner = __webpack_require__(129);
/**
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
* properties. If `customizer` returns `undefined`, merging is handled by the
* method instead. The `customizer` is invoked with seven arguments:
* (objValue, srcValue, key, object, source, stack).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} customizer The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* function customizer(objValue, srcValue) {
* if (_.isArray(objValue)) {
* return objValue.concat(srcValue);
* }
* }
*
* var object = {
* 'fruits': ['apple'],
* 'vegetables': ['beet']
* };
*
* var other = {
* 'fruits': ['banana'],
* 'vegetables': ['carrot']
* };
*
* _.mergeWith(object, other, customizer);
* // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
*/
var mergeWith = createAssigner(function (object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
module.exports = mergeWith;
/***/ },
/* 196 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
/**
* cuid.js
* Collision-resistant UID generator for browsers and node.
* Sequential for fast db lookups and recency sorting.
* Safe for element IDs and server-side lookups.
*
* Extracted from CLCTR
*
* Copyright (c) Eric Elliott 2012
* MIT License
*/
/*global window, navigator, document, require, process, module */
(function (app) {
'use strict';
var namespace = 'cuid',
c = 0,
blockSize = 4,
base = 36,
discreteValues = Math.pow(base, blockSize),
pad = function pad(num, size) {
var s = "000000000" + num;
return s.substr(s.length - size);
},
randomBlock = function randomBlock() {
return pad((Math.random() * discreteValues << 0).toString(base), blockSize);
},
safeCounter = function safeCounter() {
c = c < discreteValues ? c : 0;
c++; // this is not subliminal
return c - 1;
},
api = function cuid() {
// Starting with a lowercase letter makes
// it HTML element ID friendly.
var letter = 'c',
// hard-coded allows for sequential access
// timestamp
// warning: this exposes the exact date and time
// that the uid was created.
timestamp = new Date().getTime().toString(base),
// Prevent same-machine collisions.
counter,
// A few chars to generate distinct ids for different
// clients (so different computers are far less
// likely to generate the same id)
fingerprint = api.fingerprint(),
// Grab some more chars from Math.random()
random = randomBlock() + randomBlock();
counter = pad(safeCounter().toString(base), blockSize);
return letter + timestamp + counter + fingerprint + random;
};
api.slug = function slug() {
var date = new Date().getTime().toString(36),
counter,
print = api.fingerprint().slice(0, 1) + api.fingerprint().slice(-1),
random = randomBlock().slice(-2);
counter = safeCounter().toString(36).slice(-4);
return date.slice(-2) + counter + print + random;
};
api.globalCount = function globalCount() {
// We want to cache the results of this
var cache = function calc() {
var i,
count = 0;
for (i in window) {
count++;
}
return count;
}();
api.globalCount = function () {
return cache;
};
return cache;
};
api.fingerprint = function browserPrint() {
return pad((navigator.mimeTypes.length + navigator.userAgent.length).toString(36) + api.globalCount().toString(36), 4);
};
// don't change anything from here down.
if (app && app.register) {
app.register(namespace, api);
} else if (true) {
module.exports = api;
} else {
app[namespace] = api;
}
})(undefined);
/***/ },
/* 197 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
/*!
* EventEmitter2
* https://github.com/hij1nx/EventEmitter2
*
* Copyright (c) 2013 hij1nx
* Licensed under the MIT license.
*/
;!function (undefined) {
var isArray = Array.isArray ? Array.isArray : function _isArray(obj) {
return Object.prototype.toString.call(obj) === "[object Array]";
};
var defaultMaxListeners = 10;
function init() {
this._events = {};
if (this._conf) {
configure.call(this, this._conf);
}
}
function configure(conf) {
if (conf) {
this._conf = conf;
conf.delimiter && (this.delimiter = conf.delimiter);
conf.maxListeners && (this._events.maxListeners = conf.maxListeners);
conf.wildcard && (this.wildcard = conf.wildcard);
conf.newListener && (this.newListener = conf.newListener);
if (this.wildcard) {
this.listenerTree = {};
}
}
}
function EventEmitter(conf) {
this._events = {};
this.newListener = false;
configure.call(this, conf);
}
EventEmitter.EventEmitter2 = EventEmitter; // backwards compatibility for exporting EventEmitter property
//
// Attention, function return type now is array, always !
// It has zero elements if no any matches found and one or more
// elements (leafs) if there are matches
//
function searchListenerTree(handlers, type, tree, i) {
if (!tree) {
return [];
}
var listeners = [],
leaf,
len,
branch,
xTree,
xxTree,
isolatedBranch,
endReached,
typeLength = type.length,
currentType = type[i],
nextType = type[i + 1];
if (i === typeLength && tree._listeners) {
//
// If at the end of the event(s) list and the tree has listeners
// invoke those listeners.
//
if (typeof tree._listeners === 'function') {
handlers && handlers.push(tree._listeners);
return [tree];
} else {
for (leaf = 0, len = tree._listeners.length; leaf < len; leaf++) {
handlers && handlers.push(tree._listeners[leaf]);
}
return [tree];
}
}
if (currentType === '*' || currentType === '**' || tree[currentType]) {
//
// If the event emitted is '*' at this part
// or there is a concrete match at this patch
//
if (currentType === '*') {
for (branch in tree) {
if (branch !== '_listeners' && tree.hasOwnProperty(branch)) {
listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i + 1));
}
}
return listeners;
} else if (currentType === '**') {
endReached = i + 1 === typeLength || i + 2 === typeLength && nextType === '*';
if (endReached && tree._listeners) {
// The next element has a _listeners, add it to the handlers.
listeners = listeners.concat(searchListenerTree(handlers, type, tree, typeLength));
}
for (branch in tree) {
if (branch !== '_listeners' && tree.hasOwnProperty(branch)) {
if (branch === '*' || branch === '**') {
if (tree[branch]._listeners && !endReached) {
listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], typeLength));
}
listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i));
} else if (branch === nextType) {
listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i + 2));
} else {
// No match on this one, shift into the tree but not in the type array.
listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i));
}
}
}
return listeners;
}
listeners = listeners.concat(searchListenerTree(handlers, type, tree[currentType], i + 1));
}
xTree = tree['*'];
if (xTree) {
//
// If the listener tree will allow any match for this part,
// then recursively explore all branches of the tree
//
searchListenerTree(handlers, type, xTree, i + 1);
}
xxTree = tree['**'];
if (xxTree) {
if (i < typeLength) {
if (xxTree._listeners) {
// If we have a listener on a '**', it will catch all, so add its handler.
searchListenerTree(handlers, type, xxTree, typeLength);
}
// Build arrays of matching next branches and others.
for (branch in xxTree) {
if (branch !== '_listeners' && xxTree.hasOwnProperty(branch)) {
if (branch === nextType) {
// We know the next element will match, so jump twice.
searchListenerTree(handlers, type, xxTree[branch], i + 2);
} else if (branch === currentType) {
// Current node matches, move into the tree.
searchListenerTree(handlers, type, xxTree[branch], i + 1);
} else {
isolatedBranch = {};
isolatedBranch[branch] = xxTree[branch];
searchListenerTree(handlers, type, { '**': isolatedBranch }, i + 1);
}
}
}
} else if (xxTree._listeners) {
// We have reached the end and still on a '**'
searchListenerTree(handlers, type, xxTree, typeLength);
} else if (xxTree['*'] && xxTree['*']._listeners) {
searchListenerTree(handlers, type, xxTree['*'], typeLength);
}
}
return listeners;
}
function growListenerTree(type, listener) {
type = typeof type === 'string' ? type.split(this.delimiter) : type.slice();
//
// Looks for two consecutive '**', if so, don't add the event at all.
//
for (var i = 0, len = type.length; i + 1 < len; i++) {
if (type[i] === '**' && type[i + 1] === '**') {
return;
}
}
var tree = this.listenerTree;
var name = type.shift();
while (name) {
if (!tree[name]) {
tree[name] = {};
}
tree = tree[name];
if (type.length === 0) {
if (!tree._listeners) {
tree._listeners = listener;
} else if (typeof tree._listeners === 'function') {
tree._listeners = [tree._listeners, listener];
} else if (isArray(tree._listeners)) {
tree._listeners.push(listener);
if (!tree._listeners.warned) {
var m = defaultMaxListeners;
if (typeof this._events.maxListeners !== 'undefined') {
m = this._events.maxListeners;
}
if (m > 0 && tree._listeners.length > m) {
tree._listeners.warned = true;
console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', tree._listeners.length);
if (console.trace) {
console.trace();
}
}
}
}
return true;
}
name = type.shift();
}
return true;
}
// By default EventEmitters will print a warning if more than
// 10 listeners are added to it. This is a useful default which
// helps finding memory leaks.
//
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.delimiter = '.';
EventEmitter.prototype.setMaxListeners = function (n) {
this._events || init.call(this);
this._events.maxListeners = n;
if (!this._conf) this._conf = {};
this._conf.maxListeners = n;
};
EventEmitter.prototype.event = '';
EventEmitter.prototype.once = function (event, fn) {
this.many(event, 1, fn);
return this;
};
EventEmitter.prototype.many = function (event, ttl, fn) {
var self = this;
if (typeof fn !== 'function') {
throw new Error('many only accepts instances of Function');
}
function listener() {
if (--ttl === 0) {
self.off(event, listener);
}
fn.apply(this, arguments);
}
listener._origin = fn;
this.on(event, listener);
return self;
};
EventEmitter.prototype.emit = function () {
this._events || init.call(this);
var type = arguments[0];
if (type === 'newListener' && !this.newListener) {
if (!this._events.newListener) {
return false;
}
}
// Loop through the *_all* functions and invoke them.
if (this._all) {
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) {
args[i - 1] = arguments[i];
}for (i = 0, l = this._all.length; i < l; i++) {
this.event = type;
this._all[i].apply(this, [type].concat(args));
}
}
// If there is no 'error' event listener then throw.
if (type === 'error') {
if (!this._all && !this._events.error && !(this.wildcard && this.listenerTree.error)) {
if (arguments[1] instanceof Error) {
throw arguments[1]; // Unhandled 'error' event
} else {
throw new Error("Uncaught, unspecified 'error' event.");
}
return false;
}
}
var handler;
if (this.wildcard) {
handler = [];
var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();
searchListenerTree.call(this, handler, ns, this.listenerTree, 0);
} else {
handler = this._events[type];
}
if (typeof handler === 'function') {
this.event = type;
if (arguments.length === 1) {
handler.call(this);
} else if (arguments.length > 1) switch (arguments.length) {
case 2:
handler.call(this, arguments[1]);
break;
case 3:
handler.call(this, arguments[1], arguments[2]);
break;
// slower
default:
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) {
args[i - 1] = arguments[i];
}handler.apply(this, args);
}
return true;
} else if (handler) {
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) {
args[i - 1] = arguments[i];
}var listeners = handler.slice();
for (var i = 0, l = listeners.length; i < l; i++) {
this.event = type;
listeners[i].apply(this, args);
}
return listeners.length > 0 || !!this._all;
} else {
return !!this._all;
}
};
EventEmitter.prototype.emitAsync = function () {
this._events || init.call(this);
var type = arguments[0];
if (type === 'newListener' && !this.newListener) {
if (!this._events.newListener) {
return Promise.resolve([false]);
}
}
var promises = [];
// Loop through the *_all* functions and invoke them.
if (this._all) {
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) {
args[i - 1] = arguments[i];
}for (i = 0, l = this._all.length; i < l; i++) {
this.event = type;
promises.push(this._all[i].apply(this, args));
}
}
// If there is no 'error' event listener then throw.
if (type === 'error') {
if (!this._all && !this._events.error && !(this.wildcard && this.listenerTree.error)) {
if (arguments[1] instanceof Error) {
return Promise.reject(arguments[1]); // Unhandled 'error' event
} else {
return Promise.reject("Uncaught, unspecified 'error' event.");
}
}
}
var handler;
if (this.wildcard) {
handler = [];
var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();
searchListenerTree.call(this, handler, ns, this.listenerTree, 0);
} else {
handler = this._events[type];
}
if (typeof handler === 'function') {
this.event = type;
if (arguments.length === 1) {
promises.push(handler.call(this));
} else if (arguments.length > 1) {
switch (arguments.length) {
case 2:
promises.push(handler.call(this, arguments[1]));
break;
case 3:
promises.push(handler.call(this, arguments[1], arguments[2]));
break;
// slower
default:
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) {
args[i - 1] = arguments[i];
}promises.push(handler.apply(this, args));
}
}
} else if (handler) {
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) {
args[i - 1] = arguments[i];
}var listeners = handler.slice();
for (var i = 0, l = listeners.length; i < l; i++) {
this.event = type;
promises.push(listeners[i].apply(this, args));
}
}
return Promise.all(promises);
};
EventEmitter.prototype.on = function (type, listener) {
if (typeof type === 'function') {
this.onAny(type);
return this;
}
if (typeof listener !== 'function') {
throw new Error('on only accepts instances of Function');
}
this._events || init.call(this);
// To avoid recursion in the case that type == "newListeners"! Before
// adding it to the listeners, first emit "newListeners".
this.emit('newListener', type, listener);
if (this.wildcard) {
growListenerTree.call(this, type, listener);
return this;
}
if (!this._events[type]) {
// Optimize the case of one listener. Don't need the extra array object.
this._events[type] = listener;
} else if (typeof this._events[type] === 'function') {
// Adding the second element, need to change to array.
this._events[type] = [this._events[type], listener];
} else if (isArray(this._events[type])) {
// If we've already got an array, just append.
this._events[type].push(listener);
// Check for listener leak
if (!this._events[type].warned) {
var m = defaultMaxListeners;
if (typeof this._events.maxListeners !== 'undefined') {
m = this._events.maxListeners;
}
if (m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length);
if (console.trace) {
console.trace();
}
}
}
}
return this;
};
EventEmitter.prototype.onAny = function (fn) {
if (typeof fn !== 'function') {
throw new Error('onAny only accepts instances of Function');
}
if (!this._all) {
this._all = [];
}
// Add the function to the event listener collection.
this._all.push(fn);
return this;
};
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
EventEmitter.prototype.off = function (type, listener) {
if (typeof listener !== 'function') {
throw new Error('removeListener only takes instances of Function');
}
var handlers,
leafs = [];
if (this.wildcard) {
var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();
leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0);
} else {
// does not use listeners(), so no side effect of creating _events[type]
if (!this._events[type]) return this;
handlers = this._events[type];
leafs.push({ _listeners: handlers });
}
for (var iLeaf = 0; iLeaf < leafs.length; iLeaf++) {
var leaf = leafs[iLeaf];
handlers = leaf._listeners;
if (isArray(handlers)) {
var position = -1;
for (var i = 0, length = handlers.length; i < length; i++) {
if (handlers[i] === listener || handlers[i].listener && handlers[i].listener === listener || handlers[i]._origin && handlers[i]._origin === listener) {
position = i;
break;
}
}
if (position < 0) {
continue;
}
if (this.wildcard) {
leaf._listeners.splice(position, 1);
} else {
this._events[type].splice(position, 1);
}
if (handlers.length === 0) {
if (this.wildcard) {
delete leaf._listeners;
} else {
delete this._events[type];
}
}
this.emit("removeListener", type, listener);
return this;
} else if (handlers === listener || handlers.listener && handlers.listener === listener || handlers._origin && handlers._origin === listener) {
if (this.wildcard) {
delete leaf._listeners;
} else {
delete this._events[type];
}
this.emit("removeListener", type, listener);
}
}
function recursivelyGarbageCollect(root) {
if (root === undefined) {
return;
}
var keys = Object.keys(root);
for (var i in keys) {
var key = keys[i];
var obj = root[key];
if (obj instanceof Function || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== "object") continue;
if (Object.keys(obj).length > 0) {
recursivelyGarbageCollect(root[key]);
}
if (Object.keys(obj).length === 0) {
delete root[key];
}
}
}
recursivelyGarbageCollect(this.listenerTree);
return this;
};
EventEmitter.prototype.offAny = function (fn) {
var i = 0,
l = 0,
fns;
if (fn && this._all && this._all.length > 0) {
fns = this._all;
for (i = 0, l = fns.length; i < l; i++) {
if (fn === fns[i]) {
fns.splice(i, 1);
this.emit("removeListenerAny", fn);
return this;
}
}
} else {
fns = this._all;
for (i = 0, l = fns.length; i < l; i++) {
this.emit("removeListenerAny", fns[i]);
}this._all = [];
}
return this;
};
EventEmitter.prototype.removeListener = EventEmitter.prototype.off;
EventEmitter.prototype.removeAllListeners = function (type) {
if (arguments.length === 0) {
!this._events || init.call(this);
return this;
}
if (this.wildcard) {
var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();
var leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0);
for (var iLeaf = 0; iLeaf < leafs.length; iLeaf++) {
var leaf = leafs[iLeaf];
leaf._listeners = null;
}
} else {
if (!this._events || !this._events[type]) return this;
this._events[type] = null;
}
return this;
};
EventEmitter.prototype.listeners = function (type) {
if (this.wildcard) {
var handlers = [];
var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();
searchListenerTree.call(this, handlers, ns, this.listenerTree, 0);
return handlers;
}
this._events || init.call(this);
if (!this._events[type]) this._events[type] = [];
if (!isArray(this._events[type])) {
this._events[type] = [this._events[type]];
}
return this._events[type];
};
EventEmitter.prototype.listenersAny = function () {
if (this._all) {
return this._all;
} else {
return [];
}
};
if (true) {
// AMD. Register as an anonymous module.
!(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
return EventEmitter;
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') {
// CommonJS
module.exports = EventEmitter;
} else {
// Browser global.
window.EventEmitter2 = EventEmitter;
}
}();
/***/ },
/* 198 */
/***/ function(module, exports, __webpack_require__) {
var require;var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(process, global, module) {'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 3.1.2
*/
(function () {
"use strict";
function lib$es6$promise$utils$$objectOrFunction(x) {
return typeof x === 'function' || (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x !== null;
}
function lib$es6$promise$utils$$isFunction(x) {
return typeof x === 'function';
}
function lib$es6$promise$utils$$isMaybeThenable(x) {
return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x !== null;
}
var lib$es6$promise$utils$$_isArray;
if (!Array.isArray) {
lib$es6$promise$utils$$_isArray = function lib$es6$promise$utils$$_isArray(x) {
return Object.prototype.toString.call(x) === '[object Array]';
};
} else {
lib$es6$promise$utils$$_isArray = Array.isArray;
}
var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray;
var lib$es6$promise$asap$$len = 0;
var lib$es6$promise$asap$$vertxNext;
var lib$es6$promise$asap$$customSchedulerFn;
var lib$es6$promise$asap$$asap = function asap(callback, arg) {
lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback;
lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg;
lib$es6$promise$asap$$len += 2;
if (lib$es6$promise$asap$$len === 2) {
// If len is 2, that means that we need to schedule an async flush.
// If additional callbacks are queued before the queue is flushed, they
// will be processed by this flush that we are scheduling.
if (lib$es6$promise$asap$$customSchedulerFn) {
lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush);
} else {
lib$es6$promise$asap$$scheduleFlush();
}
}
};
function lib$es6$promise$asap$$setScheduler(scheduleFn) {
lib$es6$promise$asap$$customSchedulerFn = scheduleFn;
}
function lib$es6$promise$asap$$setAsap(asapFn) {
lib$es6$promise$asap$$asap = asapFn;
}
var lib$es6$promise$asap$$browserWindow = typeof window !== 'undefined' ? window : undefined;
var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {};
var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;
var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
// node
function lib$es6$promise$asap$$useNextTick() {
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
// see https://github.com/cujojs/when/issues/410 for details
return function () {
process.nextTick(lib$es6$promise$asap$$flush);
};
}
// vertx
function lib$es6$promise$asap$$useVertxTimer() {
return function () {
lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush);
};
}
function lib$es6$promise$asap$$useMutationObserver() {
var iterations = 0;
var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);
var node = document.createTextNode('');
observer.observe(node, { characterData: true });
return function () {
node.data = iterations = ++iterations % 2;
};
}
// web worker
function lib$es6$promise$asap$$useMessageChannel() {
var channel = new MessageChannel();
channel.port1.onmessage = lib$es6$promise$asap$$flush;
return function () {
channel.port2.postMessage(0);
};
}
function lib$es6$promise$asap$$useSetTimeout() {
return function () {
setTimeout(lib$es6$promise$asap$$flush, 1);
};
}
var lib$es6$promise$asap$$queue = new Array(1000);
function lib$es6$promise$asap$$flush() {
for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) {
var callback = lib$es6$promise$asap$$queue[i];
var arg = lib$es6$promise$asap$$queue[i + 1];
callback(arg);
lib$es6$promise$asap$$queue[i] = undefined;
lib$es6$promise$asap$$queue[i + 1] = undefined;
}
lib$es6$promise$asap$$len = 0;
}
function lib$es6$promise$asap$$attemptVertx() {
try {
var r = require;
var vertx = __webpack_require__(200);
lib$es6$promise$asap$$vertxNext = vertx.runOnLoop || vertx.runOnContext;
return lib$es6$promise$asap$$useVertxTimer();
} catch (e) {
return lib$es6$promise$asap$$useSetTimeout();
}
}
var lib$es6$promise$asap$$scheduleFlush;
// Decide what async method to use to triggering processing of queued callbacks:
if (lib$es6$promise$asap$$isNode) {
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick();
} else if (lib$es6$promise$asap$$BrowserMutationObserver) {
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMutationObserver();
} else if (lib$es6$promise$asap$$isWorker) {
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel();
} else if (lib$es6$promise$asap$$browserWindow === undefined && "function" === 'function') {
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertx();
} else {
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout();
}
function lib$es6$promise$then$$then(onFulfillment, onRejection) {
var parent = this;
var state = parent._state;
if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) {
return this;
}
var child = new this.constructor(lib$es6$promise$$internal$$noop);
var result = parent._result;
if (state) {
var callback = arguments[state - 1];
lib$es6$promise$asap$$asap(function () {
lib$es6$promise$$internal$$invokeCallback(state, child, callback, result);
});
} else {
lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection);
}
return child;
}
var lib$es6$promise$then$$default = lib$es6$promise$then$$then;
function lib$es6$promise$promise$resolve$$resolve(object) {
/*jshint validthis:true */
var Constructor = this;
if (object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object.constructor === Constructor) {
return object;
}
var promise = new Constructor(lib$es6$promise$$internal$$noop);
lib$es6$promise$$internal$$resolve(promise, object);
return promise;
}
var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve;
function lib$es6$promise$$internal$$noop() {}
var lib$es6$promise$$internal$$PENDING = void 0;
var lib$es6$promise$$internal$$FULFILLED = 1;
var lib$es6$promise$$internal$$REJECTED = 2;
var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject();
function lib$es6$promise$$internal$$selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
}
function lib$es6$promise$$internal$$cannotReturnOwn() {
return new TypeError('A promises callback cannot return that same promise.');
}
function lib$es6$promise$$internal$$getThen(promise) {
try {
return promise.then;
} catch (error) {
lib$es6$promise$$internal$$GET_THEN_ERROR.error = error;
return lib$es6$promise$$internal$$GET_THEN_ERROR;
}
}
function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
} catch (e) {
return e;
}
}
function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) {
lib$es6$promise$asap$$asap(function (promise) {
var sealed = false;
var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) {
if (sealed) {
return;
}
sealed = true;
if (thenable !== value) {
lib$es6$promise$$internal$$resolve(promise, value);
} else {
lib$es6$promise$$internal$$fulfill(promise, value);
}
}, function (reason) {
if (sealed) {
return;
}
sealed = true;
lib$es6$promise$$internal$$reject(promise, reason);
}, 'Settle: ' + (promise._label || ' unknown promise'));
if (!sealed && error) {
sealed = true;
lib$es6$promise$$internal$$reject(promise, error);
}
}, promise);
}
function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) {
if (thenable._state === lib$es6$promise$$internal$$FULFILLED) {
lib$es6$promise$$internal$$fulfill(promise, thenable._result);
} else if (thenable._state === lib$es6$promise$$internal$$REJECTED) {
lib$es6$promise$$internal$$reject(promise, thenable._result);
} else {
lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) {
lib$es6$promise$$internal$$resolve(promise, value);
}, function (reason) {
lib$es6$promise$$internal$$reject(promise, reason);
});
}
}
function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable, then) {
if (maybeThenable.constructor === promise.constructor && then === lib$es6$promise$then$$default && constructor.resolve === lib$es6$promise$promise$resolve$$default) {
lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable);
} else {
if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) {
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error);
} else if (then === undefined) {
lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
} else if (lib$es6$promise$utils$$isFunction(then)) {
lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then);
} else {
lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
}
}
}
function lib$es6$promise$$internal$$resolve(promise, value) {
if (promise === value) {
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFulfillment());
} else if (lib$es6$promise$utils$$objectOrFunction(value)) {
lib$es6$promise$$internal$$handleMaybeThenable(promise, value, lib$es6$promise$$internal$$getThen(value));
} else {
lib$es6$promise$$internal$$fulfill(promise, value);
}
}
function lib$es6$promise$$internal$$publishRejection(promise) {
if (promise._onerror) {
promise._onerror(promise._result);
}
lib$es6$promise$$internal$$publish(promise);
}
function lib$es6$promise$$internal$$fulfill(promise, value) {
if (promise._state !== lib$es6$promise$$internal$$PENDING) {
return;
}
promise._result = value;
promise._state = lib$es6$promise$$internal$$FULFILLED;
if (promise._subscribers.length !== 0) {
lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise);
}
}
function lib$es6$promise$$internal$$reject(promise, reason) {
if (promise._state !== lib$es6$promise$$internal$$PENDING) {
return;
}
promise._state = lib$es6$promise$$internal$$REJECTED;
promise._result = reason;
lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise);
}
function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
var subscribers = parent._subscribers;
var length = subscribers.length;
parent._onerror = null;
subscribers[length] = child;
subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment;
subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection;
if (length === 0 && parent._state) {
lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent);
}
}
function lib$es6$promise$$internal$$publish(promise) {
var subscribers = promise._subscribers;
var settled = promise._state;
if (subscribers.length === 0) {
return;
}
var child,
callback,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
child = subscribers[i];
callback = subscribers[i + settled];
if (child) {
lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail);
} else {
callback(detail);
}
}
promise._subscribers.length = 0;
}
function lib$es6$promise$$internal$$ErrorObject() {
this.error = null;
}
var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject();
function lib$es6$promise$$internal$$tryCatch(callback, detail) {
try {
return callback(detail);
} catch (e) {
lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e;
return lib$es6$promise$$internal$$TRY_CATCH_ERROR;
}
}
function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) {
var hasCallback = lib$es6$promise$utils$$isFunction(callback),
value,
error,
succeeded,
failed;
if (hasCallback) {
value = lib$es6$promise$$internal$$tryCatch(callback, detail);
if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) {
failed = true;
error = value.error;
value = null;
} else {
succeeded = true;
}
if (promise === value) {
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn());
return;
}
} else {
value = detail;
succeeded = true;
}
if (promise._state !== lib$es6$promise$$internal$$PENDING) {
// noop
} else if (hasCallback && succeeded) {
lib$es6$promise$$internal$$resolve(promise, value);
} else if (failed) {
lib$es6$promise$$internal$$reject(promise, error);
} else if (settled === lib$es6$promise$$internal$$FULFILLED) {
lib$es6$promise$$internal$$fulfill(promise, value);
} else if (settled === lib$es6$promise$$internal$$REJECTED) {
lib$es6$promise$$internal$$reject(promise, value);
}
}
function lib$es6$promise$$internal$$initializePromise(promise, resolver) {
try {
resolver(function resolvePromise(value) {
lib$es6$promise$$internal$$resolve(promise, value);
}, function rejectPromise(reason) {
lib$es6$promise$$internal$$reject(promise, reason);
});
} catch (e) {
lib$es6$promise$$internal$$reject(promise, e);
}
}
function lib$es6$promise$promise$all$$all(entries) {
return new lib$es6$promise$enumerator$$default(this, entries).promise;
}
var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all;
function lib$es6$promise$promise$race$$race(entries) {
/*jshint validthis:true */
var Constructor = this;
var promise = new Constructor(lib$es6$promise$$internal$$noop);
if (!lib$es6$promise$utils$$isArray(entries)) {
lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.'));
return promise;
}
var length = entries.length;
function onFulfillment(value) {
lib$es6$promise$$internal$$resolve(promise, value);
}
function onRejection(reason) {
lib$es6$promise$$internal$$reject(promise, reason);
}
for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {
lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
}
return promise;
}
var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race;
function lib$es6$promise$promise$reject$$reject(reason) {
/*jshint validthis:true */
var Constructor = this;
var promise = new Constructor(lib$es6$promise$$internal$$noop);
lib$es6$promise$$internal$$reject(promise, reason);
return promise;
}
var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject;
var lib$es6$promise$promise$$counter = 0;
function lib$es6$promise$promise$$needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
function lib$es6$promise$promise$$needsNew() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
}
var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise;
/**
Promise objects represent the eventual result of an asynchronous operation. The
primary way of interacting with a promise is through its `then` method, which
registers callbacks to receive either a promise's eventual value or the reason
why the promise cannot be fulfilled.
Terminology
-----------
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
- `thenable` is an object or function that defines a `then` method.
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
- `exception` is a value that is thrown using the throw statement.
- `reason` is a value that indicates why a promise was rejected.
- `settled` the final resting state of a promise, fulfilled or rejected.
A promise can be in one of three states: pending, fulfilled, or rejected.
Promises that are fulfilled have a fulfillment value and are in the fulfilled
state. Promises that are rejected have a rejection reason and are in the
rejected state. A fulfillment value is never a thenable.
Promises can also be said to *resolve* a value. If this value is also a
promise, then the original promise's settled state will match the value's
settled state. So a promise that *resolves* a promise that rejects will
itself reject, and a promise that *resolves* a promise that fulfills will
itself fulfill.
Basic Usage:
------------
```js
var promise = new Promise(function(resolve, reject) {
// on success
resolve(value);
// on failure
reject(reason);
});
promise.then(function(value) {
// on fulfillment
}, function(reason) {
// on rejection
});
```
Advanced Usage:
---------------
Promises shine when abstracting away asynchronous interactions such as
`XMLHttpRequest`s.
```js
function getJSON(url) {
return new Promise(function(resolve, reject){
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.onreadystatechange = handler;
xhr.responseType = 'json';
xhr.setRequestHeader('Accept', 'application/json');
xhr.send();
function handler() {
if (this.readyState === this.DONE) {
if (this.status === 200) {
resolve(this.response);
} else {
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
}
}
};
});
}
getJSON('/posts.json').then(function(json) {
// on fulfillment
}, function(reason) {
// on rejection
});
```
Unlike callbacks, promises are great composable primitives.
```js
Promise.all([
getJSON('/posts'),
getJSON('/comments')
]).then(function(values){
values[0] // => postsJSON
values[1] // => commentsJSON
return values;
});
```
@class Promise
@param {function} resolver
Useful for tooling.
@constructor
*/
function lib$es6$promise$promise$$Promise(resolver) {
this._id = lib$es6$promise$promise$$counter++;
this._state = undefined;
this._result = undefined;
this._subscribers = [];
if (lib$es6$promise$$internal$$noop !== resolver) {
typeof resolver !== 'function' && lib$es6$promise$promise$$needsResolver();
this instanceof lib$es6$promise$promise$$Promise ? lib$es6$promise$$internal$$initializePromise(this, resolver) : lib$es6$promise$promise$$needsNew();
}
}
lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default;
lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default;
lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default;
lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default;
lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler;
lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap;
lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap;
lib$es6$promise$promise$$Promise.prototype = {
constructor: lib$es6$promise$promise$$Promise,
/**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
```js
findUser().then(function(user){
// user is available
}, function(reason){
// user is unavailable, and you are given the reason why
});
```
Chaining
--------
The return value of `then` is itself a promise. This second, 'downstream'
promise is resolved with the return value of the first promise's fulfillment
or rejection handler, or rejected if the handler throws an exception.
```js
findUser().then(function (user) {
return user.name;
}, function (reason) {
return 'default name';
}).then(function (userName) {
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
// will be `'default name'`
});
findUser().then(function (user) {
throw new Error('Found user, but still unhappy');
}, function (reason) {
throw new Error('`findUser` rejected and we're unhappy');
}).then(function (value) {
// never reached
}, function (reason) {
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
});
```
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
```js
findUser().then(function (user) {
throw new PedagogicalException('Upstream error');
}).then(function (value) {
// never reached
}).then(function (value) {
// never reached
}, function (reason) {
// The `PedgagocialException` is propagated all the way down to here
});
```
Assimilation
------------
Sometimes the value you want to propagate to a downstream promise can only be
retrieved asynchronously. This can be achieved by returning a promise in the
fulfillment or rejection handler. The downstream promise will then be pending
until the returned promise is settled. This is called *assimilation*.
```js
findUser().then(function (user) {
return findCommentsByAuthor(user);
}).then(function (comments) {
// The user's comments are now available
});
```
If the assimliated promise rejects, then the downstream promise will also reject.
```js
findUser().then(function (user) {
return findCommentsByAuthor(user);
}).then(function (comments) {
// If `findCommentsByAuthor` fulfills, we'll have the value here
}, function (reason) {
// If `findCommentsByAuthor` rejects, we'll have the reason here
});
```
Simple Example
--------------
Synchronous Example
```javascript
var result;
try {
result = findResult();
// success
} catch(reason) {
// failure
}
```
Errback Example
```js
findResult(function(result, err){
if (err) {
// failure
} else {
// success
}
});
```
Promise Example;
```javascript
findResult().then(function(result){
// success
}, function(reason){
// failure
});
```
Advanced Example
--------------
Synchronous Example
```javascript
var author, books;
try {
author = findAuthor();
books = findBooksByAuthor(author);
// success
} catch(reason) {
// failure
}
```
Errback Example
```js
function foundBooks(books) {
}
function failure(reason) {
}
findAuthor(function(author, err){
if (err) {
failure(err);
// failure
} else {
try {
findBoooksByAuthor(author, function(books, err) {
if (err) {
failure(err);
} else {
try {
foundBooks(books);
} catch(reason) {
failure(reason);
}
}
});
} catch(error) {
failure(err);
}
// success
}
});
```
Promise Example;
```javascript
findAuthor().
then(findBooksByAuthor).
then(function(books){
// found books
}).catch(function(reason){
// something went wrong
});
```
@method then
@param {Function} onFulfilled
@param {Function} onRejected
Useful for tooling.
@return {Promise}
*/
then: lib$es6$promise$then$$default,
/**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
```js
function findAuthor(){
throw new Error('couldn't find that author');
}
// synchronous
try {
findAuthor();
} catch(reason) {
// something went wrong
}
// async with promises
findAuthor().catch(function(reason){
// something went wrong
});
```
@method catch
@param {Function} onRejection
Useful for tooling.
@return {Promise}
*/
'catch': function _catch(onRejection) {
return this.then(null, onRejection);
}
};
var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator;
function lib$es6$promise$enumerator$$Enumerator(Constructor, input) {
this._instanceConstructor = Constructor;
this.promise = new Constructor(lib$es6$promise$$internal$$noop);
if (Array.isArray(input)) {
this._input = input;
this.length = input.length;
this._remaining = input.length;
this._result = new Array(this.length);
if (this.length === 0) {
lib$es6$promise$$internal$$fulfill(this.promise, this._result);
} else {
this.length = this.length || 0;
this._enumerate();
if (this._remaining === 0) {
lib$es6$promise$$internal$$fulfill(this.promise, this._result);
}
}
} else {
lib$es6$promise$$internal$$reject(this.promise, this._validationError());
}
}
lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () {
return new Error('Array Methods must be provided an Array');
};
lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () {
var length = this.length;
var input = this._input;
for (var i = 0; this._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {
this._eachEntry(input[i], i);
}
};
lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) {
var c = this._instanceConstructor;
var resolve = c.resolve;
if (resolve === lib$es6$promise$promise$resolve$$default) {
var then = lib$es6$promise$$internal$$getThen(entry);
if (then === lib$es6$promise$then$$default && entry._state !== lib$es6$promise$$internal$$PENDING) {
this._settledAt(entry._state, i, entry._result);
} else if (typeof then !== 'function') {
this._remaining--;
this._result[i] = entry;
} else if (c === lib$es6$promise$promise$$default) {
var promise = new c(lib$es6$promise$$internal$$noop);
lib$es6$promise$$internal$$handleMaybeThenable(promise, entry, then);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(function (resolve) {
resolve(entry);
}), i);
}
} else {
this._willSettleAt(resolve(entry), i);
}
};
lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) {
var promise = this.promise;
if (promise._state === lib$es6$promise$$internal$$PENDING) {
this._remaining--;
if (state === lib$es6$promise$$internal$$REJECTED) {
lib$es6$promise$$internal$$reject(promise, value);
} else {
this._result[i] = value;
}
}
if (this._remaining === 0) {
lib$es6$promise$$internal$$fulfill(promise, this._result);
}
};
lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) {
var enumerator = this;
lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) {
enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value);
}, function (reason) {
enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason);
});
};
function lib$es6$promise$polyfill$$polyfill() {
var local;
if (typeof global !== 'undefined') {
local = global;
} else if (typeof self !== 'undefined') {
local = self;
} else {
try {
local = Function('return this')();
} catch (e) {
throw new Error('polyfill failed because global object is unavailable in this environment');
}
}
var P = local.Promise;
if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {
return;
}
local.Promise = lib$es6$promise$promise$$default;
}
var lib$es6$promise$polyfill$$default = lib$es6$promise$polyfill$$polyfill;
var lib$es6$promise$umd$$ES6Promise = {
'Promise': lib$es6$promise$promise$$default,
'polyfill': lib$es6$promise$polyfill$$default
};
/* global define:true module:true window: true */
if ("function" === 'function' && __webpack_require__(201)['amd']) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
return lib$es6$promise$umd$$ES6Promise;
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof module !== 'undefined' && module['exports']) {
module['exports'] = lib$es6$promise$umd$$ES6Promise;
} else if (typeof this !== 'undefined') {
this['ES6Promise'] = lib$es6$promise$umd$$ES6Promise;
}
lib$es6$promise$polyfill$$default();
}).call(undefined);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(199), (function() { return this; }()), __webpack_require__(16)(module)))
/***/ },
/* 199 */
/***/ function(module, exports) {
'use strict';
// shim for using process in browser
var process = module.exports = {};
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = setTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
clearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
setTimeout(drainQueue, 0);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () {
return '/';
};
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function () {
return 0;
};
/***/ },
/* 200 */
/***/ function(module, exports) {
/* (ignored) */
/***/ },
/* 201 */
/***/ function(module, exports) {
module.exports = function() { throw new Error("define cannot be used indirect"); };
/***/ },
/* 202 */
/***/ function(module, exports) {
// removed by extract-text-webpack-plugin
"use strict";
/***/ }
/******/ ])
});
; | emmy41124/cdnjs | ajax/libs/inspire-tree/1.6.1/inspire-tree-core.js | JavaScript | mit | 321,400 |
/*
jQuery UI Slider plugin wrapper
*/
angular.module('ui.slider', []).value('uiSliderConfig',{}).directive('uiSlider', ['uiSliderConfig', '$timeout', function(uiSliderConfig, $timeout) {
uiSliderConfig = uiSliderConfig || {};
return {
require: 'ngModel',
compile: function() {
var preLink = function (scope, elm, attrs, ngModel) {
function parseNumber(n, decimals) {
return (decimals) ? parseFloat(n) : parseInt(n, 10);
}
var directiveOptions = angular.copy(scope.$eval(attrs.uiSlider));
var options = angular.extend(directiveOptions || {}, uiSliderConfig);
// Object holding range values
var prevRangeValues = {
min: null,
max: null
};
// convenience properties
var properties = ['min', 'max', 'step', 'lowerBound', 'upperBound'];
var useDecimals = (!angular.isUndefined(attrs.useDecimals)) ? true : false;
var updateOn = (angular.isDefined(options['updateOn'])) ? options['updateOn'] : 'slide'
var init = function() {
// When ngModel is assigned an array of values then range is expected to be true.
// Warn user and change range to true else an error occurs when trying to drag handle
if (angular.isArray(ngModel.$viewValue) && options.range !== true) {
console.warn('Change your range option of ui-slider. When assigning ngModel an array of values then the range option should be set to true.');
options.range = true;
}
// Ensure the convenience properties are passed as options if they're defined
// This avoids init ordering issues where the slider's initial state (eg handle
// position) is calculated using widget defaults
// Note the properties take precedence over any duplicates in options
angular.forEach(properties, function(property) {
if (angular.isDefined(attrs[property])) {
options[property] = parseNumber(attrs[property], useDecimals);
}
});
elm.slider(options);
init = angular.noop;
};
// Find out if decimals are to be used for slider
angular.forEach(properties, function(property) {
// support {{}} and watch for updates
attrs.$observe(property, function(newVal) {
if (!!newVal) {
init();
options[property] = parseNumber(newVal, useDecimals);
elm.slider('option', property, parseNumber(newVal, useDecimals));
ngModel.$render();
}
});
});
attrs.$observe('disabled', function(newVal) {
init();
elm.slider('option', 'disabled', !!newVal);
});
// Watch ui-slider (byVal) for changes and update
scope.$watch(attrs.uiSlider, function(newVal) {
init();
if(newVal !== undefined) {
elm.slider('option', newVal);
}
}, true);
// Late-bind to prevent compiler clobbering
$timeout(init, 0, true);
// Update model value from slider
elm.bind(updateOn, function(event, ui) {
var valuesChanged;
if (ui.values) {
var boundedValues = ui.values.slice();
if (options.lowerBound && boundedValues[0] < options.lowerBound) {
boundedValues[0] = Math.max(boundedValues[0], options.lowerBound);
}
if (options.upperBound && boundedValues[1] > options.upperBound) {
boundedValues[1] = Math.min(boundedValues[1], options.upperBound);
}
if (boundedValues[0] !== ui.values[0] || boundedValues[1] !== ui.values[1]) {
valuesChanged = true;
ui.values = boundedValues;
}
} else {
var boundedValue = ui.value;
if (options.lowerBound && boundedValue < options.lowerBound) {
boundedValue = Math.max(boundedValue, options.lowerBound);
}
if (options.upperBound && boundedValue > options.upperBound) {
boundedValue = Math.min(boundedValue, options.upperBound);
}
if (boundedValue !== ui.value) {
valuesChanged = true;
ui.value = boundedValue;
}
}
ngModel.$setViewValue(ui.values || ui.value);
$(ui.handle).find('.ui-slider-tip').text(ui.value);
scope.$apply();
if (valuesChanged) {
setTimeout(function() {
elm.slider('value', ui.values || ui.value);
}, 0);
return false;
}
});
// Update slider from model value
ngModel.$render = function() {
init();
var method = options.range === true ? 'values' : 'value';
if (options.range !== true && isNaN(ngModel.$viewValue) && !(ngModel.$viewValue instanceof Array)) {
ngModel.$viewValue = 0;
}
else if (options.range && !angular.isDefined(ngModel.$viewValue)) {
ngModel.$viewValue = [0,0];
}
// Do some sanity check of range values
if (options.range === true) {
// previously, the model was a string b/c it was in a text input, need to convert to a array.
// make sure input exists, comma exists once, and it is a string.
if (ngModel.$viewValue && angular.isString(ngModel.$viewValue) && (ngModel.$viewValue.match(/,/g) || []).length === 1) {
// transform string model into array.
var valueArr = ngModel.$viewValue.split(',');
ngModel.$viewValue = [Number(valueArr[0]), Number(valueArr[1])];
}
// Check outer bounds for min and max values
if (angular.isDefined(options.min) && options.min > ngModel.$viewValue[0]) {
ngModel.$viewValue[0] = options.min;
}
if (angular.isDefined(options.max) && options.max < ngModel.$viewValue[1]) {
ngModel.$viewValue[1] = options.max;
}
// Check min and max range values
if (ngModel.$viewValue[0] > ngModel.$viewValue[1]) {
// Min value should be less to equal to max value
if (prevRangeValues.min >= ngModel.$viewValue[1]) {
ngModel.$viewValue[1] = prevRangeValues.min;
}
// Max value should be less to equal to min value
if (prevRangeValues.max <= ngModel.$viewValue[0]) {
ngModel.$viewValue[0] = prevRangeValues.max;
}
}
// Store values for later user
prevRangeValues.min = ngModel.$viewValue[0];
prevRangeValues.max = ngModel.$viewValue[1];
}
elm.slider(method, ngModel.$viewValue);
};
scope.$watch(attrs.ngModel, function() {
if (options.range === true) {
ngModel.$render();
}
}, true);
function destroy() {
if (elm.hasClass('ui-slider')) {
elm.slider('destroy');
}
}
scope.$on("$destroy", destroy);
elm.one('$destroy', destroy);
};
var postLink = function (scope, element, attrs, ngModel) {
// Add tick marks if 'tick' and 'step' attributes have been setted on element.
// Support horizontal slider bar so far. 'tick' and 'step' attributes are required.
var options = angular.extend({}, scope.$eval(attrs.uiSlider));
var properties = ['min', 'max', 'step', 'tick', 'tip'];
angular.forEach(properties, function(property) {
if (angular.isDefined(attrs[property])) {
options[property] = attrs[property];
}
});
if (angular.isDefined(options['tick']) && angular.isDefined(options['step'])) {
var total = parseInt( (parseInt(options['max']) - parseInt(options['min'])) /parseInt(options['step']));
for (var i = total; i >= 0; i--) {
var left = ((i / total) * 100) + '%';
$("<div/>").addClass("ui-slider-tick").appendTo(element).css({left: left});
};
}
if(angular.isDefined(options['tip'])) {
$timeout(function(){element.find('.ui-slider-handle').append('<div class="ui-slider-tip">'+ngModel.$viewValue+'</div>')},10);
}
}
return {
pre: preLink,
post: postLink
};
}
};
}]);
| tonytomov/cdnjs | ajax/libs/angular-ui-slider/0.3.1/slider.js | JavaScript | mit | 10,429 |
/*
* The MIT License
*
* Copyright (c) 2012, CloudBees, Intl., Nicolas De loof
*
* 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 jenkins.management;
import hudson.Extension;
import hudson.model.ManagementLink;
/**
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
*/
@Extension(ordinal = Integer.MAX_VALUE - 600)
public class SystemLogLink extends ManagementLink {
@Override
public String getIconFileName() {
return "clipboard.png";
}
public String getDisplayName() {
return Messages.SystemLogLink_DisplayName();
}
@Override
public String getDescription() {
return Messages.SystemLogLink_Description();
}
@Override
public String getUrlName() {
return "log";
}
}
| wangyikai/jenkins | core/src/main/java/jenkins/management/SystemLogLink.java | Java | mit | 1,809 |
/*!
* Materialize v0.95.0 (http://materializecss.com)
* Copyright 2014-2015 Materialize
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
*/
.materialize-red.lighten-5 {
background-color: #fdeaeb !important; }
.materialize-red-text.text-lighten-5 {
color: #fdeaeb !important; }
.materialize-red.lighten-4 {
background-color: #f8c1c3 !important; }
.materialize-red-text.text-lighten-4 {
color: #f8c1c3 !important; }
.materialize-red.lighten-3 {
background-color: #f3989b !important; }
.materialize-red-text.text-lighten-3 {
color: #f3989b !important; }
.materialize-red.lighten-2 {
background-color: #ee6e73 !important; }
.materialize-red-text.text-lighten-2 {
color: #ee6e73 !important; }
.materialize-red.lighten-1 {
background-color: #ea454b !important; }
.materialize-red-text.text-lighten-1 {
color: #ea454b !important; }
.materialize-red {
background-color: #e51c23 !important; }
.materialize-red-text {
color: #e51c23 !important; }
.materialize-red.darken-1 {
background-color: #d0181e !important; }
.materialize-red-text.text-darken-1 {
color: #d0181e !important; }
.materialize-red.darken-2 {
background-color: #b9151b !important; }
.materialize-red-text.text-darken-2 {
color: #b9151b !important; }
.materialize-red.darken-3 {
background-color: #a21318 !important; }
.materialize-red-text.text-darken-3 {
color: #a21318 !important; }
.materialize-red.darken-4 {
background-color: #8b1014 !important; }
.materialize-red-text.text-darken-4 {
color: #8b1014 !important; }
.red.lighten-5 {
background-color: #FFEBEE !important; }
.red-text.text-lighten-5 {
color: #FFEBEE !important; }
.red.lighten-4 {
background-color: #FFCDD2 !important; }
.red-text.text-lighten-4 {
color: #FFCDD2 !important; }
.red.lighten-3 {
background-color: #EF9A9A !important; }
.red-text.text-lighten-3 {
color: #EF9A9A !important; }
.red.lighten-2 {
background-color: #E57373 !important; }
.red-text.text-lighten-2 {
color: #E57373 !important; }
.red.lighten-1 {
background-color: #EF5350 !important; }
.red-text.text-lighten-1 {
color: #EF5350 !important; }
.red {
background-color: #F44336 !important; }
.red-text {
color: #F44336 !important; }
.red.darken-1 {
background-color: #E53935 !important; }
.red-text.text-darken-1 {
color: #E53935 !important; }
.red.darken-2 {
background-color: #D32F2F !important; }
.red-text.text-darken-2 {
color: #D32F2F !important; }
.red.darken-3 {
background-color: #C62828 !important; }
.red-text.text-darken-3 {
color: #C62828 !important; }
.red.darken-4 {
background-color: #B71C1C !important; }
.red-text.text-darken-4 {
color: #B71C1C !important; }
.red.accent-1 {
background-color: #FF8A80 !important; }
.red-text.text-accent-1 {
color: #FF8A80 !important; }
.red.accent-2 {
background-color: #FF5252 !important; }
.red-text.text-accent-2 {
color: #FF5252 !important; }
.red.accent-3 {
background-color: #FF1744 !important; }
.red-text.text-accent-3 {
color: #FF1744 !important; }
.red.accent-4 {
background-color: #D50000 !important; }
.red-text.text-accent-4 {
color: #D50000 !important; }
.pink.lighten-5 {
background-color: #fce4ec !important; }
.pink-text.text-lighten-5 {
color: #fce4ec !important; }
.pink.lighten-4 {
background-color: #f8bbd0 !important; }
.pink-text.text-lighten-4 {
color: #f8bbd0 !important; }
.pink.lighten-3 {
background-color: #f48fb1 !important; }
.pink-text.text-lighten-3 {
color: #f48fb1 !important; }
.pink.lighten-2 {
background-color: #f06292 !important; }
.pink-text.text-lighten-2 {
color: #f06292 !important; }
.pink.lighten-1 {
background-color: #ec407a !important; }
.pink-text.text-lighten-1 {
color: #ec407a !important; }
.pink {
background-color: #e91e63 !important; }
.pink-text {
color: #e91e63 !important; }
.pink.darken-1 {
background-color: #d81b60 !important; }
.pink-text.text-darken-1 {
color: #d81b60 !important; }
.pink.darken-2 {
background-color: #c2185b !important; }
.pink-text.text-darken-2 {
color: #c2185b !important; }
.pink.darken-3 {
background-color: #ad1457 !important; }
.pink-text.text-darken-3 {
color: #ad1457 !important; }
.pink.darken-4 {
background-color: #880e4f !important; }
.pink-text.text-darken-4 {
color: #880e4f !important; }
.pink.accent-1 {
background-color: #ff80ab !important; }
.pink-text.text-accent-1 {
color: #ff80ab !important; }
.pink.accent-2 {
background-color: #ff4081 !important; }
.pink-text.text-accent-2 {
color: #ff4081 !important; }
.pink.accent-3 {
background-color: #f50057 !important; }
.pink-text.text-accent-3 {
color: #f50057 !important; }
.pink.accent-4 {
background-color: #c51162 !important; }
.pink-text.text-accent-4 {
color: #c51162 !important; }
.purple.lighten-5 {
background-color: #f3e5f5 !important; }
.purple-text.text-lighten-5 {
color: #f3e5f5 !important; }
.purple.lighten-4 {
background-color: #e1bee7 !important; }
.purple-text.text-lighten-4 {
color: #e1bee7 !important; }
.purple.lighten-3 {
background-color: #ce93d8 !important; }
.purple-text.text-lighten-3 {
color: #ce93d8 !important; }
.purple.lighten-2 {
background-color: #ba68c8 !important; }
.purple-text.text-lighten-2 {
color: #ba68c8 !important; }
.purple.lighten-1 {
background-color: #ab47bc !important; }
.purple-text.text-lighten-1 {
color: #ab47bc !important; }
.purple {
background-color: #9c27b0 !important; }
.purple-text {
color: #9c27b0 !important; }
.purple.darken-1 {
background-color: #8e24aa !important; }
.purple-text.text-darken-1 {
color: #8e24aa !important; }
.purple.darken-2 {
background-color: #7b1fa2 !important; }
.purple-text.text-darken-2 {
color: #7b1fa2 !important; }
.purple.darken-3 {
background-color: #6a1b9a !important; }
.purple-text.text-darken-3 {
color: #6a1b9a !important; }
.purple.darken-4 {
background-color: #4a148c !important; }
.purple-text.text-darken-4 {
color: #4a148c !important; }
.purple.accent-1 {
background-color: #ea80fc !important; }
.purple-text.text-accent-1 {
color: #ea80fc !important; }
.purple.accent-2 {
background-color: #e040fb !important; }
.purple-text.text-accent-2 {
color: #e040fb !important; }
.purple.accent-3 {
background-color: #d500f9 !important; }
.purple-text.text-accent-3 {
color: #d500f9 !important; }
.purple.accent-4 {
background-color: #aa00ff !important; }
.purple-text.text-accent-4 {
color: #aa00ff !important; }
.deep-purple.lighten-5 {
background-color: #ede7f6 !important; }
.deep-purple-text.text-lighten-5 {
color: #ede7f6 !important; }
.deep-purple.lighten-4 {
background-color: #d1c4e9 !important; }
.deep-purple-text.text-lighten-4 {
color: #d1c4e9 !important; }
.deep-purple.lighten-3 {
background-color: #b39ddb !important; }
.deep-purple-text.text-lighten-3 {
color: #b39ddb !important; }
.deep-purple.lighten-2 {
background-color: #9575cd !important; }
.deep-purple-text.text-lighten-2 {
color: #9575cd !important; }
.deep-purple.lighten-1 {
background-color: #7e57c2 !important; }
.deep-purple-text.text-lighten-1 {
color: #7e57c2 !important; }
.deep-purple {
background-color: #673ab7 !important; }
.deep-purple-text {
color: #673ab7 !important; }
.deep-purple.darken-1 {
background-color: #5e35b1 !important; }
.deep-purple-text.text-darken-1 {
color: #5e35b1 !important; }
.deep-purple.darken-2 {
background-color: #512da8 !important; }
.deep-purple-text.text-darken-2 {
color: #512da8 !important; }
.deep-purple.darken-3 {
background-color: #4527a0 !important; }
.deep-purple-text.text-darken-3 {
color: #4527a0 !important; }
.deep-purple.darken-4 {
background-color: #311b92 !important; }
.deep-purple-text.text-darken-4 {
color: #311b92 !important; }
.deep-purple.accent-1 {
background-color: #b388ff !important; }
.deep-purple-text.text-accent-1 {
color: #b388ff !important; }
.deep-purple.accent-2 {
background-color: #7c4dff !important; }
.deep-purple-text.text-accent-2 {
color: #7c4dff !important; }
.deep-purple.accent-3 {
background-color: #651fff !important; }
.deep-purple-text.text-accent-3 {
color: #651fff !important; }
.deep-purple.accent-4 {
background-color: #6200ea !important; }
.deep-purple-text.text-accent-4 {
color: #6200ea !important; }
.indigo.lighten-5 {
background-color: #e8eaf6 !important; }
.indigo-text.text-lighten-5 {
color: #e8eaf6 !important; }
.indigo.lighten-4 {
background-color: #c5cae9 !important; }
.indigo-text.text-lighten-4 {
color: #c5cae9 !important; }
.indigo.lighten-3 {
background-color: #9fa8da !important; }
.indigo-text.text-lighten-3 {
color: #9fa8da !important; }
.indigo.lighten-2 {
background-color: #7986cb !important; }
.indigo-text.text-lighten-2 {
color: #7986cb !important; }
.indigo.lighten-1 {
background-color: #5c6bc0 !important; }
.indigo-text.text-lighten-1 {
color: #5c6bc0 !important; }
.indigo {
background-color: #3f51b5 !important; }
.indigo-text {
color: #3f51b5 !important; }
.indigo.darken-1 {
background-color: #3949ab !important; }
.indigo-text.text-darken-1 {
color: #3949ab !important; }
.indigo.darken-2 {
background-color: #303f9f !important; }
.indigo-text.text-darken-2 {
color: #303f9f !important; }
.indigo.darken-3 {
background-color: #283593 !important; }
.indigo-text.text-darken-3 {
color: #283593 !important; }
.indigo.darken-4 {
background-color: #1a237e !important; }
.indigo-text.text-darken-4 {
color: #1a237e !important; }
.indigo.accent-1 {
background-color: #8c9eff !important; }
.indigo-text.text-accent-1 {
color: #8c9eff !important; }
.indigo.accent-2 {
background-color: #536dfe !important; }
.indigo-text.text-accent-2 {
color: #536dfe !important; }
.indigo.accent-3 {
background-color: #3d5afe !important; }
.indigo-text.text-accent-3 {
color: #3d5afe !important; }
.indigo.accent-4 {
background-color: #304ffe !important; }
.indigo-text.text-accent-4 {
color: #304ffe !important; }
.blue.lighten-5 {
background-color: #E3F2FD !important; }
.blue-text.text-lighten-5 {
color: #E3F2FD !important; }
.blue.lighten-4 {
background-color: #BBDEFB !important; }
.blue-text.text-lighten-4 {
color: #BBDEFB !important; }
.blue.lighten-3 {
background-color: #90CAF9 !important; }
.blue-text.text-lighten-3 {
color: #90CAF9 !important; }
.blue.lighten-2 {
background-color: #64B5F6 !important; }
.blue-text.text-lighten-2 {
color: #64B5F6 !important; }
.blue.lighten-1 {
background-color: #42A5F5 !important; }
.blue-text.text-lighten-1 {
color: #42A5F5 !important; }
.blue {
background-color: #2196F3 !important; }
.blue-text {
color: #2196F3 !important; }
.blue.darken-1 {
background-color: #1E88E5 !important; }
.blue-text.text-darken-1 {
color: #1E88E5 !important; }
.blue.darken-2 {
background-color: #1976D2 !important; }
.blue-text.text-darken-2 {
color: #1976D2 !important; }
.blue.darken-3 {
background-color: #1565C0 !important; }
.blue-text.text-darken-3 {
color: #1565C0 !important; }
.blue.darken-4 {
background-color: #0D47A1 !important; }
.blue-text.text-darken-4 {
color: #0D47A1 !important; }
.blue.accent-1 {
background-color: #82B1FF !important; }
.blue-text.text-accent-1 {
color: #82B1FF !important; }
.blue.accent-2 {
background-color: #448AFF !important; }
.blue-text.text-accent-2 {
color: #448AFF !important; }
.blue.accent-3 {
background-color: #2979FF !important; }
.blue-text.text-accent-3 {
color: #2979FF !important; }
.blue.accent-4 {
background-color: #2962FF !important; }
.blue-text.text-accent-4 {
color: #2962FF !important; }
.light-blue.lighten-5 {
background-color: #e1f5fe !important; }
.light-blue-text.text-lighten-5 {
color: #e1f5fe !important; }
.light-blue.lighten-4 {
background-color: #b3e5fc !important; }
.light-blue-text.text-lighten-4 {
color: #b3e5fc !important; }
.light-blue.lighten-3 {
background-color: #81d4fa !important; }
.light-blue-text.text-lighten-3 {
color: #81d4fa !important; }
.light-blue.lighten-2 {
background-color: #4fc3f7 !important; }
.light-blue-text.text-lighten-2 {
color: #4fc3f7 !important; }
.light-blue.lighten-1 {
background-color: #29b6f6 !important; }
.light-blue-text.text-lighten-1 {
color: #29b6f6 !important; }
.light-blue {
background-color: #03a9f4 !important; }
.light-blue-text {
color: #03a9f4 !important; }
.light-blue.darken-1 {
background-color: #039be5 !important; }
.light-blue-text.text-darken-1 {
color: #039be5 !important; }
.light-blue.darken-2 {
background-color: #0288d1 !important; }
.light-blue-text.text-darken-2 {
color: #0288d1 !important; }
.light-blue.darken-3 {
background-color: #0277bd !important; }
.light-blue-text.text-darken-3 {
color: #0277bd !important; }
.light-blue.darken-4 {
background-color: #01579b !important; }
.light-blue-text.text-darken-4 {
color: #01579b !important; }
.light-blue.accent-1 {
background-color: #80d8ff !important; }
.light-blue-text.text-accent-1 {
color: #80d8ff !important; }
.light-blue.accent-2 {
background-color: #40c4ff !important; }
.light-blue-text.text-accent-2 {
color: #40c4ff !important; }
.light-blue.accent-3 {
background-color: #00b0ff !important; }
.light-blue-text.text-accent-3 {
color: #00b0ff !important; }
.light-blue.accent-4 {
background-color: #0091ea !important; }
.light-blue-text.text-accent-4 {
color: #0091ea !important; }
.cyan.lighten-5 {
background-color: #e0f7fa !important; }
.cyan-text.text-lighten-5 {
color: #e0f7fa !important; }
.cyan.lighten-4 {
background-color: #b2ebf2 !important; }
.cyan-text.text-lighten-4 {
color: #b2ebf2 !important; }
.cyan.lighten-3 {
background-color: #80deea !important; }
.cyan-text.text-lighten-3 {
color: #80deea !important; }
.cyan.lighten-2 {
background-color: #4dd0e1 !important; }
.cyan-text.text-lighten-2 {
color: #4dd0e1 !important; }
.cyan.lighten-1 {
background-color: #26c6da !important; }
.cyan-text.text-lighten-1 {
color: #26c6da !important; }
.cyan {
background-color: #00bcd4 !important; }
.cyan-text {
color: #00bcd4 !important; }
.cyan.darken-1 {
background-color: #00acc1 !important; }
.cyan-text.text-darken-1 {
color: #00acc1 !important; }
.cyan.darken-2 {
background-color: #0097a7 !important; }
.cyan-text.text-darken-2 {
color: #0097a7 !important; }
.cyan.darken-3 {
background-color: #00838f !important; }
.cyan-text.text-darken-3 {
color: #00838f !important; }
.cyan.darken-4 {
background-color: #006064 !important; }
.cyan-text.text-darken-4 {
color: #006064 !important; }
.cyan.accent-1 {
background-color: #84ffff !important; }
.cyan-text.text-accent-1 {
color: #84ffff !important; }
.cyan.accent-2 {
background-color: #18ffff !important; }
.cyan-text.text-accent-2 {
color: #18ffff !important; }
.cyan.accent-3 {
background-color: #00e5ff !important; }
.cyan-text.text-accent-3 {
color: #00e5ff !important; }
.cyan.accent-4 {
background-color: #00b8d4 !important; }
.cyan-text.text-accent-4 {
color: #00b8d4 !important; }
.teal.lighten-5 {
background-color: #e0f2f1 !important; }
.teal-text.text-lighten-5 {
color: #e0f2f1 !important; }
.teal.lighten-4 {
background-color: #b2dfdb !important; }
.teal-text.text-lighten-4 {
color: #b2dfdb !important; }
.teal.lighten-3 {
background-color: #80cbc4 !important; }
.teal-text.text-lighten-3 {
color: #80cbc4 !important; }
.teal.lighten-2 {
background-color: #4db6ac !important; }
.teal-text.text-lighten-2 {
color: #4db6ac !important; }
.teal.lighten-1 {
background-color: #26a69a !important; }
.teal-text.text-lighten-1 {
color: #26a69a !important; }
.teal {
background-color: #009688 !important; }
.teal-text {
color: #009688 !important; }
.teal.darken-1 {
background-color: #00897b !important; }
.teal-text.text-darken-1 {
color: #00897b !important; }
.teal.darken-2 {
background-color: #00796b !important; }
.teal-text.text-darken-2 {
color: #00796b !important; }
.teal.darken-3 {
background-color: #00695c !important; }
.teal-text.text-darken-3 {
color: #00695c !important; }
.teal.darken-4 {
background-color: #004d40 !important; }
.teal-text.text-darken-4 {
color: #004d40 !important; }
.teal.accent-1 {
background-color: #a7ffeb !important; }
.teal-text.text-accent-1 {
color: #a7ffeb !important; }
.teal.accent-2 {
background-color: #64ffda !important; }
.teal-text.text-accent-2 {
color: #64ffda !important; }
.teal.accent-3 {
background-color: #1de9b6 !important; }
.teal-text.text-accent-3 {
color: #1de9b6 !important; }
.teal.accent-4 {
background-color: #00bfa5 !important; }
.teal-text.text-accent-4 {
color: #00bfa5 !important; }
.green.lighten-5 {
background-color: #E8F5E9 !important; }
.green-text.text-lighten-5 {
color: #E8F5E9 !important; }
.green.lighten-4 {
background-color: #C8E6C9 !important; }
.green-text.text-lighten-4 {
color: #C8E6C9 !important; }
.green.lighten-3 {
background-color: #A5D6A7 !important; }
.green-text.text-lighten-3 {
color: #A5D6A7 !important; }
.green.lighten-2 {
background-color: #81C784 !important; }
.green-text.text-lighten-2 {
color: #81C784 !important; }
.green.lighten-1 {
background-color: #66BB6A !important; }
.green-text.text-lighten-1 {
color: #66BB6A !important; }
.green {
background-color: #4CAF50 !important; }
.green-text {
color: #4CAF50 !important; }
.green.darken-1 {
background-color: #43A047 !important; }
.green-text.text-darken-1 {
color: #43A047 !important; }
.green.darken-2 {
background-color: #388E3C !important; }
.green-text.text-darken-2 {
color: #388E3C !important; }
.green.darken-3 {
background-color: #2E7D32 !important; }
.green-text.text-darken-3 {
color: #2E7D32 !important; }
.green.darken-4 {
background-color: #1B5E20 !important; }
.green-text.text-darken-4 {
color: #1B5E20 !important; }
.green.accent-1 {
background-color: #B9F6CA !important; }
.green-text.text-accent-1 {
color: #B9F6CA !important; }
.green.accent-2 {
background-color: #69F0AE !important; }
.green-text.text-accent-2 {
color: #69F0AE !important; }
.green.accent-3 {
background-color: #00E676 !important; }
.green-text.text-accent-3 {
color: #00E676 !important; }
.green.accent-4 {
background-color: #00C853 !important; }
.green-text.text-accent-4 {
color: #00C853 !important; }
.light-green.lighten-5 {
background-color: #f1f8e9 !important; }
.light-green-text.text-lighten-5 {
color: #f1f8e9 !important; }
.light-green.lighten-4 {
background-color: #dcedc8 !important; }
.light-green-text.text-lighten-4 {
color: #dcedc8 !important; }
.light-green.lighten-3 {
background-color: #c5e1a5 !important; }
.light-green-text.text-lighten-3 {
color: #c5e1a5 !important; }
.light-green.lighten-2 {
background-color: #aed581 !important; }
.light-green-text.text-lighten-2 {
color: #aed581 !important; }
.light-green.lighten-1 {
background-color: #9ccc65 !important; }
.light-green-text.text-lighten-1 {
color: #9ccc65 !important; }
.light-green {
background-color: #8bc34a !important; }
.light-green-text {
color: #8bc34a !important; }
.light-green.darken-1 {
background-color: #7cb342 !important; }
.light-green-text.text-darken-1 {
color: #7cb342 !important; }
.light-green.darken-2 {
background-color: #689f38 !important; }
.light-green-text.text-darken-2 {
color: #689f38 !important; }
.light-green.darken-3 {
background-color: #558b2f !important; }
.light-green-text.text-darken-3 {
color: #558b2f !important; }
.light-green.darken-4 {
background-color: #33691e !important; }
.light-green-text.text-darken-4 {
color: #33691e !important; }
.light-green.accent-1 {
background-color: #ccff90 !important; }
.light-green-text.text-accent-1 {
color: #ccff90 !important; }
.light-green.accent-2 {
background-color: #b2ff59 !important; }
.light-green-text.text-accent-2 {
color: #b2ff59 !important; }
.light-green.accent-3 {
background-color: #76ff03 !important; }
.light-green-text.text-accent-3 {
color: #76ff03 !important; }
.light-green.accent-4 {
background-color: #64dd17 !important; }
.light-green-text.text-accent-4 {
color: #64dd17 !important; }
.lime.lighten-5 {
background-color: #f9fbe7 !important; }
.lime-text.text-lighten-5 {
color: #f9fbe7 !important; }
.lime.lighten-4 {
background-color: #f0f4c3 !important; }
.lime-text.text-lighten-4 {
color: #f0f4c3 !important; }
.lime.lighten-3 {
background-color: #e6ee9c !important; }
.lime-text.text-lighten-3 {
color: #e6ee9c !important; }
.lime.lighten-2 {
background-color: #dce775 !important; }
.lime-text.text-lighten-2 {
color: #dce775 !important; }
.lime.lighten-1 {
background-color: #d4e157 !important; }
.lime-text.text-lighten-1 {
color: #d4e157 !important; }
.lime {
background-color: #cddc39 !important; }
.lime-text {
color: #cddc39 !important; }
.lime.darken-1 {
background-color: #c0ca33 !important; }
.lime-text.text-darken-1 {
color: #c0ca33 !important; }
.lime.darken-2 {
background-color: #afb42b !important; }
.lime-text.text-darken-2 {
color: #afb42b !important; }
.lime.darken-3 {
background-color: #9e9d24 !important; }
.lime-text.text-darken-3 {
color: #9e9d24 !important; }
.lime.darken-4 {
background-color: #827717 !important; }
.lime-text.text-darken-4 {
color: #827717 !important; }
.lime.accent-1 {
background-color: #f4ff81 !important; }
.lime-text.text-accent-1 {
color: #f4ff81 !important; }
.lime.accent-2 {
background-color: #eeff41 !important; }
.lime-text.text-accent-2 {
color: #eeff41 !important; }
.lime.accent-3 {
background-color: #c6ff00 !important; }
.lime-text.text-accent-3 {
color: #c6ff00 !important; }
.lime.accent-4 {
background-color: #aeea00 !important; }
.lime-text.text-accent-4 {
color: #aeea00 !important; }
.yellow.lighten-5 {
background-color: #fffde7 !important; }
.yellow-text.text-lighten-5 {
color: #fffde7 !important; }
.yellow.lighten-4 {
background-color: #fff9c4 !important; }
.yellow-text.text-lighten-4 {
color: #fff9c4 !important; }
.yellow.lighten-3 {
background-color: #fff59d !important; }
.yellow-text.text-lighten-3 {
color: #fff59d !important; }
.yellow.lighten-2 {
background-color: #fff176 !important; }
.yellow-text.text-lighten-2 {
color: #fff176 !important; }
.yellow.lighten-1 {
background-color: #ffee58 !important; }
.yellow-text.text-lighten-1 {
color: #ffee58 !important; }
.yellow {
background-color: #ffeb3b !important; }
.yellow-text {
color: #ffeb3b !important; }
.yellow.darken-1 {
background-color: #fdd835 !important; }
.yellow-text.text-darken-1 {
color: #fdd835 !important; }
.yellow.darken-2 {
background-color: #fbc02d !important; }
.yellow-text.text-darken-2 {
color: #fbc02d !important; }
.yellow.darken-3 {
background-color: #f9a825 !important; }
.yellow-text.text-darken-3 {
color: #f9a825 !important; }
.yellow.darken-4 {
background-color: #f57f17 !important; }
.yellow-text.text-darken-4 {
color: #f57f17 !important; }
.yellow.accent-1 {
background-color: #ffff8d !important; }
.yellow-text.text-accent-1 {
color: #ffff8d !important; }
.yellow.accent-2 {
background-color: #ffff00 !important; }
.yellow-text.text-accent-2 {
color: #ffff00 !important; }
.yellow.accent-3 {
background-color: #ffea00 !important; }
.yellow-text.text-accent-3 {
color: #ffea00 !important; }
.yellow.accent-4 {
background-color: #ffd600 !important; }
.yellow-text.text-accent-4 {
color: #ffd600 !important; }
.amber.lighten-5 {
background-color: #fff8e1 !important; }
.amber-text.text-lighten-5 {
color: #fff8e1 !important; }
.amber.lighten-4 {
background-color: #ffecb3 !important; }
.amber-text.text-lighten-4 {
color: #ffecb3 !important; }
.amber.lighten-3 {
background-color: #ffe082 !important; }
.amber-text.text-lighten-3 {
color: #ffe082 !important; }
.amber.lighten-2 {
background-color: #ffd54f !important; }
.amber-text.text-lighten-2 {
color: #ffd54f !important; }
.amber.lighten-1 {
background-color: #ffca28 !important; }
.amber-text.text-lighten-1 {
color: #ffca28 !important; }
.amber {
background-color: #ffc107 !important; }
.amber-text {
color: #ffc107 !important; }
.amber.darken-1 {
background-color: #ffb300 !important; }
.amber-text.text-darken-1 {
color: #ffb300 !important; }
.amber.darken-2 {
background-color: #ffa000 !important; }
.amber-text.text-darken-2 {
color: #ffa000 !important; }
.amber.darken-3 {
background-color: #ff8f00 !important; }
.amber-text.text-darken-3 {
color: #ff8f00 !important; }
.amber.darken-4 {
background-color: #ff6f00 !important; }
.amber-text.text-darken-4 {
color: #ff6f00 !important; }
.amber.accent-1 {
background-color: #ffe57f !important; }
.amber-text.text-accent-1 {
color: #ffe57f !important; }
.amber.accent-2 {
background-color: #ffd740 !important; }
.amber-text.text-accent-2 {
color: #ffd740 !important; }
.amber.accent-3 {
background-color: #ffc400 !important; }
.amber-text.text-accent-3 {
color: #ffc400 !important; }
.amber.accent-4 {
background-color: #ffab00 !important; }
.amber-text.text-accent-4 {
color: #ffab00 !important; }
.orange.lighten-5 {
background-color: #fff3e0 !important; }
.orange-text.text-lighten-5 {
color: #fff3e0 !important; }
.orange.lighten-4 {
background-color: #ffe0b2 !important; }
.orange-text.text-lighten-4 {
color: #ffe0b2 !important; }
.orange.lighten-3 {
background-color: #ffcc80 !important; }
.orange-text.text-lighten-3 {
color: #ffcc80 !important; }
.orange.lighten-2 {
background-color: #ffb74d !important; }
.orange-text.text-lighten-2 {
color: #ffb74d !important; }
.orange.lighten-1 {
background-color: #ffa726 !important; }
.orange-text.text-lighten-1 {
color: #ffa726 !important; }
.orange {
background-color: #ff9800 !important; }
.orange-text {
color: #ff9800 !important; }
.orange.darken-1 {
background-color: #fb8c00 !important; }
.orange-text.text-darken-1 {
color: #fb8c00 !important; }
.orange.darken-2 {
background-color: #f57c00 !important; }
.orange-text.text-darken-2 {
color: #f57c00 !important; }
.orange.darken-3 {
background-color: #ef6c00 !important; }
.orange-text.text-darken-3 {
color: #ef6c00 !important; }
.orange.darken-4 {
background-color: #e65100 !important; }
.orange-text.text-darken-4 {
color: #e65100 !important; }
.orange.accent-1 {
background-color: #ffd180 !important; }
.orange-text.text-accent-1 {
color: #ffd180 !important; }
.orange.accent-2 {
background-color: #ffab40 !important; }
.orange-text.text-accent-2 {
color: #ffab40 !important; }
.orange.accent-3 {
background-color: #ff9100 !important; }
.orange-text.text-accent-3 {
color: #ff9100 !important; }
.orange.accent-4 {
background-color: #ff6d00 !important; }
.orange-text.text-accent-4 {
color: #ff6d00 !important; }
.deep-orange.lighten-5 {
background-color: #fbe9e7 !important; }
.deep-orange-text.text-lighten-5 {
color: #fbe9e7 !important; }
.deep-orange.lighten-4 {
background-color: #ffccbc !important; }
.deep-orange-text.text-lighten-4 {
color: #ffccbc !important; }
.deep-orange.lighten-3 {
background-color: #ffab91 !important; }
.deep-orange-text.text-lighten-3 {
color: #ffab91 !important; }
.deep-orange.lighten-2 {
background-color: #ff8a65 !important; }
.deep-orange-text.text-lighten-2 {
color: #ff8a65 !important; }
.deep-orange.lighten-1 {
background-color: #ff7043 !important; }
.deep-orange-text.text-lighten-1 {
color: #ff7043 !important; }
.deep-orange {
background-color: #ff5722 !important; }
.deep-orange-text {
color: #ff5722 !important; }
.deep-orange.darken-1 {
background-color: #f4511e !important; }
.deep-orange-text.text-darken-1 {
color: #f4511e !important; }
.deep-orange.darken-2 {
background-color: #e64a19 !important; }
.deep-orange-text.text-darken-2 {
color: #e64a19 !important; }
.deep-orange.darken-3 {
background-color: #d84315 !important; }
.deep-orange-text.text-darken-3 {
color: #d84315 !important; }
.deep-orange.darken-4 {
background-color: #bf360c !important; }
.deep-orange-text.text-darken-4 {
color: #bf360c !important; }
.deep-orange.accent-1 {
background-color: #ff9e80 !important; }
.deep-orange-text.text-accent-1 {
color: #ff9e80 !important; }
.deep-orange.accent-2 {
background-color: #ff6e40 !important; }
.deep-orange-text.text-accent-2 {
color: #ff6e40 !important; }
.deep-orange.accent-3 {
background-color: #ff3d00 !important; }
.deep-orange-text.text-accent-3 {
color: #ff3d00 !important; }
.deep-orange.accent-4 {
background-color: #dd2c00 !important; }
.deep-orange-text.text-accent-4 {
color: #dd2c00 !important; }
.brown.lighten-5 {
background-color: #efebe9 !important; }
.brown-text.text-lighten-5 {
color: #efebe9 !important; }
.brown.lighten-4 {
background-color: #d7ccc8 !important; }
.brown-text.text-lighten-4 {
color: #d7ccc8 !important; }
.brown.lighten-3 {
background-color: #bcaaa4 !important; }
.brown-text.text-lighten-3 {
color: #bcaaa4 !important; }
.brown.lighten-2 {
background-color: #a1887f !important; }
.brown-text.text-lighten-2 {
color: #a1887f !important; }
.brown.lighten-1 {
background-color: #8d6e63 !important; }
.brown-text.text-lighten-1 {
color: #8d6e63 !important; }
.brown {
background-color: #795548 !important; }
.brown-text {
color: #795548 !important; }
.brown.darken-1 {
background-color: #6d4c41 !important; }
.brown-text.text-darken-1 {
color: #6d4c41 !important; }
.brown.darken-2 {
background-color: #5d4037 !important; }
.brown-text.text-darken-2 {
color: #5d4037 !important; }
.brown.darken-3 {
background-color: #4e342e !important; }
.brown-text.text-darken-3 {
color: #4e342e !important; }
.brown.darken-4 {
background-color: #3e2723 !important; }
.brown-text.text-darken-4 {
color: #3e2723 !important; }
.blue-grey.lighten-5 {
background-color: #eceff1 !important; }
.blue-grey-text.text-lighten-5 {
color: #eceff1 !important; }
.blue-grey.lighten-4 {
background-color: #cfd8dc !important; }
.blue-grey-text.text-lighten-4 {
color: #cfd8dc !important; }
.blue-grey.lighten-3 {
background-color: #b0bec5 !important; }
.blue-grey-text.text-lighten-3 {
color: #b0bec5 !important; }
.blue-grey.lighten-2 {
background-color: #90a4ae !important; }
.blue-grey-text.text-lighten-2 {
color: #90a4ae !important; }
.blue-grey.lighten-1 {
background-color: #78909c !important; }
.blue-grey-text.text-lighten-1 {
color: #78909c !important; }
.blue-grey {
background-color: #607d8b !important; }
.blue-grey-text {
color: #607d8b !important; }
.blue-grey.darken-1 {
background-color: #546e7a !important; }
.blue-grey-text.text-darken-1 {
color: #546e7a !important; }
.blue-grey.darken-2 {
background-color: #455a64 !important; }
.blue-grey-text.text-darken-2 {
color: #455a64 !important; }
.blue-grey.darken-3 {
background-color: #37474f !important; }
.blue-grey-text.text-darken-3 {
color: #37474f !important; }
.blue-grey.darken-4 {
background-color: #263238 !important; }
.blue-grey-text.text-darken-4 {
color: #263238 !important; }
.grey.lighten-5 {
background-color: #fafafa !important; }
.grey-text.text-lighten-5 {
color: #fafafa !important; }
.grey.lighten-4 {
background-color: #f5f5f5 !important; }
.grey-text.text-lighten-4 {
color: #f5f5f5 !important; }
.grey.lighten-3 {
background-color: #eeeeee !important; }
.grey-text.text-lighten-3 {
color: #eeeeee !important; }
.grey.lighten-2 {
background-color: #e0e0e0 !important; }
.grey-text.text-lighten-2 {
color: #e0e0e0 !important; }
.grey.lighten-1 {
background-color: #bdbdbd !important; }
.grey-text.text-lighten-1 {
color: #bdbdbd !important; }
.grey {
background-color: #9e9e9e !important; }
.grey-text {
color: #9e9e9e !important; }
.grey.darken-1 {
background-color: #757575 !important; }
.grey-text.text-darken-1 {
color: #757575 !important; }
.grey.darken-2 {
background-color: #616161 !important; }
.grey-text.text-darken-2 {
color: #616161 !important; }
.grey.darken-3 {
background-color: #424242 !important; }
.grey-text.text-darken-3 {
color: #424242 !important; }
.grey.darken-4 {
background-color: #212121 !important; }
.grey-text.text-darken-4 {
color: #212121 !important; }
.shades.black {
background-color: #000000 !important; }
.shades-text.text-black {
color: #000000 !important; }
.shades.white {
background-color: #FFFFFF !important; }
.shades-text.text-white {
color: #FFFFFF !important; }
.black {
background-color: #000000 !important; }
.black-text {
color: #000000 !important; }
.white {
background-color: #FFFFFF !important; }
.white-text {
color: #FFFFFF !important; }
/*** Buttons ***/
/*** Cards ***/
/*** Collapsible ***/
/*** Forms ***/
/*** Global ***/
/*** Navbar ***/
/*** SideNav ***/
/*** Tables ***/
/*** Toasts ***/
/*** Typography ***/
/*** Collections ***/
/* Progress Bar */
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */ }
/**
* Remove default margin.
*/
body {
margin: 0; }
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display: block; }
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio, canvas, progress, video {
display: inline-block;
/* 1 */
vertical-align: baseline;
/* 2 */ }
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0; }
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
*/
[hidden], template {
display: none; }
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background: transparent; }
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active, a:hover {
outline: 0; }
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted; }
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b, strong {
font-weight: bold; }
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic; }
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0; }
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000; }
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%; }
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline; }
sup {
top: -0.5em; }
sub {
bottom: -0.25em; }
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0; }
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden; }
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px; }
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0; }
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto; }
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code, kbd, pre, samp {
font-family: monospace, monospace;
font-size: 1em; }
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button, input, optgroup, select, textarea {
color: inherit;
/* 1 */
font: inherit;
/* 2 */
margin: 0;
/* 3 */ }
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible; }
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button, select {
text-transform: none; }
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button, html input[type="button"], input[type="reset"], input[type="submit"] {
-webkit-appearance: button;
/* 2 */
cursor: pointer;
/* 3 */ }
/**
* Re-set default cursor for disabled elements.
*/
button[disabled], html input[disabled] {
cursor: default; }
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;
padding: 0; }
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal; }
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"], input[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button {
height: auto; }
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield;
/* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
/* 2 */
box-sizing: content-box; }
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; }
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em; }
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto; }
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold; }
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0; }
td, th {
padding: 0; }
html {
box-sizing: border-box; }
*, *:before, *:after {
box-sizing: inherit; }
ul {
list-style-type: none; }
a {
color: #1E88E5;
text-decoration: none; }
.valign-wrapper {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center; }
.valign-wrapper .valign {
display: block; }
ul {
padding: 0; }
ul li {
list-style-type: none; }
.z-depth-1, nav, .card-panel, .card, .toast, .btn, .btn-large, .btn-floating, .dropdown-content, .collapsible, ul.side-nav.full, ul.side-nav.fixed {
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); }
.z-depth-1-half, .btn:hover, .btn-large:hover, .btn-floating:hover, .modal {
-webkit-box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15); }
.z-depth-2 {
-webkit-box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-moz-box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }
.z-depth-3 {
-webkit-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
-moz-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19); }
.z-depth-4 {
-webkit-box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22), 0 25px 55px 0 rgba(0, 0, 0, 0.21);
-moz-box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22), 0 25px 55px 0 rgba(0, 0, 0, 0.21);
box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22), 0 25px 55px 0 rgba(0, 0, 0, 0.21); }
.z-depth-5 {
-webkit-box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
-moz-box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22); }
.divider {
height: 1px;
overflow: hidden;
background-color: #e0e0e0; }
blockquote {
margin: 20px 0;
padding-left: 1.5rem;
border-left: 5px solid #EF9A9A; }
i {
line-height: inherit; }
i.left {
float: left;
margin-right: 15px; }
i.right {
float: right;
margin-left: 15px; }
i.small {
font-size: 2rem; }
i.medium {
font-size: 4rem; }
i.large {
font-size: 6rem; }
img.responsive-img {
max-width: 100%;
height: auto; }
.parallax-container {
position: relative;
overflow: hidden;
height: 500px; }
.parallax {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1; }
.parallax img {
display: none;
position: absolute;
bottom: 0;
width: 100%; }
@media only screen and (max-width : 992px) {
.parallax-container {
height: auto; }
.parallax {
position: relative;
width: 100%; }
.parallax img {
position: relative; }
}
.pin-top, .pin-bottom {
position: relative; }
.pinned {
position: fixed; }
@media only screen and (max-width : 600px) {
.hide-on-small-only, .hide-on-small-and-down {
display: none !important; } }
@media only screen and (max-width : 992px) {
.hide-on-med-and-down {
display: none !important; } }
@media only screen and (min-width : 601px) {
.hide-on-med-and-up {
display: none !important; } }
@media only screen and (min-width: 600px) and (max-width: 992px) {
.hide-on-med-only {
display: none !important; } }
@media only screen and (min-width : 993px) {
.hide-on-large-only, nav a.button-collapse {
display: none !important; } }
@media only screen and (max-width : 600px) {
.center-on-small-only {
text-align: center; } }
footer.page-footer {
margin-top: 20px;
padding-top: 20px;
background-color: #ee6e73; }
footer.page-footer .footer-copyright {
line-height: 50px;
color: rgba(255, 255, 255, 0.8);
background-color: rgba(51, 51, 51, 0.08); }
table, th, td {
border: none; }
table {
width: 100%;
display: table; }
table.bordered tr {
border-bottom: 1px solid #d0d0d0; }
table.striped tbody tr:nth-child(odd) {
background-color: #f2f2f2; }
table.hoverable tbody tr {
-webkit-transition: background-color 0.25s ease;
-moz-transition: background-color 0.25s ease;
-o-transition: background-color 0.25s ease;
-ms-transition: background-color 0.25s ease;
transition: background-color 0.25s ease; }
table.hoverable tbody tr:hover {
background-color: #f2f2f2; }
table.centered thead tr th, table.centered tbody tr td {
text-align: center; }
thead {
border-bottom: 1px solid #d0d0d0; }
td, th {
padding: 15px 5px;
display: table-cell;
text-align: left;
vertical-align: middle;
border-radius: 2px; }
@media only screen and (max-width : 992px) {
table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
display: block;
position: relative;
/* sort out borders */ }
table th, table td {
margin: 0;
vertical-align: top; }
table th {
text-align: left; }
table thead {
display: block;
float: left; }
table thead tr {
display: block;
padding: 0 10px 0 0; }
table tbody {
display: block;
width: auto;
position: relative;
overflow-x: auto;
white-space: nowrap; }
table tbody tr {
display: inline-block;
vertical-align: top; }
table th {
display: block;
text-align: right; }
table td {
display: block;
min-height: 1.25em;
text-align: left; }
table tr {
padding: 0 10px; }
table thead {
border: 0;
border-right: 1px solid #d0d0d0; }
table.bordered th {
border-bottom: 0;
border-left: 0; }
table.bordered td {
border-left: 0;
border-right: 0;
border-bottom: 0; }
table.bordered tr {
border: 0; }
table.bordered tbody tr {
border-right: 1px solid #d0d0d0; }
}
.collection {
background-color: #fff;
margin: 0.5rem 0 1rem 0;
border: 1px solid #e0e0e0;
border-radius: 2px; }
.collection .collection-item {
line-height: 1.5rem;
padding: 10px 20px;
margin: 0px;
border-bottom: 1px solid #e0e0e0; }
.collection .collection-item:last-child {
border-bottom: none; }
.collection .collection-item.active {
background-color: #42A5F5;
color: #BBDEFB; }
.collection a.collection-item {
display: block;
-webkit-transition: 0.25s;
-moz-transition: 0.25s;
-o-transition: 0.25s;
-ms-transition: 0.25s;
transition: 0.25s; }
.collection a.collection-item:not(.active):hover {
background-color: rgba(0, 0, 0, 0.08); }
.collection.with-header .collection-header {
border-bottom: 1px solid #e0e0e0;
padding: 10px 20px; }
.collection.with-header .collection-item {
padding-left: 30px; }
.collection .secondary-content {
float: right; }
.collection.pagination {
display: inline-block; }
.collection.pagination ul {
background-color: transparent;
font-size: 0;
display: inline-block; }
.collection.pagination li {
display: inline;
font-weight: 500;
margin: 0px;
padding: 0px;
font-size: 1rem; }
.collection.pagination li a {
padding: 0px 5px; }
.collection.pagination li.active {
background-color: #03a9f4;
color: #FFF; }
.collection.pagination li:hover {
background-color: #e1f5fe; }
span.badge {
min-width: 3rem;
padding: 0 6px;
text-align: center;
font-size: 1rem;
line-height: inherit;
color: #757575;
float: right;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
span.badge.new {
font-weight: 300;
font-size: 0.8rem;
color: #fff;
background-color: #2196F3;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box; }
span.badge.new:after {
content: " new"; }
.video-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden; }
.video-container iframe, .video-container object, .video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; }
.progress {
position: relative;
height: 4px;
display: block;
width: 100%;
background-color: #c5ecfe;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box;
margin: 0.5rem 0 1rem 0;
overflow: hidden; }
.progress .determinate {
position: absolute;
background-color: inherit;
top: 0;
bottom: 0;
background-color: #03a9f4;
-webkit-transition: width 0.3s linear;
-moz-transition: width 0.3s linear;
-o-transition: width 0.3s linear;
-ms-transition: width 0.3s linear;
transition: width 0.3s linear; }
.progress .indeterminate {
background-color: #03a9f4; }
.progress .indeterminate:before {
content: '';
position: absolute;
background-color: inherit;
top: 0;
left: 0;
bottom: 0;
will-change: left, right;
-webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
-moz-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
-ms-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
-o-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; }
.progress .indeterminate:after {
content: '';
position: absolute;
background-color: inherit;
top: 0;
left: 0;
bottom: 0;
will-change: left, right;
-webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
-moz-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
-ms-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
-o-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
-webkit-animation-delay: 1.15s;
-moz-animation-delay: 1.15s;
-ms-animation-delay: 1.15s;
-o-animation-delay: 1.15s;
animation-delay: 1.15s; }
@-webkit-keyframes indeterminate {
0% {
left: -35%;
right: 100%; }
60% {
left: 100%;
right: -90%; }
100% {
left: 100%;
right: -90%; } }
@-moz-keyframes indeterminate {
0% {
left: -35%;
right: 100%; }
60% {
left: 100%;
right: -90%; }
100% {
left: 100%;
right: -90%; } }
@keyframes indeterminate {
0% {
left: -35%;
right: 100%; }
60% {
left: 100%;
right: -90%; }
100% {
left: 100%;
right: -90%; } }
@-webkit-keyframes indeterminate-short {
0% {
left: -200%;
right: 100%; }
60% {
left: 107%;
right: -8%; }
100% {
left: 107%;
right: -8%; } }
@-moz-keyframes indeterminate-short {
0% {
left: -200%;
right: 100%; }
60% {
left: 107%;
right: -8%; }
100% {
left: 107%;
right: -8%; } }
@keyframes indeterminate-short {
0% {
left: -200%;
right: 100%; }
60% {
left: 107%;
right: -8%; }
100% {
left: 107%;
right: -8%; } }
/*******************
Utility Classes
*******************/
.left-align {
text-align: left; }
.right-align {
text-align: right; }
.center, .center-align {
text-align: center; }
.left {
float: left !important; }
.right {
float: right !important; }
.no-select, input[type=range], input[type=range] + .thumb {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.circle {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
background-clip: padding-box; }
.center-block {
display: block;
margin-left: auto;
margin-right: auto; }
@font-face {
font-family: "Material-Design-Icons";
src: url("../font/material-design-icons/Material-Design-Icons.eot?-g7cqhn");
src: url("../font/material-design-icons/Material-Design-Icons.eot?#iefix-g7cqhn") format("embedded-opentype"), url("../font/material-design-icons/Material-Design-Icons.woff?-g7cqhn") format("woff"), url("../font/material-design-icons/Material-Design-Icons.ttf?-g7cqhn") format("truetype"), url("../font/material-design-icons/Material-Design-Icons.svg?-g7cqhn#Material-Design-Icons") format("svg");
font-weight: normal;
font-style: normal; }
[class^="mdi-"], .select-wrapper span.select-dropdown:after, [class*=" mdi-"] {
font-family: "Material-Design-Icons";
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }
.mdi-action-3d-rotation:before {
content: "\e600"; }
.mdi-action-accessibility:before {
content: "\e601"; }
.mdi-action-account-balance:before {
content: "\e602"; }
.mdi-action-account-balance-wallet:before {
content: "\e603"; }
.mdi-action-account-box:before {
content: "\e604"; }
.mdi-action-account-child:before {
content: "\e605"; }
.mdi-action-account-circle:before {
content: "\e606"; }
.mdi-action-add-shopping-cart:before {
content: "\e607"; }
.mdi-action-alarm:before {
content: "\e608"; }
.mdi-action-alarm-add:before {
content: "\e609"; }
.mdi-action-alarm-off:before {
content: "\e60a"; }
.mdi-action-alarm-on:before {
content: "\e60b"; }
.mdi-action-android:before {
content: "\e60c"; }
.mdi-action-announcement:before {
content: "\e60d"; }
.mdi-action-aspect-ratio:before {
content: "\e60e"; }
.mdi-action-assessment:before {
content: "\e60f"; }
.mdi-action-assignment:before {
content: "\e610"; }
.mdi-action-assignment-ind:before {
content: "\e611"; }
.mdi-action-assignment-late:before {
content: "\e612"; }
.mdi-action-assignment-return:before {
content: "\e613"; }
.mdi-action-assignment-returned:before {
content: "\e614"; }
.mdi-action-assignment-turned-in:before {
content: "\e615"; }
.mdi-action-autorenew:before {
content: "\e616"; }
.mdi-action-backup:before {
content: "\e617"; }
.mdi-action-book:before {
content: "\e618"; }
.mdi-action-bookmark:before {
content: "\e619"; }
.mdi-action-bookmark-outline:before {
content: "\e61a"; }
.mdi-action-bug-report:before {
content: "\e61b"; }
.mdi-action-cached:before {
content: "\e61c"; }
.mdi-action-class:before {
content: "\e61d"; }
.mdi-action-credit-card:before {
content: "\e61e"; }
.mdi-action-dashboard:before {
content: "\e61f"; }
.mdi-action-delete:before {
content: "\e620"; }
.mdi-action-description:before {
content: "\e621"; }
.mdi-action-dns:before {
content: "\e622"; }
.mdi-action-done:before {
content: "\e623"; }
.mdi-action-done-all:before {
content: "\e624"; }
.mdi-action-event:before {
content: "\e625"; }
.mdi-action-exit-to-app:before {
content: "\e626"; }
.mdi-action-explore:before {
content: "\e627"; }
.mdi-action-extension:before {
content: "\e628"; }
.mdi-action-face-unlock:before {
content: "\e629"; }
.mdi-action-favorite:before {
content: "\e62a"; }
.mdi-action-favorite-outline:before {
content: "\e62b"; }
.mdi-action-find-in-page:before {
content: "\e62c"; }
.mdi-action-find-replace:before {
content: "\e62d"; }
.mdi-action-flip-to-back:before {
content: "\e62e"; }
.mdi-action-flip-to-front:before {
content: "\e62f"; }
.mdi-action-get-app:before {
content: "\e630"; }
.mdi-action-grade:before {
content: "\e631"; }
.mdi-action-group-work:before {
content: "\e632"; }
.mdi-action-help:before {
content: "\e633"; }
.mdi-action-highlight-remove:before {
content: "\e634"; }
.mdi-action-history:before {
content: "\e635"; }
.mdi-action-home:before {
content: "\e636"; }
.mdi-action-https:before {
content: "\e637"; }
.mdi-action-info:before {
content: "\e638"; }
.mdi-action-info-outline:before {
content: "\e639"; }
.mdi-action-input:before {
content: "\e63a"; }
.mdi-action-invert-colors:before {
content: "\e63b"; }
.mdi-action-label:before {
content: "\e63c"; }
.mdi-action-label-outline:before {
content: "\e63d"; }
.mdi-action-language:before {
content: "\e63e"; }
.mdi-action-launch:before {
content: "\e63f"; }
.mdi-action-list:before {
content: "\e640"; }
.mdi-action-lock:before {
content: "\e641"; }
.mdi-action-lock-open:before {
content: "\e642"; }
.mdi-action-lock-outline:before {
content: "\e643"; }
.mdi-action-loyalty:before {
content: "\e644"; }
.mdi-action-markunread-mailbox:before {
content: "\e645"; }
.mdi-action-note-add:before {
content: "\e646"; }
.mdi-action-open-in-browser:before {
content: "\e647"; }
.mdi-action-open-in-new:before {
content: "\e648"; }
.mdi-action-open-with:before {
content: "\e649"; }
.mdi-action-pageview:before {
content: "\e64a"; }
.mdi-action-payment:before {
content: "\e64b"; }
.mdi-action-perm-camera-mic:before {
content: "\e64c"; }
.mdi-action-perm-contact-cal:before {
content: "\e64d"; }
.mdi-action-perm-data-setting:before {
content: "\e64e"; }
.mdi-action-perm-device-info:before {
content: "\e64f"; }
.mdi-action-perm-identity:before {
content: "\e650"; }
.mdi-action-perm-media:before {
content: "\e651"; }
.mdi-action-perm-phone-msg:before {
content: "\e652"; }
.mdi-action-perm-scan-wifi:before {
content: "\e653"; }
.mdi-action-picture-in-picture:before {
content: "\e654"; }
.mdi-action-polymer:before {
content: "\e655"; }
.mdi-action-print:before {
content: "\e656"; }
.mdi-action-query-builder:before {
content: "\e657"; }
.mdi-action-question-answer:before {
content: "\e658"; }
.mdi-action-receipt:before {
content: "\e659"; }
.mdi-action-redeem:before {
content: "\e65a"; }
.mdi-action-report-problem:before {
content: "\e65b"; }
.mdi-action-restore:before {
content: "\e65c"; }
.mdi-action-room:before {
content: "\e65d"; }
.mdi-action-schedule:before {
content: "\e65e"; }
.mdi-action-search:before {
content: "\e65f"; }
.mdi-action-settings:before {
content: "\e660"; }
.mdi-action-settings-applications:before {
content: "\e661"; }
.mdi-action-settings-backup-restore:before {
content: "\e662"; }
.mdi-action-settings-bluetooth:before {
content: "\e663"; }
.mdi-action-settings-cell:before {
content: "\e664"; }
.mdi-action-settings-display:before {
content: "\e665"; }
.mdi-action-settings-ethernet:before {
content: "\e666"; }
.mdi-action-settings-input-antenna:before {
content: "\e667"; }
.mdi-action-settings-input-component:before {
content: "\e668"; }
.mdi-action-settings-input-composite:before {
content: "\e669"; }
.mdi-action-settings-input-hdmi:before {
content: "\e66a"; }
.mdi-action-settings-input-svideo:before {
content: "\e66b"; }
.mdi-action-settings-overscan:before {
content: "\e66c"; }
.mdi-action-settings-phone:before {
content: "\e66d"; }
.mdi-action-settings-power:before {
content: "\e66e"; }
.mdi-action-settings-remote:before {
content: "\e66f"; }
.mdi-action-settings-voice:before {
content: "\e670"; }
.mdi-action-shop:before {
content: "\e671"; }
.mdi-action-shopping-basket:before {
content: "\e672"; }
.mdi-action-shopping-cart:before {
content: "\e673"; }
.mdi-action-shop-two:before {
content: "\e674"; }
.mdi-action-speaker-notes:before {
content: "\e675"; }
.mdi-action-spellcheck:before {
content: "\e676"; }
.mdi-action-star-rate:before {
content: "\e677"; }
.mdi-action-stars:before {
content: "\e678"; }
.mdi-action-store:before {
content: "\e679"; }
.mdi-action-subject:before {
content: "\e67a"; }
.mdi-action-swap-horiz:before {
content: "\e67b"; }
.mdi-action-swap-vert:before {
content: "\e67c"; }
.mdi-action-swap-vert-circle:before {
content: "\e67d"; }
.mdi-action-system-update-tv:before {
content: "\e67e"; }
.mdi-action-tab:before {
content: "\e67f"; }
.mdi-action-tab-unselected:before {
content: "\e680"; }
.mdi-action-theaters:before {
content: "\e681"; }
.mdi-action-thumb-down:before {
content: "\e682"; }
.mdi-action-thumbs-up-down:before {
content: "\e683"; }
.mdi-action-thumb-up:before {
content: "\e684"; }
.mdi-action-toc:before {
content: "\e685"; }
.mdi-action-today:before {
content: "\e686"; }
.mdi-action-track-changes:before {
content: "\e687"; }
.mdi-action-translate:before {
content: "\e688"; }
.mdi-action-trending-down:before {
content: "\e689"; }
.mdi-action-trending-neutral:before {
content: "\e68a"; }
.mdi-action-trending-up:before {
content: "\e68b"; }
.mdi-action-turned-in:before {
content: "\e68c"; }
.mdi-action-turned-in-not:before {
content: "\e68d"; }
.mdi-action-verified-user:before {
content: "\e68e"; }
.mdi-action-view-agenda:before {
content: "\e68f"; }
.mdi-action-view-array:before {
content: "\e690"; }
.mdi-action-view-carousel:before {
content: "\e691"; }
.mdi-action-view-column:before {
content: "\e692"; }
.mdi-action-view-day:before {
content: "\e693"; }
.mdi-action-view-headline:before {
content: "\e694"; }
.mdi-action-view-list:before {
content: "\e695"; }
.mdi-action-view-module:before {
content: "\e696"; }
.mdi-action-view-quilt:before {
content: "\e697"; }
.mdi-action-view-stream:before {
content: "\e698"; }
.mdi-action-view-week:before {
content: "\e699"; }
.mdi-action-visibility:before {
content: "\e69a"; }
.mdi-action-visibility-off:before {
content: "\e69b"; }
.mdi-action-wallet-giftcard:before {
content: "\e69c"; }
.mdi-action-wallet-membership:before {
content: "\e69d"; }
.mdi-action-wallet-travel:before {
content: "\e69e"; }
.mdi-action-work:before {
content: "\e69f"; }
.mdi-alert-error:before {
content: "\e6a0"; }
.mdi-alert-warning:before {
content: "\e6a1"; }
.mdi-av-album:before {
content: "\e6a2"; }
.mdi-av-timer:before {
content: "\e6a3"; }
.mdi-av-closed-caption:before {
content: "\e6a4"; }
.mdi-av-equalizer:before {
content: "\e6a5"; }
.mdi-av-explicit:before {
content: "\e6a6"; }
.mdi-av-fast-forward:before {
content: "\e6a7"; }
.mdi-av-fast-rewind:before {
content: "\e6a8"; }
.mdi-av-games:before {
content: "\e6a9"; }
.mdi-av-hearing:before {
content: "\e6aa"; }
.mdi-av-high-quality:before {
content: "\e6ab"; }
.mdi-av-loop:before {
content: "\e6ac"; }
.mdi-av-mic:before {
content: "\e6ad"; }
.mdi-av-mic-none:before {
content: "\e6ae"; }
.mdi-av-mic-off:before {
content: "\e6af"; }
.mdi-av-movie:before {
content: "\e6b0"; }
.mdi-av-my-library-add:before {
content: "\e6b1"; }
.mdi-av-my-library-books:before {
content: "\e6b2"; }
.mdi-av-my-library-music:before {
content: "\e6b3"; }
.mdi-av-new-releases:before {
content: "\e6b4"; }
.mdi-av-not-interested:before {
content: "\e6b5"; }
.mdi-av-pause:before {
content: "\e6b6"; }
.mdi-av-pause-circle-fill:before {
content: "\e6b7"; }
.mdi-av-pause-circle-outline:before {
content: "\e6b8"; }
.mdi-av-play-arrow:before {
content: "\e6b9"; }
.mdi-av-play-circle-fill:before {
content: "\e6ba"; }
.mdi-av-play-circle-outline:before {
content: "\e6bb"; }
.mdi-av-playlist-add:before {
content: "\e6bc"; }
.mdi-av-play-shopping-bag:before {
content: "\e6bd"; }
.mdi-av-queue:before {
content: "\e6be"; }
.mdi-av-queue-music:before {
content: "\e6bf"; }
.mdi-av-radio:before {
content: "\e6c0"; }
.mdi-av-recent-actors:before {
content: "\e6c1"; }
.mdi-av-repeat:before {
content: "\e6c2"; }
.mdi-av-repeat-one:before {
content: "\e6c3"; }
.mdi-av-replay:before {
content: "\e6c4"; }
.mdi-av-shuffle:before {
content: "\e6c5"; }
.mdi-av-skip-next:before {
content: "\e6c6"; }
.mdi-av-skip-previous:before {
content: "\e6c7"; }
.mdi-av-snooze:before {
content: "\e6c8"; }
.mdi-av-stop:before {
content: "\e6c9"; }
.mdi-av-subtitles:before {
content: "\e6ca"; }
.mdi-av-surround-sound:before {
content: "\e6cb"; }
.mdi-av-videocam:before {
content: "\e6cc"; }
.mdi-av-videocam-off:before {
content: "\e6cd"; }
.mdi-av-video-collection:before {
content: "\e6ce"; }
.mdi-av-volume-down:before {
content: "\e6cf"; }
.mdi-av-volume-mute:before {
content: "\e6d0"; }
.mdi-av-volume-off:before {
content: "\e6d1"; }
.mdi-av-volume-up:before {
content: "\e6d2"; }
.mdi-av-web:before {
content: "\e6d3"; }
.mdi-communication-business:before {
content: "\e6d4"; }
.mdi-communication-call:before {
content: "\e6d5"; }
.mdi-communication-call-end:before {
content: "\e6d6"; }
.mdi-communication-call-made:before {
content: "\e6d7"; }
.mdi-communication-call-merge:before {
content: "\e6d8"; }
.mdi-communication-call-missed:before {
content: "\e6d9"; }
.mdi-communication-call-received:before {
content: "\e6da"; }
.mdi-communication-call-split:before {
content: "\e6db"; }
.mdi-communication-chat:before {
content: "\e6dc"; }
.mdi-communication-clear-all:before {
content: "\e6dd"; }
.mdi-communication-comment:before {
content: "\e6de"; }
.mdi-communication-contacts:before {
content: "\e6df"; }
.mdi-communication-dialer-sip:before {
content: "\e6e0"; }
.mdi-communication-dialpad:before {
content: "\e6e1"; }
.mdi-communication-dnd-on:before {
content: "\e6e2"; }
.mdi-communication-email:before {
content: "\e6e3"; }
.mdi-communication-forum:before {
content: "\e6e4"; }
.mdi-communication-import-export:before {
content: "\e6e5"; }
.mdi-communication-invert-colors-off:before {
content: "\e6e6"; }
.mdi-communication-invert-colors-on:before {
content: "\e6e7"; }
.mdi-communication-live-help:before {
content: "\e6e8"; }
.mdi-communication-location-off:before {
content: "\e6e9"; }
.mdi-communication-location-on:before {
content: "\e6ea"; }
.mdi-communication-message:before {
content: "\e6eb"; }
.mdi-communication-messenger:before {
content: "\e6ec"; }
.mdi-communication-no-sim:before {
content: "\e6ed"; }
.mdi-communication-phone:before {
content: "\e6ee"; }
.mdi-communication-portable-wifi-off:before {
content: "\e6ef"; }
.mdi-communication-quick-contacts-dialer:before {
content: "\e6f0"; }
.mdi-communication-quick-contacts-mail:before {
content: "\e6f1"; }
.mdi-communication-ring-volume:before {
content: "\e6f2"; }
.mdi-communication-stay-current-landscape:before {
content: "\e6f3"; }
.mdi-communication-stay-current-portrait:before {
content: "\e6f4"; }
.mdi-communication-stay-primary-landscape:before {
content: "\e6f5"; }
.mdi-communication-stay-primary-portrait:before {
content: "\e6f6"; }
.mdi-communication-swap-calls:before {
content: "\e6f7"; }
.mdi-communication-textsms:before {
content: "\e6f8"; }
.mdi-communication-voicemail:before {
content: "\e6f9"; }
.mdi-communication-vpn-key:before {
content: "\e6fa"; }
.mdi-content-add:before {
content: "\e6fb"; }
.mdi-content-add-box:before {
content: "\e6fc"; }
.mdi-content-add-circle:before {
content: "\e6fd"; }
.mdi-content-add-circle-outline:before {
content: "\e6fe"; }
.mdi-content-archive:before {
content: "\e6ff"; }
.mdi-content-backspace:before {
content: "\e700"; }
.mdi-content-block:before {
content: "\e701"; }
.mdi-content-clear:before {
content: "\e702"; }
.mdi-content-content-copy:before {
content: "\e703"; }
.mdi-content-content-cut:before {
content: "\e704"; }
.mdi-content-content-paste:before {
content: "\e705"; }
.mdi-content-create:before {
content: "\e706"; }
.mdi-content-drafts:before {
content: "\e707"; }
.mdi-content-filter-list:before {
content: "\e708"; }
.mdi-content-flag:before {
content: "\e709"; }
.mdi-content-forward:before {
content: "\e70a"; }
.mdi-content-gesture:before {
content: "\e70b"; }
.mdi-content-inbox:before {
content: "\e70c"; }
.mdi-content-link:before {
content: "\e70d"; }
.mdi-content-mail:before {
content: "\e70e"; }
.mdi-content-markunread:before {
content: "\e70f"; }
.mdi-content-redo:before {
content: "\e710"; }
.mdi-content-remove:before {
content: "\e711"; }
.mdi-content-remove-circle:before {
content: "\e712"; }
.mdi-content-remove-circle-outline:before {
content: "\e713"; }
.mdi-content-reply:before {
content: "\e714"; }
.mdi-content-reply-all:before {
content: "\e715"; }
.mdi-content-report:before {
content: "\e716"; }
.mdi-content-save:before {
content: "\e717"; }
.mdi-content-select-all:before {
content: "\e718"; }
.mdi-content-send:before {
content: "\e719"; }
.mdi-content-sort:before {
content: "\e71a"; }
.mdi-content-text-format:before {
content: "\e71b"; }
.mdi-content-undo:before {
content: "\e71c"; }
.mdi-device-access-alarm:before {
content: "\e71d"; }
.mdi-device-access-alarms:before {
content: "\e71e"; }
.mdi-device-access-time:before {
content: "\e71f"; }
.mdi-device-add-alarm:before {
content: "\e720"; }
.mdi-device-airplanemode-off:before {
content: "\e721"; }
.mdi-device-airplanemode-on:before {
content: "\e722"; }
.mdi-device-battery-20:before {
content: "\e723"; }
.mdi-device-battery-30:before {
content: "\e724"; }
.mdi-device-battery-50:before {
content: "\e725"; }
.mdi-device-battery-60:before {
content: "\e726"; }
.mdi-device-battery-80:before {
content: "\e727"; }
.mdi-device-battery-90:before {
content: "\e728"; }
.mdi-device-battery-alert:before {
content: "\e729"; }
.mdi-device-battery-charging-20:before {
content: "\e72a"; }
.mdi-device-battery-charging-30:before {
content: "\e72b"; }
.mdi-device-battery-charging-50:before {
content: "\e72c"; }
.mdi-device-battery-charging-60:before {
content: "\e72d"; }
.mdi-device-battery-charging-80:before {
content: "\e72e"; }
.mdi-device-battery-charging-90:before {
content: "\e72f"; }
.mdi-device-battery-charging-full:before {
content: "\e730"; }
.mdi-device-battery-full:before {
content: "\e731"; }
.mdi-device-battery-std:before {
content: "\e732"; }
.mdi-device-battery-unknown:before {
content: "\e733"; }
.mdi-device-bluetooth:before {
content: "\e734"; }
.mdi-device-bluetooth-connected:before {
content: "\e735"; }
.mdi-device-bluetooth-disabled:before {
content: "\e736"; }
.mdi-device-bluetooth-searching:before {
content: "\e737"; }
.mdi-device-brightness-auto:before {
content: "\e738"; }
.mdi-device-brightness-high:before {
content: "\e739"; }
.mdi-device-brightness-low:before {
content: "\e73a"; }
.mdi-device-brightness-medium:before {
content: "\e73b"; }
.mdi-device-data-usage:before {
content: "\e73c"; }
.mdi-device-developer-mode:before {
content: "\e73d"; }
.mdi-device-devices:before {
content: "\e73e"; }
.mdi-device-dvr:before {
content: "\e73f"; }
.mdi-device-gps-fixed:before {
content: "\e740"; }
.mdi-device-gps-not-fixed:before {
content: "\e741"; }
.mdi-device-gps-off:before {
content: "\e742"; }
.mdi-device-location-disabled:before {
content: "\e743"; }
.mdi-device-location-searching:before {
content: "\e744"; }
.mdi-device-multitrack-audio:before {
content: "\e745"; }
.mdi-device-network-cell:before {
content: "\e746"; }
.mdi-device-network-wifi:before {
content: "\e747"; }
.mdi-device-nfc:before {
content: "\e748"; }
.mdi-device-now-wallpaper:before {
content: "\e749"; }
.mdi-device-now-widgets:before {
content: "\e74a"; }
.mdi-device-screen-lock-landscape:before {
content: "\e74b"; }
.mdi-device-screen-lock-portrait:before {
content: "\e74c"; }
.mdi-device-screen-lock-rotation:before {
content: "\e74d"; }
.mdi-device-screen-rotation:before {
content: "\e74e"; }
.mdi-device-sd-storage:before {
content: "\e74f"; }
.mdi-device-settings-system-daydream:before {
content: "\e750"; }
.mdi-device-signal-cellular-0-bar:before {
content: "\e751"; }
.mdi-device-signal-cellular-1-bar:before {
content: "\e752"; }
.mdi-device-signal-cellular-2-bar:before {
content: "\e753"; }
.mdi-device-signal-cellular-3-bar:before {
content: "\e754"; }
.mdi-device-signal-cellular-4-bar:before {
content: "\e755"; }
.mdi-device-signal-cellular-connected-no-internet-0-bar:before {
content: "\e756"; }
.mdi-device-signal-cellular-connected-no-internet-1-bar:before {
content: "\e757"; }
.mdi-device-signal-cellular-connected-no-internet-2-bar:before {
content: "\e758"; }
.mdi-device-signal-cellular-connected-no-internet-3-bar:before {
content: "\e759"; }
.mdi-device-signal-cellular-connected-no-internet-4-bar:before {
content: "\e75a"; }
.mdi-device-signal-cellular-no-sim:before {
content: "\e75b"; }
.mdi-device-signal-cellular-null:before {
content: "\e75c"; }
.mdi-device-signal-cellular-off:before {
content: "\e75d"; }
.mdi-device-signal-wifi-0-bar:before {
content: "\e75e"; }
.mdi-device-signal-wifi-1-bar:before {
content: "\e75f"; }
.mdi-device-signal-wifi-2-bar:before {
content: "\e760"; }
.mdi-device-signal-wifi-3-bar:before {
content: "\e761"; }
.mdi-device-signal-wifi-4-bar:before {
content: "\e762"; }
.mdi-device-signal-wifi-off:before {
content: "\e763"; }
.mdi-device-storage:before {
content: "\e764"; }
.mdi-device-usb:before {
content: "\e765"; }
.mdi-device-wifi-lock:before {
content: "\e766"; }
.mdi-device-wifi-tethering:before {
content: "\e767"; }
.mdi-editor-attach-file:before {
content: "\e768"; }
.mdi-editor-attach-money:before {
content: "\e769"; }
.mdi-editor-border-all:before {
content: "\e76a"; }
.mdi-editor-border-bottom:before {
content: "\e76b"; }
.mdi-editor-border-clear:before {
content: "\e76c"; }
.mdi-editor-border-color:before {
content: "\e76d"; }
.mdi-editor-border-horizontal:before {
content: "\e76e"; }
.mdi-editor-border-inner:before {
content: "\e76f"; }
.mdi-editor-border-left:before {
content: "\e770"; }
.mdi-editor-border-outer:before {
content: "\e771"; }
.mdi-editor-border-right:before {
content: "\e772"; }
.mdi-editor-border-style:before {
content: "\e773"; }
.mdi-editor-border-top:before {
content: "\e774"; }
.mdi-editor-border-vertical:before {
content: "\e775"; }
.mdi-editor-format-align-center:before {
content: "\e776"; }
.mdi-editor-format-align-justify:before {
content: "\e777"; }
.mdi-editor-format-align-left:before {
content: "\e778"; }
.mdi-editor-format-align-right:before {
content: "\e779"; }
.mdi-editor-format-bold:before {
content: "\e77a"; }
.mdi-editor-format-clear:before {
content: "\e77b"; }
.mdi-editor-format-color-fill:before {
content: "\e77c"; }
.mdi-editor-format-color-reset:before {
content: "\e77d"; }
.mdi-editor-format-color-text:before {
content: "\e77e"; }
.mdi-editor-format-indent-decrease:before {
content: "\e77f"; }
.mdi-editor-format-indent-increase:before {
content: "\e780"; }
.mdi-editor-format-italic:before {
content: "\e781"; }
.mdi-editor-format-line-spacing:before {
content: "\e782"; }
.mdi-editor-format-list-bulleted:before {
content: "\e783"; }
.mdi-editor-format-list-numbered:before {
content: "\e784"; }
.mdi-editor-format-paint:before {
content: "\e785"; }
.mdi-editor-format-quote:before {
content: "\e786"; }
.mdi-editor-format-size:before {
content: "\e787"; }
.mdi-editor-format-strikethrough:before {
content: "\e788"; }
.mdi-editor-functions:before {
content: "\e789"; }
.mdi-editor-format-textdirection-l-to-r:before {
content: "\e78a"; }
.mdi-editor-format-underline:before {
content: "\e78b"; }
.mdi-editor-format-textdirection-r-to-l:before {
content: "\e78c"; }
.mdi-editor-insert-chart:before {
content: "\e78d"; }
.mdi-editor-insert-comment:before {
content: "\e78e"; }
.mdi-editor-insert-drive-file:before {
content: "\e78f"; }
.mdi-editor-insert-emoticon:before {
content: "\e790"; }
.mdi-editor-insert-invitation:before {
content: "\e791"; }
.mdi-editor-insert-link:before {
content: "\e792"; }
.mdi-editor-insert-photo:before {
content: "\e793"; }
.mdi-editor-merge-type:before {
content: "\e794"; }
.mdi-editor-mode-comment:before {
content: "\e795"; }
.mdi-editor-mode-edit:before {
content: "\e796"; }
.mdi-editor-publish:before {
content: "\e797"; }
.mdi-editor-vertical-align-bottom:before {
content: "\e798"; }
.mdi-editor-vertical-align-center:before {
content: "\e799"; }
.mdi-editor-vertical-align-top:before {
content: "\e79a"; }
.mdi-editor-wrap-text:before {
content: "\e79b"; }
.mdi-file-attachment:before {
content: "\e79c"; }
.mdi-file-cloud:before {
content: "\e79d"; }
.mdi-file-cloud-circle:before {
content: "\e79e"; }
.mdi-file-cloud-done:before {
content: "\e79f"; }
.mdi-file-cloud-download:before {
content: "\e7a0"; }
.mdi-file-cloud-off:before {
content: "\e7a1"; }
.mdi-file-cloud-queue:before {
content: "\e7a2"; }
.mdi-file-cloud-upload:before {
content: "\e7a3"; }
.mdi-file-file-download:before {
content: "\e7a4"; }
.mdi-file-file-upload:before {
content: "\e7a5"; }
.mdi-file-folder:before {
content: "\e7a6"; }
.mdi-file-folder-open:before {
content: "\e7a7"; }
.mdi-file-folder-shared:before {
content: "\e7a8"; }
.mdi-hardware-cast:before {
content: "\e7a9"; }
.mdi-hardware-cast-connected:before {
content: "\e7aa"; }
.mdi-hardware-computer:before {
content: "\e7ab"; }
.mdi-hardware-desktop-mac:before {
content: "\e7ac"; }
.mdi-hardware-desktop-windows:before {
content: "\e7ad"; }
.mdi-hardware-dock:before {
content: "\e7ae"; }
.mdi-hardware-gamepad:before {
content: "\e7af"; }
.mdi-hardware-headset:before {
content: "\e7b0"; }
.mdi-hardware-headset-mic:before {
content: "\e7b1"; }
.mdi-hardware-keyboard:before {
content: "\e7b2"; }
.mdi-hardware-keyboard-alt:before {
content: "\e7b3"; }
.mdi-hardware-keyboard-arrow-down:before {
content: "\e7b4"; }
.mdi-hardware-keyboard-arrow-left:before {
content: "\e7b5"; }
.mdi-hardware-keyboard-arrow-right:before {
content: "\e7b6"; }
.mdi-hardware-keyboard-arrow-up:before {
content: "\e7b7"; }
.mdi-hardware-keyboard-backspace:before {
content: "\e7b8"; }
.mdi-hardware-keyboard-capslock:before {
content: "\e7b9"; }
.mdi-hardware-keyboard-control:before {
content: "\e7ba"; }
.mdi-hardware-keyboard-hide:before {
content: "\e7bb"; }
.mdi-hardware-keyboard-return:before {
content: "\e7bc"; }
.mdi-hardware-keyboard-tab:before {
content: "\e7bd"; }
.mdi-hardware-keyboard-voice:before {
content: "\e7be"; }
.mdi-hardware-laptop:before {
content: "\e7bf"; }
.mdi-hardware-laptop-chromebook:before {
content: "\e7c0"; }
.mdi-hardware-laptop-mac:before {
content: "\e7c1"; }
.mdi-hardware-laptop-windows:before {
content: "\e7c2"; }
.mdi-hardware-memory:before {
content: "\e7c3"; }
.mdi-hardware-mouse:before {
content: "\e7c4"; }
.mdi-hardware-phone-android:before {
content: "\e7c5"; }
.mdi-hardware-phone-iphone:before {
content: "\e7c6"; }
.mdi-hardware-phonelink:before {
content: "\e7c7"; }
.mdi-hardware-phonelink-off:before {
content: "\e7c8"; }
.mdi-hardware-security:before {
content: "\e7c9"; }
.mdi-hardware-sim-card:before {
content: "\e7ca"; }
.mdi-hardware-smartphone:before {
content: "\e7cb"; }
.mdi-hardware-speaker:before {
content: "\e7cc"; }
.mdi-hardware-tablet:before {
content: "\e7cd"; }
.mdi-hardware-tablet-android:before {
content: "\e7ce"; }
.mdi-hardware-tablet-mac:before {
content: "\e7cf"; }
.mdi-hardware-tv:before {
content: "\e7d0"; }
.mdi-hardware-watch:before {
content: "\e7d1"; }
.mdi-image-add-to-photos:before {
content: "\e7d2"; }
.mdi-image-adjust:before {
content: "\e7d3"; }
.mdi-image-assistant-photo:before {
content: "\e7d4"; }
.mdi-image-audiotrack:before {
content: "\e7d5"; }
.mdi-image-blur-circular:before {
content: "\e7d6"; }
.mdi-image-blur-linear:before {
content: "\e7d7"; }
.mdi-image-blur-off:before {
content: "\e7d8"; }
.mdi-image-blur-on:before {
content: "\e7d9"; }
.mdi-image-brightness-1:before {
content: "\e7da"; }
.mdi-image-brightness-2:before {
content: "\e7db"; }
.mdi-image-brightness-3:before {
content: "\e7dc"; }
.mdi-image-brightness-4:before {
content: "\e7dd"; }
.mdi-image-brightness-5:before {
content: "\e7de"; }
.mdi-image-brightness-6:before {
content: "\e7df"; }
.mdi-image-brightness-7:before {
content: "\e7e0"; }
.mdi-image-brush:before {
content: "\e7e1"; }
.mdi-image-camera:before {
content: "\e7e2"; }
.mdi-image-camera-alt:before {
content: "\e7e3"; }
.mdi-image-camera-front:before {
content: "\e7e4"; }
.mdi-image-camera-rear:before {
content: "\e7e5"; }
.mdi-image-camera-roll:before {
content: "\e7e6"; }
.mdi-image-center-focus-strong:before {
content: "\e7e7"; }
.mdi-image-center-focus-weak:before {
content: "\e7e8"; }
.mdi-image-collections:before {
content: "\e7e9"; }
.mdi-image-colorize:before {
content: "\e7ea"; }
.mdi-image-color-lens:before {
content: "\e7eb"; }
.mdi-image-compare:before {
content: "\e7ec"; }
.mdi-image-control-point:before {
content: "\e7ed"; }
.mdi-image-control-point-duplicate:before {
content: "\e7ee"; }
.mdi-image-crop:before {
content: "\e7ef"; }
.mdi-image-crop-3-2:before {
content: "\e7f0"; }
.mdi-image-crop-5-4:before {
content: "\e7f1"; }
.mdi-image-crop-7-5:before {
content: "\e7f2"; }
.mdi-image-crop-16-9:before {
content: "\e7f3"; }
.mdi-image-crop-din:before {
content: "\e7f4"; }
.mdi-image-crop-free:before {
content: "\e7f5"; }
.mdi-image-crop-landscape:before {
content: "\e7f6"; }
.mdi-image-crop-original:before {
content: "\e7f7"; }
.mdi-image-crop-portrait:before {
content: "\e7f8"; }
.mdi-image-crop-square:before {
content: "\e7f9"; }
.mdi-image-dehaze:before {
content: "\e7fa"; }
.mdi-image-details:before {
content: "\e7fb"; }
.mdi-image-edit:before {
content: "\e7fc"; }
.mdi-image-exposure:before {
content: "\e7fd"; }
.mdi-image-exposure-minus-1:before {
content: "\e7fe"; }
.mdi-image-exposure-minus-2:before {
content: "\e7ff"; }
.mdi-image-exposure-plus-1:before {
content: "\e800"; }
.mdi-image-exposure-plus-2:before {
content: "\e801"; }
.mdi-image-exposure-zero:before {
content: "\e802"; }
.mdi-image-filter:before {
content: "\e803"; }
.mdi-image-filter-1:before {
content: "\e804"; }
.mdi-image-filter-2:before {
content: "\e805"; }
.mdi-image-filter-3:before {
content: "\e806"; }
.mdi-image-filter-4:before {
content: "\e807"; }
.mdi-image-filter-5:before {
content: "\e808"; }
.mdi-image-filter-6:before {
content: "\e809"; }
.mdi-image-filter-7:before {
content: "\e80a"; }
.mdi-image-filter-8:before {
content: "\e80b"; }
.mdi-image-filter-9:before {
content: "\e80c"; }
.mdi-image-filter-9-plus:before {
content: "\e80d"; }
.mdi-image-filter-b-and-w:before {
content: "\e80e"; }
.mdi-image-filter-center-focus:before {
content: "\e80f"; }
.mdi-image-filter-drama:before {
content: "\e810"; }
.mdi-image-filter-frames:before {
content: "\e811"; }
.mdi-image-filter-hdr:before {
content: "\e812"; }
.mdi-image-filter-none:before {
content: "\e813"; }
.mdi-image-filter-tilt-shift:before {
content: "\e814"; }
.mdi-image-filter-vintage:before {
content: "\e815"; }
.mdi-image-flare:before {
content: "\e816"; }
.mdi-image-flash-auto:before {
content: "\e817"; }
.mdi-image-flash-off:before {
content: "\e818"; }
.mdi-image-flash-on:before {
content: "\e819"; }
.mdi-image-flip:before {
content: "\e81a"; }
.mdi-image-gradient:before {
content: "\e81b"; }
.mdi-image-grain:before {
content: "\e81c"; }
.mdi-image-grid-off:before {
content: "\e81d"; }
.mdi-image-grid-on:before {
content: "\e81e"; }
.mdi-image-hdr-off:before {
content: "\e81f"; }
.mdi-image-hdr-on:before {
content: "\e820"; }
.mdi-image-hdr-strong:before {
content: "\e821"; }
.mdi-image-hdr-weak:before {
content: "\e822"; }
.mdi-image-healing:before {
content: "\e823"; }
.mdi-image-image:before {
content: "\e824"; }
.mdi-image-image-aspect-ratio:before {
content: "\e825"; }
.mdi-image-iso:before {
content: "\e826"; }
.mdi-image-landscape:before {
content: "\e827"; }
.mdi-image-leak-add:before {
content: "\e828"; }
.mdi-image-leak-remove:before {
content: "\e829"; }
.mdi-image-lens:before {
content: "\e82a"; }
.mdi-image-looks:before {
content: "\e82b"; }
.mdi-image-looks-3:before {
content: "\e82c"; }
.mdi-image-looks-4:before {
content: "\e82d"; }
.mdi-image-looks-5:before {
content: "\e82e"; }
.mdi-image-looks-6:before {
content: "\e82f"; }
.mdi-image-looks-one:before {
content: "\e830"; }
.mdi-image-looks-two:before {
content: "\e831"; }
.mdi-image-loupe:before {
content: "\e832"; }
.mdi-image-movie-creation:before {
content: "\e833"; }
.mdi-image-nature:before {
content: "\e834"; }
.mdi-image-nature-people:before {
content: "\e835"; }
.mdi-image-navigate-before:before {
content: "\e836"; }
.mdi-image-navigate-next:before {
content: "\e837"; }
.mdi-image-palette:before {
content: "\e838"; }
.mdi-image-panorama:before {
content: "\e839"; }
.mdi-image-panorama-fisheye:before {
content: "\e83a"; }
.mdi-image-panorama-horizontal:before {
content: "\e83b"; }
.mdi-image-panorama-vertical:before {
content: "\e83c"; }
.mdi-image-panorama-wide-angle:before {
content: "\e83d"; }
.mdi-image-photo:before {
content: "\e83e"; }
.mdi-image-photo-album:before {
content: "\e83f"; }
.mdi-image-photo-camera:before {
content: "\e840"; }
.mdi-image-photo-library:before {
content: "\e841"; }
.mdi-image-portrait:before {
content: "\e842"; }
.mdi-image-remove-red-eye:before {
content: "\e843"; }
.mdi-image-rotate-left:before {
content: "\e844"; }
.mdi-image-rotate-right:before {
content: "\e845"; }
.mdi-image-slideshow:before {
content: "\e846"; }
.mdi-image-straighten:before {
content: "\e847"; }
.mdi-image-style:before {
content: "\e848"; }
.mdi-image-switch-camera:before {
content: "\e849"; }
.mdi-image-switch-video:before {
content: "\e84a"; }
.mdi-image-tag-faces:before {
content: "\e84b"; }
.mdi-image-texture:before {
content: "\e84c"; }
.mdi-image-timelapse:before {
content: "\e84d"; }
.mdi-image-timer:before {
content: "\e84e"; }
.mdi-image-timer-3:before {
content: "\e84f"; }
.mdi-image-timer-10:before {
content: "\e850"; }
.mdi-image-timer-auto:before {
content: "\e851"; }
.mdi-image-timer-off:before {
content: "\e852"; }
.mdi-image-tonality:before {
content: "\e853"; }
.mdi-image-transform:before {
content: "\e854"; }
.mdi-image-tune:before {
content: "\e855"; }
.mdi-image-wb-auto:before {
content: "\e856"; }
.mdi-image-wb-cloudy:before {
content: "\e857"; }
.mdi-image-wb-incandescent:before {
content: "\e858"; }
.mdi-image-wb-irradescent:before {
content: "\e859"; }
.mdi-image-wb-sunny:before {
content: "\e85a"; }
.mdi-maps-beenhere:before {
content: "\e85b"; }
.mdi-maps-directions:before {
content: "\e85c"; }
.mdi-maps-directions-bike:before {
content: "\e85d"; }
.mdi-maps-directions-bus:before {
content: "\e85e"; }
.mdi-maps-directions-car:before {
content: "\e85f"; }
.mdi-maps-directions-ferry:before {
content: "\e860"; }
.mdi-maps-directions-subway:before {
content: "\e861"; }
.mdi-maps-directions-train:before {
content: "\e862"; }
.mdi-maps-directions-transit:before {
content: "\e863"; }
.mdi-maps-directions-walk:before {
content: "\e864"; }
.mdi-maps-flight:before {
content: "\e865"; }
.mdi-maps-hotel:before {
content: "\e866"; }
.mdi-maps-layers:before {
content: "\e867"; }
.mdi-maps-layers-clear:before {
content: "\e868"; }
.mdi-maps-local-airport:before {
content: "\e869"; }
.mdi-maps-local-atm:before {
content: "\e86a"; }
.mdi-maps-local-attraction:before {
content: "\e86b"; }
.mdi-maps-local-bar:before {
content: "\e86c"; }
.mdi-maps-local-cafe:before {
content: "\e86d"; }
.mdi-maps-local-car-wash:before {
content: "\e86e"; }
.mdi-maps-local-convenience-store:before {
content: "\e86f"; }
.mdi-maps-local-drink:before {
content: "\e870"; }
.mdi-maps-local-florist:before {
content: "\e871"; }
.mdi-maps-local-gas-station:before {
content: "\e872"; }
.mdi-maps-local-grocery-store:before {
content: "\e873"; }
.mdi-maps-local-hospital:before {
content: "\e874"; }
.mdi-maps-local-hotel:before {
content: "\e875"; }
.mdi-maps-local-laundry-service:before {
content: "\e876"; }
.mdi-maps-local-library:before {
content: "\e877"; }
.mdi-maps-local-mall:before {
content: "\e878"; }
.mdi-maps-local-movies:before {
content: "\e879"; }
.mdi-maps-local-offer:before {
content: "\e87a"; }
.mdi-maps-local-parking:before {
content: "\e87b"; }
.mdi-maps-local-pharmacy:before {
content: "\e87c"; }
.mdi-maps-local-phone:before {
content: "\e87d"; }
.mdi-maps-local-pizza:before {
content: "\e87e"; }
.mdi-maps-local-play:before {
content: "\e87f"; }
.mdi-maps-local-post-office:before {
content: "\e880"; }
.mdi-maps-local-print-shop:before {
content: "\e881"; }
.mdi-maps-local-restaurant:before {
content: "\e882"; }
.mdi-maps-local-see:before {
content: "\e883"; }
.mdi-maps-local-shipping:before {
content: "\e884"; }
.mdi-maps-local-taxi:before {
content: "\e885"; }
.mdi-maps-location-history:before {
content: "\e886"; }
.mdi-maps-map:before {
content: "\e887"; }
.mdi-maps-my-location:before {
content: "\e888"; }
.mdi-maps-navigation:before {
content: "\e889"; }
.mdi-maps-pin-drop:before {
content: "\e88a"; }
.mdi-maps-place:before {
content: "\e88b"; }
.mdi-maps-rate-review:before {
content: "\e88c"; }
.mdi-maps-restaurant-menu:before {
content: "\e88d"; }
.mdi-maps-satellite:before {
content: "\e88e"; }
.mdi-maps-store-mall-directory:before {
content: "\e88f"; }
.mdi-maps-terrain:before {
content: "\e890"; }
.mdi-maps-traffic:before {
content: "\e891"; }
.mdi-navigation-apps:before {
content: "\e892"; }
.mdi-navigation-arrow-back:before {
content: "\e893"; }
.mdi-navigation-arrow-drop-down:before, .select-wrapper span.select-dropdown:after {
content: "\e894"; }
.mdi-navigation-arrow-drop-down-circle:before {
content: "\e895"; }
.mdi-navigation-arrow-drop-up:before {
content: "\e896"; }
.mdi-navigation-arrow-forward:before {
content: "\e897"; }
.mdi-navigation-cancel:before {
content: "\e898"; }
.mdi-navigation-check:before {
content: "\e899"; }
.mdi-navigation-chevron-left:before {
content: "\e89a"; }
.mdi-navigation-chevron-right:before {
content: "\e89b"; }
.mdi-navigation-close:before {
content: "\e89c"; }
.mdi-navigation-expand-less:before {
content: "\e89d"; }
.mdi-navigation-expand-more:before {
content: "\e89e"; }
.mdi-navigation-fullscreen:before {
content: "\e89f"; }
.mdi-navigation-fullscreen-exit:before {
content: "\e8a0"; }
.mdi-navigation-menu:before {
content: "\e8a1"; }
.mdi-navigation-more-horiz:before {
content: "\e8a2"; }
.mdi-navigation-more-vert:before {
content: "\e8a3"; }
.mdi-navigation-refresh:before {
content: "\e8a4"; }
.mdi-navigation-unfold-less:before {
content: "\e8a5"; }
.mdi-navigation-unfold-more:before {
content: "\e8a6"; }
.mdi-notification-adb:before {
content: "\e8a7"; }
.mdi-notification-bluetooth-audio:before {
content: "\e8a8"; }
.mdi-notification-disc-full:before {
content: "\e8a9"; }
.mdi-notification-dnd-forwardslash:before {
content: "\e8aa"; }
.mdi-notification-do-not-disturb:before {
content: "\e8ab"; }
.mdi-notification-drive-eta:before {
content: "\e8ac"; }
.mdi-notification-event-available:before {
content: "\e8ad"; }
.mdi-notification-event-busy:before {
content: "\e8ae"; }
.mdi-notification-event-note:before {
content: "\e8af"; }
.mdi-notification-folder-special:before {
content: "\e8b0"; }
.mdi-notification-mms:before {
content: "\e8b1"; }
.mdi-notification-more:before {
content: "\e8b2"; }
.mdi-notification-network-locked:before {
content: "\e8b3"; }
.mdi-notification-phone-bluetooth-speaker:before {
content: "\e8b4"; }
.mdi-notification-phone-forwarded:before {
content: "\e8b5"; }
.mdi-notification-phone-in-talk:before {
content: "\e8b6"; }
.mdi-notification-phone-locked:before {
content: "\e8b7"; }
.mdi-notification-phone-missed:before {
content: "\e8b8"; }
.mdi-notification-phone-paused:before {
content: "\e8b9"; }
.mdi-notification-play-download:before {
content: "\e8ba"; }
.mdi-notification-play-install:before {
content: "\e8bb"; }
.mdi-notification-sd-card:before {
content: "\e8bc"; }
.mdi-notification-sim-card-alert:before {
content: "\e8bd"; }
.mdi-notification-sms:before {
content: "\e8be"; }
.mdi-notification-sms-failed:before {
content: "\e8bf"; }
.mdi-notification-sync:before {
content: "\e8c0"; }
.mdi-notification-sync-disabled:before {
content: "\e8c1"; }
.mdi-notification-sync-problem:before {
content: "\e8c2"; }
.mdi-notification-system-update:before {
content: "\e8c3"; }
.mdi-notification-tap-and-play:before {
content: "\e8c4"; }
.mdi-notification-time-to-leave:before {
content: "\e8c5"; }
.mdi-notification-vibration:before {
content: "\e8c6"; }
.mdi-notification-voice-chat:before {
content: "\e8c7"; }
.mdi-notification-vpn-lock:before {
content: "\e8c8"; }
.mdi-social-cake:before {
content: "\e8c9"; }
.mdi-social-domain:before {
content: "\e8ca"; }
.mdi-social-group:before {
content: "\e8cb"; }
.mdi-social-group-add:before {
content: "\e8cc"; }
.mdi-social-location-city:before {
content: "\e8cd"; }
.mdi-social-mood:before {
content: "\e8ce"; }
.mdi-social-notifications:before {
content: "\e8cf"; }
.mdi-social-notifications-none:before {
content: "\e8d0"; }
.mdi-social-notifications-off:before {
content: "\e8d1"; }
.mdi-social-notifications-on:before {
content: "\e8d2"; }
.mdi-social-notifications-paused:before {
content: "\e8d3"; }
.mdi-social-pages:before {
content: "\e8d4"; }
.mdi-social-party-mode:before {
content: "\e8d5"; }
.mdi-social-people:before {
content: "\e8d6"; }
.mdi-social-people-outline:before {
content: "\e8d7"; }
.mdi-social-person:before {
content: "\e8d8"; }
.mdi-social-person-add:before {
content: "\e8d9"; }
.mdi-social-person-outline:before {
content: "\e8da"; }
.mdi-social-plus-one:before {
content: "\e8db"; }
.mdi-social-poll:before {
content: "\e8dc"; }
.mdi-social-public:before {
content: "\e8dd"; }
.mdi-social-school:before {
content: "\e8de"; }
.mdi-social-share:before {
content: "\e8df"; }
.mdi-social-whatshot:before {
content: "\e8e0"; }
.mdi-toggle-check-box:before {
content: "\e8e1"; }
.mdi-toggle-check-box-outline-blank:before {
content: "\e8e2"; }
.mdi-toggle-radio-button-off:before {
content: "\e8e3"; }
.mdi-toggle-radio-button-on:before {
content: "\e8e4"; }
.container {
padding: 0 1.5rem;
margin: 0 auto;
max-width: 1280px;
width: 90%; }
@media only screen and (min-width : 601px) {
.container {
width: 85%; }
}
@media only screen and (min-width : 993px) {
.container {
width: 70%; }
}
.container .row {
margin-left: -0.75rem;
margin-right: -0.75rem; }
.section {
padding-top: 1rem;
padding-bottom: 1rem; }
.section.no-pad {
padding: 0; }
.section.no-pad-bot {
padding-bottom: 0; }
.section.no-pad-top {
padding-top: 0; }
.row {
margin-left: auto;
margin-right: auto;
margin-bottom: 20px; }
.row:after {
content: "";
display: table;
clear: both; }
.row .col {
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
-ms-transition: all 0.3s;
transition: all 0.3s;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0 0.75rem; }
.row .col.s1 {
width: 8.33333%;
margin-left: 0; }
.row .col.s2 {
width: 16.66667%;
margin-left: 0; }
.row .col.s3 {
width: 25%;
margin-left: 0; }
.row .col.s4 {
width: 33.33333%;
margin-left: 0; }
.row .col.s5 {
width: 41.66667%;
margin-left: 0; }
.row .col.s6 {
width: 50%;
margin-left: 0; }
.row .col.s7 {
width: 58.33333%;
margin-left: 0; }
.row .col.s8 {
width: 66.66667%;
margin-left: 0; }
.row .col.s9 {
width: 75%;
margin-left: 0; }
.row .col.s10 {
width: 83.33333%;
margin-left: 0; }
.row .col.s11 {
width: 91.66667%;
margin-left: 0; }
.row .col.s12 {
width: 100%;
margin-left: 0; }
.row .col.offset-s1 {
margin-left: 8.33333%; }
.row .col.offset-s2 {
margin-left: 16.66667%; }
.row .col.offset-s3 {
margin-left: 25%; }
.row .col.offset-s4 {
margin-left: 33.33333%; }
.row .col.offset-s5 {
margin-left: 41.66667%; }
.row .col.offset-s6 {
margin-left: 50%; }
.row .col.offset-s7 {
margin-left: 58.33333%; }
.row .col.offset-s8 {
margin-left: 66.66667%; }
.row .col.offset-s9 {
margin-left: 75%; }
.row .col.offset-s10 {
margin-left: 83.33333%; }
.row .col.offset-s11 {
margin-left: 91.66667%; }
.row .col.offset-s12 {
margin-left: 100%; }
@media only screen and (min-width : 601px) {
.row .col.m1 {
width: 8.33333%;
margin-left: 0; }
.row .col.m2 {
width: 16.66667%;
margin-left: 0; }
.row .col.m3 {
width: 25%;
margin-left: 0; }
.row .col.m4 {
width: 33.33333%;
margin-left: 0; }
.row .col.m5 {
width: 41.66667%;
margin-left: 0; }
.row .col.m6 {
width: 50%;
margin-left: 0; }
.row .col.m7 {
width: 58.33333%;
margin-left: 0; }
.row .col.m8 {
width: 66.66667%;
margin-left: 0; }
.row .col.m9 {
width: 75%;
margin-left: 0; }
.row .col.m10 {
width: 83.33333%;
margin-left: 0; }
.row .col.m11 {
width: 91.66667%;
margin-left: 0; }
.row .col.m12 {
width: 100%;
margin-left: 0; }
.row .col.offset-m1 {
margin-left: 8.33333%; }
.row .col.offset-m2 {
margin-left: 16.66667%; }
.row .col.offset-m3 {
margin-left: 25%; }
.row .col.offset-m4 {
margin-left: 33.33333%; }
.row .col.offset-m5 {
margin-left: 41.66667%; }
.row .col.offset-m6 {
margin-left: 50%; }
.row .col.offset-m7 {
margin-left: 58.33333%; }
.row .col.offset-m8 {
margin-left: 66.66667%; }
.row .col.offset-m9 {
margin-left: 75%; }
.row .col.offset-m10 {
margin-left: 83.33333%; }
.row .col.offset-m11 {
margin-left: 91.66667%; }
.row .col.offset-m12 {
margin-left: 100%; }
}
@media only screen and (min-width : 993px) {
.row .col.l1 {
width: 8.33333%;
margin-left: 0; }
.row .col.l2 {
width: 16.66667%;
margin-left: 0; }
.row .col.l3 {
width: 25%;
margin-left: 0; }
.row .col.l4 {
width: 33.33333%;
margin-left: 0; }
.row .col.l5 {
width: 41.66667%;
margin-left: 0; }
.row .col.l6 {
width: 50%;
margin-left: 0; }
.row .col.l7 {
width: 58.33333%;
margin-left: 0; }
.row .col.l8 {
width: 66.66667%;
margin-left: 0; }
.row .col.l9 {
width: 75%;
margin-left: 0; }
.row .col.l10 {
width: 83.33333%;
margin-left: 0; }
.row .col.l11 {
width: 91.66667%;
margin-left: 0; }
.row .col.l12 {
width: 100%;
margin-left: 0; }
.row .col.offset-l1 {
margin-left: 8.33333%; }
.row .col.offset-l2 {
margin-left: 16.66667%; }
.row .col.offset-l3 {
margin-left: 25%; }
.row .col.offset-l4 {
margin-left: 33.33333%; }
.row .col.offset-l5 {
margin-left: 41.66667%; }
.row .col.offset-l6 {
margin-left: 50%; }
.row .col.offset-l7 {
margin-left: 58.33333%; }
.row .col.offset-l8 {
margin-left: 66.66667%; }
.row .col.offset-l9 {
margin-left: 75%; }
.row .col.offset-l10 {
margin-left: 83.33333%; }
.row .col.offset-l11 {
margin-left: 91.66667%; }
.row .col.offset-l12 {
margin-left: 100%; }
}
nav {
color: #fff;
background-color: #ee6e73;
width: 100%;
height: 56px;
line-height: 56px; }
nav .nav-wrapper {
position: relative;
height: 100%; }
nav a {
color: #fff; }
nav a.button-collapse {
float: left;
position: relative;
z-index: 1;
height: 56px; }
nav a.button-collapse i {
font-size: 2.7rem;
height: 56px;
line-height: 56px; }
nav .brand-logo {
position: absolute;
color: #fff;
display: inline-block;
font-size: 2.1rem;
padding: 0; }
@media only screen and (max-width : 992px) {
nav .brand-logo {
left: 0;
width: 100%;
text-align: center;
z-index: 0; } }
nav .brand-logo.right {
right: 0.5rem;
padding: 0; }
nav ul {
margin: 0;
float: right; }
nav ul li {
float: left;
padding: 0px;
-webkit-transition: background-color 0.3s;
-moz-transition: background-color 0.3s;
-o-transition: background-color 0.3s;
-ms-transition: background-color 0.3s;
transition: background-color 0.3s; }
nav ul li:hover, nav ul li.active {
background-color: rgba(0, 0, 0, 0.1); }
nav ul a {
font-size: 1rem;
color: #fff;
display: block;
padding: 0px 15px; }
nav ul.left {
float: left; }
nav .input-field input {
height: 100%;
font-size: 1.2rem;
border: none;
padding-left: 2rem;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
nav .input-field input:focus, nav .input-field input[type=text]:valid, nav .input-field input[type=password]:valid, nav .input-field input[type=email]:valid, nav .input-field input[type=date]:valid {
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
nav .input-field label {
top: 0;
left: 0; }
nav .input-field label i {
color: rgba(255, 255, 255, 0.7);
-webkit-transition: color 0.3s;
-moz-transition: color 0.3s;
-o-transition: color 0.3s;
-ms-transition: color 0.3s;
transition: color 0.3s; }
nav .input-field label.active i {
color: #fff; }
nav .input-field label.active {
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0); }
.navbar-fixed {
position: relative;
height: 56px;
z-index: 998; }
.navbar-fixed nav {
position: fixed; }
@media only screen and (min-width : 601px) {
nav, nav .nav-wrapper i, nav a.button-collapse, nav a.button-collapse i {
height: 64px;
line-height: 64px; }
nav .nav-wrapper i {
font-size: 2rem; }
.navbar-fixed {
height: 64px; }
}
@font-face {
font-family: "Roboto";
src: url(../font/roboto/Roboto-Thin.ttf);
font-weight: 200; }
@font-face {
font-family: "Roboto";
src: url(../font/roboto/Roboto-Light.ttf);
font-weight: 300; }
@font-face {
font-family: "Roboto";
src: url(../font/roboto/Roboto-Regular.ttf);
font-weight: 400; }
@font-face {
font-family: "Roboto";
src: url(../font/roboto/Roboto-Medium.ttf);
font-weight: 500; }
@font-face {
font-family: "Roboto";
src: url(../font/roboto/Roboto-Bold.ttf);
font-weight: 700; }
a {
text-decoration: none; }
html {
line-height: 1.5;
font-family: "Roboto", sans-serif;
font-weight: normal;
color: rgba(0, 0, 0, 0.87); }
@media only screen and (min-width: 0) {
html {
font-size: 14px; } }
@media only screen and (min-width: 992px) {
html {
font-size: 14.5px; } }
@media only screen and (min-width: 1200px) {
html {
font-size: 15px; } }
h1, h2, h3, h4, h5, h6 {
font-weight: 400; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
font-weight: inherit; }
h1 {
font-size: 4.2rem;
line-height: 4.62rem;
margin: 2.1rem 0 1.68rem 0; }
h2 {
font-size: 3.56rem;
line-height: 3.916rem;
margin: 1.78rem 0 1.424rem 0; }
h3 {
font-size: 2.92rem;
line-height: 3.212rem;
margin: 1.46rem 0 1.168rem 0; }
h4 {
font-size: 2.28rem;
line-height: 2.508rem;
margin: 1.14rem 0 0.912rem 0; }
h5 {
font-size: 1.64rem;
line-height: 1.804rem;
margin: 0.82rem 0 0.656rem 0; }
h6 {
font-size: 1rem;
line-height: 1.1rem;
margin: 0.5rem 0 0.4rem 0; }
em {
font-style: italic; }
strong {
font-weight: 500; }
small {
font-size: 75%; }
.light, footer.page-footer .footer-copyright {
font-weight: 300; }
.flow-text {
font-weight: 300; }
@media only screen and (min-width: 360px) {
.flow-text {
font-size: 1.2rem; } }
@media only screen and (min-width: 0px) {
.flow-text {
line-height: 0.8rem; } }
@media only screen and (min-width: 390px) {
.flow-text {
font-size: 1.224rem; } }
@media only screen and (min-width: 30px) {
.flow-text {
line-height: 0.904rem; } }
@media only screen and (min-width: 420px) {
.flow-text {
font-size: 1.248rem; } }
@media only screen and (min-width: 60px) {
.flow-text {
line-height: 1.008rem; } }
@media only screen and (min-width: 450px) {
.flow-text {
font-size: 1.272rem; } }
@media only screen and (min-width: 90px) {
.flow-text {
line-height: 1.112rem; } }
@media only screen and (min-width: 480px) {
.flow-text {
font-size: 1.296rem; } }
@media only screen and (min-width: 120px) {
.flow-text {
line-height: 1.216rem; } }
@media only screen and (min-width: 510px) {
.flow-text {
font-size: 1.32rem; } }
@media only screen and (min-width: 150px) {
.flow-text {
line-height: 1.32rem; } }
@media only screen and (min-width: 540px) {
.flow-text {
font-size: 1.344rem; } }
@media only screen and (min-width: 180px) {
.flow-text {
line-height: 1.424rem; } }
@media only screen and (min-width: 570px) {
.flow-text {
font-size: 1.368rem; } }
@media only screen and (min-width: 210px) {
.flow-text {
line-height: 1.528rem; } }
@media only screen and (min-width: 600px) {
.flow-text {
font-size: 1.392rem; } }
@media only screen and (min-width: 240px) {
.flow-text {
line-height: 1.632rem; } }
@media only screen and (min-width: 630px) {
.flow-text {
font-size: 1.416rem; } }
@media only screen and (min-width: 270px) {
.flow-text {
line-height: 1.736rem; } }
@media only screen and (min-width: 660px) {
.flow-text {
font-size: 1.44rem; } }
@media only screen and (min-width: 300px) {
.flow-text {
line-height: 1.84rem; } }
@media only screen and (min-width: 690px) {
.flow-text {
font-size: 1.464rem; } }
@media only screen and (min-width: 330px) {
.flow-text {
line-height: 1.944rem; } }
@media only screen and (min-width: 720px) {
.flow-text {
font-size: 1.488rem; } }
@media only screen and (min-width: 360px) {
.flow-text {
line-height: 2.048rem; } }
@media only screen and (min-width: 750px) {
.flow-text {
font-size: 1.512rem; } }
@media only screen and (min-width: 390px) {
.flow-text {
line-height: 2.152rem; } }
@media only screen and (min-width: 780px) {
.flow-text {
font-size: 1.536rem; } }
@media only screen and (min-width: 420px) {
.flow-text {
line-height: 2.256rem; } }
@media only screen and (min-width: 810px) {
.flow-text {
font-size: 1.56rem; } }
@media only screen and (min-width: 450px) {
.flow-text {
line-height: 2.36rem; } }
@media only screen and (min-width: 840px) {
.flow-text {
font-size: 1.584rem; } }
@media only screen and (min-width: 480px) {
.flow-text {
line-height: 2.464rem; } }
@media only screen and (min-width: 870px) {
.flow-text {
font-size: 1.608rem; } }
@media only screen and (min-width: 510px) {
.flow-text {
line-height: 2.568rem; } }
@media only screen and (min-width: 900px) {
.flow-text {
font-size: 1.632rem; } }
@media only screen and (min-width: 540px) {
.flow-text {
line-height: 2.672rem; } }
@media only screen and (min-width: 930px) {
.flow-text {
font-size: 1.656rem; } }
@media only screen and (min-width: 570px) {
.flow-text {
line-height: 2.776rem; } }
@media only screen and (min-width: 960px) {
.flow-text {
font-size: 1.68rem; } }
@media only screen and (min-width: 600px) {
.flow-text {
line-height: 2.88rem; } }
.card-panel {
padding: 20px;
margin: 0.5rem 0 1rem 0;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box;
background-color: #fff; }
.card {
position: relative;
overflow: hidden;
margin: 0.5rem 0 1rem 0;
background-color: #fff;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box; }
.card .card-title {
color: #fff;
font-size: 24px;
font-weight: 300; }
.card .card-title.activator {
cursor: pointer; }
.card a {
color: #ffab40;
margin-right: 20px;
-webkit-transition: color 0.3s ease;
-moz-transition: color 0.3s ease;
-o-transition: color 0.3s ease;
-ms-transition: color 0.3s ease;
transition: color 0.3s ease;
text-transform: uppercase; }
.card a:hover {
color: #ffd8a6; }
.card.small {
height: 300px;
position: relative; }
.card.small .card-image {
overflow: hidden;
height: 150px; }
.card.small .card-content {
overflow: hidden;
height: 150px; }
.card.small .card-action {
position: absolute;
bottom: 0;
left: 0;
right: 0; }
.card .card-image {
position: relative;
overflow: hidden; }
.card .card-image img {
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
border-radius: 2px 2px 0 0;
background-clip: padding-box;
position: relative;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%; }
.card .card-image .card-title {
position: absolute;
bottom: 0;
left: 0;
padding: 20px; }
.card .card-content {
padding: 20px;
-webkit-border-radius: 0 0 2px 2px;
-moz-border-radius: 0 0 2px 2px;
border-radius: 0 0 2px 2px;
background-clip: padding-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.card .card-content p {
margin: 0;
color: inherit; }
.card .card-content .card-title {
line-height: 48px; }
.card .card-action {
border-top: 1px solid rgba(160, 160, 160, 0.2);
padding: 20px; }
.card .card-reveal {
padding: 20px;
position: absolute;
background-color: #FFF;
top: 100%;
height: 100%;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.card .card-reveal .card-title {
cursor: pointer;
display: block; }
#toast-container {
display: block;
position: fixed;
z-index: 1001; }
@media only screen and (max-width : 600px) {
#toast-container {
min-width: 100%;
bottom: 0%; } }
@media only screen and (min-width : 601px) and (max-width : 992px) {
#toast-container {
min-width: 30%;
left: 5%;
bottom: 7%; } }
@media only screen and (min-width : 993px) {
#toast-container {
min-width: 8%;
top: 10%;
right: 7%; } }
.toast {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
top: 0px;
width: auto;
clear: both;
margin-top: 10px;
position: relative;
max-width: 100%;
height: 48px;
line-height: 48px;
background-color: #323232;
padding: 0px 25px;
font-size: 1.1rem;
font-weight: 300;
color: #fff;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: space-between;
justify-content: space-between; }
.toast .btn, .toast .btn-large, .toast .btn-flat {
margin: 0;
margin-left: 3rem; }
.toast.rounded {
border-radius: 24px; }
@media only screen and (max-width : 600px) {
.toast {
width: 100%; } }
@media only screen and (min-width : 601px) and (max-width : 992px) {
.toast {
float: left; } }
@media only screen and (min-width : 993px) {
.toast {
float: right; } }
.tabs {
position: relative;
height: 48px;
background-color: #FFF;
margin: 0 auto;
width: 100%;
white-space: nowrap; }
.tabs li.tab {
display: block;
float: left;
text-align: center;
background-color: #fff;
line-height: 48px;
height: 48px;
padding: 0 20px;
margin: 0;
text-transform: uppercase;
letter-spacing: 0.8px;
width: 15%; }
.tabs li.tab a {
color: #ee6e73;
display: block;
width: 100%;
height: 100%;
-webkit-transition: color 0.28s ease;
-moz-transition: color 0.28s ease;
-o-transition: color 0.28s ease;
-ms-transition: color 0.28s ease;
transition: color 0.28s ease; }
.tabs li.tab a:hover {
color: #f8c1c3; }
.tabs .indicator {
position: absolute;
bottom: 0;
height: 2px;
background-color: #ee6e73;
will-change: left, right; }
ul.tabs li.tab {
padding: 0; }
.material-tooltip {
padding: 10px 8px;
font-size: 1rem;
z-index: 1000;
background-color: transparent;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box;
color: #fff;
min-height: 36px;
line-height: 1rem;
opacity: 0;
display: none;
position: absolute;
text-align: center;
overflow: hidden;
left: 0;
top: 0;
will-change: top, left; }
.backdrop {
position: absolute;
opacity: 0;
display: none;
height: 7px;
width: 14px;
-webkit-border-radius: 0 0 14px 14px;
-moz-border-radius: 0 0 14px 14px;
border-radius: 0 0 14px 14px;
background-clip: padding-box;
background-color: #323232;
z-index: -1;
-webkit-transform-origin: 50% 10%;
-moz-transform-origin: 50% 10%;
-ms-transform-origin: 50% 10%;
-o-transform-origin: 50% 10%;
transform-origin: 50% 10%;
will-change: transform, opacity; }
.btn, .btn-large, .btn-flat {
display: inline-block;
height: 36px;
margin-bottom: 15px;
padding: 0 2rem;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box;
line-height: 36px;
text-transform: uppercase;
border: none;
outline: 0;
-webkit-tap-highlight-color: transparent; }
.btn.disabled, .disabled.btn-large, .btn-floating.disabled, .btn-large.disabled, .btn:disabled, .btn-large:disabled, .btn-large:disabled, .btn-floating:disabled {
background-color: #DFDFDF;
box-shadow: none;
color: #9F9F9F; }
.btn.disabled:hover, .disabled.btn-large:hover, .btn-floating.disabled:hover, .btn-large.disabled:hover, .btn:disabled:hover, .btn-large:disabled:hover, .btn-large:disabled:hover, .btn-floating:disabled:hover {
background-color: #DFDFDF;
color: #9F9F9F; }
.btn i, .btn-large i, .btn-floating i, .btn-large i, .btn-flat i {
font-size: 1.3rem;
line-height: inherit; }
.btn, .btn-large {
text-decoration: none;
color: #FFF;
background-color: #2196F3;
text-align: center;
letter-spacing: 0.5px;
-webkit-transition: 0.2s ease-out;
-moz-transition: 0.2s ease-out;
-o-transition: 0.2s ease-out;
-ms-transition: 0.2s ease-out;
transition: 0.2s ease-out;
cursor: pointer; }
.btn:hover, .btn-large:hover {
background-color: #39a1f4; }
.btn-floating {
display: inline-block;
position: relative;
z-index: 1;
width: 37px;
height: 37px;
line-height: 37px;
padding: 0;
background-color: #2196F3;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
background-clip: padding-box;
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
-ms-transition: 0.3s;
transition: 0.3s;
cursor: pointer; }
.btn-floating i {
width: inherit;
display: inline-block;
text-align: center;
color: #FFF;
font-size: 1.6rem;
line-height: 37px; }
.btn-floating.btn-large {
width: 55.5px;
height: 55.5px; }
.btn-floating.btn-large i {
line-height: 55.5px; }
.btn-flat {
box-shadow: none;
background-color: transparent;
color: #343434;
cursor: pointer; }
.btn-flat.disabled {
color: #b3b3b3; }
.btn-large {
height: 54px;
line-height: 56px; }
.btn-large i {
font-size: 1.6rem; }
.dropdown-content {
display: none;
position: absolute;
background-color: #FFFFFF;
margin: 0px;
min-width: 100px;
z-index: 1000;
max-height: 70%;
opacity: 0;
overflow-y: hidden;
will-change: width, height; }
.dropdown-content li {
cursor: pointer;
font-size: 1.2rem;
color: rgba(0, 0, 0, 0.87);
line-height: 1.5rem; }
.dropdown-content li:hover {
background-color: rgba(0, 0, 0, 0.06); }
.dropdown-content li > a, .dropdown-content li > span {
display: block;
padding: 1rem 1rem; }
/*!
* Waves v0.6.0
* http://fian.my.id/Waves
*
* Copyright 2014 Alfiana E. Sibuea and other contributors
* Released under the MIT license
* https://github.com/fians/Waves/blob/master/LICENSE
*/
.waves-effect {
position: relative;
cursor: pointer;
display: inline-block;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
z-index: 1;
will-change: opacity, transform;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
transition: all 0.3s ease-out; }
.waves-effect .waves-ripple {
position: absolute;
border-radius: 50%;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
opacity: 0;
background: rgba(0, 0, 0, 0.2);
-webkit-transition: all 0.7s ease-out;
-moz-transition: all 0.7s ease-out;
-o-transition: all 0.7s ease-out;
-ms-transition: all 0.7s ease-out;
transition: all 0.7s ease-out;
-webkit-transition-property: -webkit-transform, opacity;
-moz-transition-property: -moz-transform, opacity;
-o-transition-property: -o-transform, opacity;
transition-property: transform, opacity;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-ms-transform: scale(0);
-o-transform: scale(0);
transform: scale(0);
pointer-events: none; }
.waves-effect.waves-light .waves-ripple {
background-color: rgba(255, 255, 255, 0.45); }
.waves-effect.waves-red .waves-ripple {
background-color: rgba(244, 67, 54, 0.7); }
.waves-effect.waves-yellow .waves-ripple {
background-color: rgba(255, 235, 59, 0.7); }
.waves-effect.waves-orange .waves-ripple {
background-color: rgba(255, 152, 0, 0.7); }
.waves-effect.waves-purple .waves-ripple {
background-color: rgba(156, 39, 176, 0.7); }
.waves-effect.waves-green .waves-ripple {
background-color: rgba(76, 175, 80, 0.7); }
.waves-effect.waves-teal .waves-ripple {
background-color: rgba(0, 150, 136, 0.7); }
.waves-notransition {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important; }
.waves-circle {
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
-webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%); }
.waves-input-wrapper {
border-radius: 0.2em;
vertical-align: bottom; }
.waves-input-wrapper .waves-button-input {
position: relative;
top: 0;
left: 0;
z-index: 1; }
.waves-circle {
text-align: center;
width: 2.5em;
height: 2.5em;
line-height: 2.5em;
border-radius: 50%; }
.waves-block {
display: block; }
/* Firefox Bug: link not triggered */
a.waves-effect .waves-ripple {
z-index: -1; }
.modal {
display: none;
position: fixed;
background-color: #eee;
padding: 24px;
max-height: 70%;
max-width: 55%;
left: 0;
right: 0;
margin: auto;
overflow-y: auto;
z-index: 1000;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background-clip: padding-box;
-webkit-transform: translate(0);
-moz-transform: translate(0);
-ms-transform: translate(0);
-o-transform: translate(0);
transform: translate(0);
will-change: top, opacity; }
@media only screen and (max-width : 992px) {
.modal {
max-width: 80%; } }
.modal h1, .modal h2, .modal h3, .modal h4 {
margin-top: 0; }
#lean-overlay {
position: fixed;
z-index: 999;
top: 0;
left: 0;
bottom: 0;
right: 0;
height: 115%;
width: 100%;
background: #000;
display: none;
will-change: opacity; }
.modal-action {
margin-top: 10px;
margin-bottom: 0px; }
.collapsible {
border-top: 1px solid #ddd;
border-right: 1px solid #ddd;
border-left: 1px solid #ddd;
margin: 0.5rem 0 1rem 0; }
.collapsible li {
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
-ms-transition: 0.3s;
transition: 0.3s; }
.collapsible-header {
display: block;
cursor: pointer;
height: 3rem;
line-height: 3rem;
padding: 0 1rem;
background-color: #fff;
border-bottom: 1px solid #ddd; }
.collapsible-header i {
width: 2rem;
font-size: 1.6rem;
line-height: 3rem;
display: block;
float: left;
text-align: center;
margin-right: 1rem; }
.collapsible-body {
overflow: hidden;
display: none;
border-bottom: 1px solid #ddd;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.collapsible-body p {
margin: 0;
padding: 2rem; }
ul.side-nav ul.collapsible {
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
ul.side-nav ul.collapsible li {
padding: 0; }
ul.side-nav .collapsible-header {
background-color: transparent;
border: none;
line-height: inherit;
height: inherit;
margin: 0 1rem; }
ul.side-nav .collapsible-header i {
line-height: inherit; }
ul.side-nav .collapsible-body {
border: 0;
background-color: #FFF; }
ul.side-nav .collapsible-body li a {
margin: 0 1rem 0 2rem; }
li.no-padding {
padding: 0 !important; }
.materialboxed {
cursor: zoom-in;
position: relative;
-webkit-transition: opacity 0.4s;
-moz-transition: opacity 0.4s;
-o-transition: opacity 0.4s;
-ms-transition: opacity 0.4s;
transition: opacity 0.4s; }
.materialboxed:hover {
will-change: left, top, width, height; }
.materialboxed:hover:not(.active) {
-ms-filter: "progid:DXImageTransform@mixin Microsoft@mixin Alpha(Opacity=${iefactor})";
filter: "alpha(opacity=(${iefactor}))";
-moz-opacity: 0.8;
-khtml-opacity: 0.8;
opacity: 0.8; }
.materialboxed.active {
cursor: zoom-out; }
#materialbox-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #292929;
z-index: 999;
will-change: opacity; }
.materialbox-caption {
position: fixed;
display: none;
color: #fff;
line-height: 50px;
bottom: 0px;
width: 100%;
box-sizing: border-box;
text-align: center;
padding: 0% 15%;
height: 50px;
z-index: 1000;
-webkit-font-smoothing: antialiased; }
/* Remove Focus Boxes */
select:focus {
outline: 1px solid #f8c1c3; }
button:focus {
outline: none;
background-color: #51adf6; }
label {
font-size: 0.8rem;
color: #9e9e9e; }
/***************************
Text Inputs + Textarea
****************************/
.input-field {
position: relative;
margin-top: 1rem; }
.input-field label {
color: #9e9e9e;
position: absolute;
top: 0.8rem;
left: 0.75rem;
font-size: 1rem;
cursor: text;
-webkit-transition: 0.2s ease-out;
-moz-transition: 0.2s ease-out;
-o-transition: 0.2s ease-out;
-ms-transition: 0.2s ease-out;
transition: 0.2s ease-out; }
.input-field label.active {
font-size: 0.8rem;
-webkit-transform: translateY(-130%);
-moz-transform: translateY(-130%);
-ms-transform: translateY(-130%);
-o-transform: translateY(-130%);
transform: translateY(-130%); }
.input-field input[type=text]:focus + label, .input-field input[type=password]:focus + label, .input-field input[type=email]:focus + label, .input-field input[type=date]:focus + label, .input-field input[type=tel]:focus + label, .input-field input[type=number]:focus + label, .input-field textarea:focus.materialize-textarea + label {
color: #03a9f4; }
.input-field input[type=text].valid, .input-field input[type=password].valid, .input-field input[type=email].valid, .input-field input[type=date].valid, .input-field input[type=tel].valid, .input-field input[type=number].valid, .input-field textarea.materialize-textarea.valid {
border-bottom: 1px solid #4CAF50;
-webkit-box-shadow: 0 1px 0 0 #4CAF50;
-moz-box-shadow: 0 1px 0 0 #4CAF50;
box-shadow: 0 1px 0 0 #4CAF50; }
.input-field input[type=text].invalid, .input-field input[type=password].invalid, .input-field input[type=email].invalid, .input-field input[type=date].invalid, .input-field input[type=tel].invalid, .input-field input[type=number].invalid, .input-field textarea.materialize-textarea.invalid {
border-bottom: 1px solid #F44336;
-webkit-box-shadow: 0 1px 0 0 #F44336;
-moz-box-shadow: 0 1px 0 0 #F44336;
box-shadow: 0 1px 0 0 #F44336; }
.input-field .prefix {
position: absolute;
width: 3rem;
font-size: 2rem;
-webkit-transition: color 0.2s;
-moz-transition: color 0.2s;
-o-transition: color 0.2s;
-ms-transition: color 0.2s;
transition: color 0.2s; }
.input-field .prefix.active {
color: #03a9f4; }
.input-field .prefix ~ input, .input-field .prefix ~ textarea {
margin-left: 3rem;
width: 92%;
width: calc(100% - 3rem); }
.input-field .prefix ~ textarea {
padding-top: 0.8rem; }
.input-field .prefix ~ label {
margin-left: 3rem; }
@media only screen and (max-width : 992px) {
.input-field .prefix ~ input {
width: 86%;
width: calc(100% - 3rem); }
}
@media only screen and (max-width : 600px) {
.input-field .prefix ~ input {
width: 80%;
width: calc(100% - 3rem); }
}
textarea {
width: 100%;
height: 3rem;
background-color: transparent; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=tel], input[type=number], textarea.materialize-textarea {
background-color: transparent;
border: none;
border-bottom: 1px solid #9e9e9e;
outline: none;
height: 3rem;
width: 100%;
font-size: 1rem;
margin: 0 0 15px 0;
padding: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
-ms-transition: 0.3s;
transition: 0.3s; }
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=date]:focus, input[type=tel]:focus, input[type=number]:focus, textarea:focus.materialize-textarea {
border-bottom: 1px solid #03a9f4;
-webkit-box-shadow: 0 1px 0 0 #03a9f4;
-moz-box-shadow: 0 1px 0 0 #03a9f4;
box-shadow: 0 1px 0 0 #03a9f4; }
textarea.materialize-textarea {
overflow-y: hidden;
/* prevents scroll bar flash */
padding: 1.6rem 0;
/* prevents text jump on Enter keypress */
resize: none; }
.hiddendiv {
display: none;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
/* future version of deprecated 'word-wrap' */
padding-top: 1.2rem;
/* prevents text jump on Enter keypress */ }
/***************
Radio Buttons
***************/
/* Remove default Radio Buttons */
[type="radio"]:not(:checked), [type="radio"]:checked {
position: absolute;
left: -9999px; }
[type="radio"]:not(:checked) + label, [type="radio"]:checked + label {
position: relative;
padding-left: 35px;
cursor: pointer;
display: inline-block;
height: 25px;
line-height: 25px;
font-size: 1rem;
-webkit-transition: 0.28s ease;
-moz-transition: 0.28s ease;
-o-transition: 0.28s ease;
-ms-transition: 0.28s ease;
transition: 0.28s ease;
-webkit-user-select: none;
/* webkit (safari, chrome) browsers */
-moz-user-select: none;
/* mozilla browsers */
-khtml-user-select: none;
/* webkit (konqueror) browsers */
-ms-user-select: none;
/* IE10+ */ }
[type="radio"] + label:before, [type="radio"] + label:after {
content: '';
position: absolute;
left: 0px;
top: 0px;
margin: 4px;
width: 16px;
height: 16px;
z-index: 0;
-webkit-transition: 0.28s ease;
-moz-transition: 0.28s ease;
-o-transition: 0.28s ease;
-ms-transition: 0.28s ease;
transition: 0.28s ease; }
/* Unchecked styles */
[type="radio"]:not(:checked) + label:before {
border-radius: 50%;
border: 2px solid #5a5a5a; }
[type="radio"]:not(:checked) + label:after {
border-radius: 50%;
border: 2px solid #5a5a5a;
z-index: -1;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-ms-transform: scale(0);
-o-transform: scale(0);
transform: scale(0); }
/* Checked styles */
[type="radio"]:checked + label:before {
border-radius: 50%;
border: 2px solid transparent; }
[type="radio"]:checked + label:after {
border-radius: 50%;
border: 2px solid #0f9d58;
background-color: #0f9d58;
z-index: 0;
-webkit-transform: scale(1.02);
-moz-transform: scale(1.02);
-ms-transform: scale(1.02);
-o-transform: scale(1.02);
transform: scale(1.02); }
/* Radio With gap */
[type="radio"].with-gap:checked + label:before {
border-radius: 50%;
border: 2px solid #0f9d58; }
[type="radio"].with-gap:checked + label:after {
border-radius: 50%;
border: 2px solid #0f9d58;
background-color: #0f9d58;
z-index: 0;
-webkit-transform: scale(0.5);
-moz-transform: scale(0.5);
-ms-transform: scale(0.5);
-o-transform: scale(0.5);
transform: scale(0.5); }
/* Disabled style */
[type="radio"]:disabled:not(:checked) + label:before, [type="radio"]:disabled:checked + label:before {
background-color: transparent;
border-color: rgba(0, 0, 0, 0.26); }
[type="radio"]:disabled + label {
color: rgba(0, 0, 0, 0.26); }
[type="radio"]:disabled:not(:checked) + label:hover:before {
border-color: rgba(0, 0, 0, 0.26); }
/***************
Checkboxes
***************/
/* CUSTOM CSS CHECKBOXES */
form p {
margin-bottom: 10px;
text-align: left; }
form p:last-child {
margin-bottom: 0px; }
/* Remove default checkbox */
[type="checkbox"]:not(:checked), [type="checkbox"]:checked {
position: absolute;
left: -9999px; }
[type="checkbox"]:not(:checked) + label, [type="checkbox"]:checked + label {
position: relative;
padding-left: 35px;
cursor: pointer;
display: inline-block;
height: 25px;
line-height: 25px;
font-size: 1rem;
-webkit-user-select: none;
/* webkit (safari, chrome) browsers */
-moz-user-select: none;
/* mozilla browsers */
-khtml-user-select: none;
/* webkit (konqueror) browsers */
-ms-user-select: none;
/* IE10+ */ }
/* checkbox aspect */
[type="checkbox"] + label:before {
content: '';
position: absolute;
margin-top: 2px;
left: 0;
z-index: 0;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
background-clip: padding-box;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
-ms-transition: 0.2s;
transition: 0.2s; }
/* Unchecked styles */
[type="checkbox"]:not(:checked) + label:before {
top: 0px;
width: 18px;
height: 18px;
border: 2px solid #5a5a5a; }
/* Checked styles */
[type="checkbox"]:checked + label:before {
left: -3px;
top: -4px;
width: 12px;
height: 22px;
border-top: 2px solid transparent;
border-left: 2px solid transparent;
border-right: 2px solid #0f9d58;
border-bottom: 2px solid #0f9d58;
-webkit-transform: rotateZ(40deg);
-moz-transform: rotateZ(40deg);
-ms-transform: rotateZ(40deg);
-o-transform: rotateZ(40deg);
transform: rotateZ(40deg);
-webkit-backface-visibility: hidden;
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%; }
/* disabled checkbox */
[type="checkbox"]:disabled:not(:checked) + label:before, [type="checkbox"]:disabled:checked + label:before {
top: 0;
left: 0;
box-shadow: none;
background-color: rgba(0, 0, 0, 0.26);
width: 18px;
height: 18px;
border: 2px solid rgba(0, 0, 0, 0.26);
-webkit-transform: rotateZ(0deg);
-moz-transform: rotateZ(0deg);
-ms-transform: rotateZ(0deg);
-o-transform: rotateZ(0deg);
transform: rotateZ(0deg); }
[type="checkbox"]:disabled + label {
color: rgba(0, 0, 0, 0.26); }
[type="checkbox"]:disabled:not(:checked) + label:hover:before {
border-color: rgba(0, 0, 0, 0.26); }
.switch, .switch * {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; }
.switch label {
cursor: pointer; }
.switch label input[type=checkbox]:first-child {
opacity: 0;
width: 0;
height: 0; }
.switch label input[type=checkbox]:first-child:checked + .lever {
background-color: #7bc5be; }
.switch label input[type=checkbox]:first-child:checked + .lever:after {
background-color: #009587; }
.switch label .lever, .switch label input[type=checkbox][disabled]:first-child + .lever {
content: "";
display: inline-block;
width: 45px;
height: 15px;
background-color: #818181;
border-radius: 15px;
margin-right: 10px;
transition: background 0.3s ease;
vertical-align: middle;
margin-left: 5px; }
.switch label .lever:after {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background-color: #F1F1F1;
border-radius: 20px;
position: relative;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4);
left: -5px;
top: -2px;
transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease; }
.switch label input[type=checkbox][disabled]:first-child + .lever:after, .switch label input[type=checkbox][disabled]:checked:first-child + .lever:after {
background-color: #BDBDBD; }
input[type=checkbox]:first-child:checked ~ .lever:active:after {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 149, 135, 0.1); }
input[type=checkbox]:first-child ~ .lever:active:after, input[type=checkbox][disabled]:first-child ~ .lever:active:after {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 0, 0, 0.1); }
.switch label input[type=checkbox]:first-child:checked + .lever:after {
left: 30px; }
/***************
Select Field
***************/
.select-wrapper span.select-dropdown {
position: relative;
cursor: pointer;
color: #444;
background-color: transparent;
border: none;
border-bottom: 1px solid #9e9e9e;
outline: none;
height: 3rem;
line-height: 3rem;
width: 100%;
font-size: 1rem;
margin: 0 0 15px 0;
padding: 0;
display: block;
position: relative; }
.select-wrapper span.select-dropdown:after {
position: absolute;
right: 0;
font-size: 23px; }
select {
display: none; }
select.browser-default {
display: block; }
select:disabled {
color: rgba(0, 0, 0, 0.3); }
.select-wrapper span.select-dropdown.disabled {
color: rgba(0, 0, 0, 0.3); }
.select-dropdown li.disabled {
color: rgba(0, 0, 0, 0.3); }
.select-dropdown li.disabled:hover {
background-color: transparent; }
/***************
Range
***************/
.range-field {
position: relative; }
input[type=range], input[type=range] + .thumb {
cursor: pointer; }
input[type=range] {
position: relative;
background-color: transparent;
border: none;
outline: none;
width: 100%;
margin: 15px 0px;
padding: 0; }
input[type=range] + .thumb {
position: absolute;
border: none;
height: 0;
width: 0;
border-radius: 50%;
background-color: #0f9d58;
top: 10px;
margin-left: -6px;
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg); }
input[type=range] + .thumb .value {
display: block;
width: 30px;
text-align: center;
color: #0f9d58;
font-size: 0px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg); }
input[type=range] + .thumb.active {
border-radius: 50% 50% 50% 0; }
input[type=range] + .thumb.active .value {
color: #fff;
margin-left: -1px;
margin-top: 8px;
font-size: 10px; }
input[type=range]:focus {
outline: none; }
input[type=range] {
-webkit-appearance: none; }
input[type=range]::-webkit-slider-runnable-track {
height: 3px;
background: #c2c0c2;
border: none; }
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
border: none;
height: 14px;
width: 14px;
border-radius: 50%;
background-color: #0f9d58;
transform-origin: 50% 50%;
margin: -5px 0 0 0;
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
-ms-transition: 0.3s;
transition: 0.3s; }
input[type=range]:focus::-webkit-slider-runnable-track {
background: #ccc; }
input[type=range] {
/* fix for FF unable to apply focus style bug */
border: 1px solid white;
/*required for proper track sizing in FF*/ }
input[type=range]::-moz-range-track {
height: 3px;
background: #ddd;
border: none; }
input[type=range]::-moz-range-thumb {
border: none;
height: 14px;
width: 14px;
border-radius: 50%;
background: #0f9d58;
margin-top: -5px; }
/*hide the outline behind the border*/
input[type=range]:-moz-focusring {
outline: 1px solid white;
outline-offset: -1px; }
input[type=range]:focus::-moz-range-track {
background: #ccc; }
input[type=range]::-ms-track {
height: 3px;
/*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
background: transparent;
/*leave room for the larger thumb to overflow with a transparent border */
border-color: transparent;
border-width: 6px 0;
/*remove default tick marks*/
color: transparent; }
input[type=range]::-ms-fill-lower {
background: #777; }
input[type=range]::-ms-fill-upper {
background: #ddd; }
input[type=range]::-ms-thumb {
border: none;
height: 14px;
width: 14px;
border-radius: 50%;
background: #0f9d58; }
input[type=range]:focus::-ms-fill-lower {
background: #888; }
input[type=range]:focus::-ms-fill-upper {
background: #ccc; }
/***************************
Text Inputs + Textarea
****************************/
select {
background-color: #fffafa;
width: 100%;
padding: 5px;
border: 1px solid #f2f2f2;
border-radius: 2px;
height: 3rem; }
/***************
Nav List
***************/
ul.table-of-contents.fixed {
position: fixed; }
ul.table-of-contents li {
padding: 2px 0; }
ul.table-of-contents a {
display: inline-block;
font-weight: 300;
color: #757575;
padding-left: 20px;
height: 1.5rem;
line-height: 1.5rem;
letter-spacing: 0.4;
display: inline-block; }
ul.table-of-contents a:hover {
color: #a8a8a8;
padding-left: 19px;
border-left: 1px solid #ea4a4f; }
ul.table-of-contents a.active {
font-weight: 500;
padding-left: 18px;
border-left: 2px solid #ea4a4f; }
@media only screen and (max-width : 992px) {
ul.side-nav {
position: fixed;
width: 240px;
left: -250px;
top: 0;
height: 100%;
height: calc(100% + 60px);
padding-bottom: 60px;
background-color: #FFF;
z-index: 999;
will-change: left; }
ul.side-nav.right-aligned {
will-change: right;
right: -250px;
left: auto; }
ul.side-nav .collapsible {
margin: 0; }
ul.side-nav li {
float: none;
padding: 0 15px;
width: 240px; }
ul.side-nav li:hover, ul.side-nav li.active {
background-color: #ddd; }
ul.side-nav a {
color: #444; }
}
.drag-target {
height: 100%;
width: 10%;
position: fixed;
top: 0;
z-index: 998; }
ul.side-nav.full, ul.side-nav.fixed {
position: fixed;
width: 240px;
left: -250px;
top: 0;
margin: 0;
padding-bottom: 60px;
height: 100%;
height: calc(100% + 60px);
background-color: #FFF;
z-index: 999;
will-change: left; }
ul.side-nav.full.right-aligned, ul.side-nav.fixed.right-aligned {
will-change: right;
right: -250px;
left: auto; }
ul.side-nav.full .collapsible, ul.side-nav.fixed .collapsible {
margin: 0; }
ul.side-nav.full li, ul.side-nav.fixed li {
float: none;
line-height: 64px;
padding: 0 15px;
width: 240px;
-webkit-transition: background-color 0s;
-moz-transition: background-color 0s;
-o-transition: background-color 0s;
-ms-transition: background-color 0s;
transition: background-color 0s; }
ul.side-nav.full li:hover, ul.side-nav.full li.active, ul.side-nav.fixed li:hover, ul.side-nav.fixed li.active {
background-color: #ddd; }
ul.side-nav.full a, ul.side-nav.fixed a {
display: block;
padding: 0 15px;
color: #444; }
ul.side-nav.fixed {
left: 0;
position: fixed; }
ul.side-nav.fixed.right-aligned {
will-change: right;
right: 0;
left: auto; }
@media only screen and (max-width : 992px) {
ul.side-nav.fixed {
left: -250px; }
ul.side-nav.fixed.right-aligned {
right: -250px;
left: auto; }
}
#sidenav-overlay {
position: fixed;
top: 0px;
left: 0px;
right: 0px;
height: 120vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 997;
will-change: opacity; }
/*
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**************************/
/* STYLES FOR THE SPINNER */
/**************************/
/*
* Constants:
* STROKEWIDTH = 3px
* ARCSIZE = 270 degrees (amount of circle the arc takes up)
* ARCTIME = 1333ms (time it takes to expand and contract arc)
* ARCSTARTROT = 216 degrees (how much the start location of the arc
* should rotate each time, 216 gives us a
* 5 pointed star shape (it's 360/5 * 3).
* For a 7 pointed star, we might do
* 360/7 * 3 = 154.286)
* CONTAINERWIDTH = 28px
* SHRINK_TIME = 400ms
*/
.preloader-wrapper {
display: inline-block;
position: relative;
width: 48px;
height: 48px; }
.preloader-wrapper.small {
width: 36px;
height: 36px; }
.preloader-wrapper.big {
width: 64px;
height: 64px; }
.preloader-wrapper.active {
/* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
-webkit-animation: container-rotate 1568ms linear infinite;
animation: container-rotate 1568ms linear infinite; }
@-webkit-keyframes container-rotate {
to {
-webkit-transform: rotate(360deg); } }
@keyframes container-rotate {
to {
transform: rotate(360deg); } }
.spinner-layer {
position: absolute;
width: 100%;
height: 100%;
opacity: 0; }
.spinner-blue {
border-color: #4285f4; }
.spinner-red {
border-color: #db4437; }
.spinner-yellow {
border-color: #f4b400; }
.spinner-green {
border-color: #0f9d58; }
/**
* IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
*
* iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
* guarantee that the animation will start _exactly_ after that value. So we avoid using
* animation-delay and instead set custom keyframes for each color (as redundant as it
* seems).
*
* We write out each animation in full (instead of separating animation-name,
* animation-duration, etc.) because under the polyfill, Safari does not recognize those
* specific properties properly, treats them as -webkit-animation, and overrides the
* other animation rules. See https://github.com/Polymer/platform/issues/53.
*/
.active .spinner-layer.spinner-blue {
/* durations: 4 * ARCTIME */
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, blue-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, blue-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
.active .spinner-layer.spinner-red {
/* durations: 4 * ARCTIME */
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, red-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, red-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
.active .spinner-layer.spinner-yellow {
/* durations: 4 * ARCTIME */
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, yellow-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, yellow-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
.active .spinner-layer.spinner-green {
/* durations: 4 * ARCTIME */
-webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, green-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both, green-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
@-webkit-keyframes fill-unfill-rotate {
/* 0.5 * ARCSIZE */
/* 1 * ARCSIZE */
/* 1.5 * ARCSIZE */
/* 2 * ARCSIZE */
/* 2.5 * ARCSIZE */
/* 3 * ARCSIZE */
/* 3.5 * ARCSIZE */
/* 4 * ARCSIZE */
12.5% {
-webkit-transform: rotate(135deg); }
25% {
-webkit-transform: rotate(270deg); }
37.5% {
-webkit-transform: rotate(405deg); }
50% {
-webkit-transform: rotate(540deg); }
62.5% {
-webkit-transform: rotate(675deg); }
75% {
-webkit-transform: rotate(810deg); }
87.5% {
-webkit-transform: rotate(945deg); }
to {
-webkit-transform: rotate(1080deg); } }
@keyframes fill-unfill-rotate {
/* 0.5 * ARCSIZE */
/* 1 * ARCSIZE */
/* 1.5 * ARCSIZE */
/* 2 * ARCSIZE */
/* 2.5 * ARCSIZE */
/* 3 * ARCSIZE */
/* 3.5 * ARCSIZE */
/* 4 * ARCSIZE */
12.5% {
transform: rotate(135deg); }
25% {
transform: rotate(270deg); }
37.5% {
transform: rotate(405deg); }
50% {
transform: rotate(540deg); }
62.5% {
transform: rotate(675deg); }
75% {
transform: rotate(810deg); }
87.5% {
transform: rotate(945deg); }
to {
transform: rotate(1080deg); } }
@-webkit-keyframes blue-fade-in-out {
from {
opacity: 1; }
25% {
opacity: 1; }
26% {
opacity: 0; }
89% {
opacity: 0; }
90% {
opacity: 1; }
100% {
opacity: 1; } }
@keyframes blue-fade-in-out {
from {
opacity: 1; }
25% {
opacity: 1; }
26% {
opacity: 0; }
89% {
opacity: 0; }
90% {
opacity: 1; }
100% {
opacity: 1; } }
@-webkit-keyframes red-fade-in-out {
from {
opacity: 0; }
15% {
opacity: 0; }
25% {
opacity: 1; }
50% {
opacity: 1; }
51% {
opacity: 0; } }
@keyframes red-fade-in-out {
from {
opacity: 0; }
15% {
opacity: 0; }
25% {
opacity: 1; }
50% {
opacity: 1; }
51% {
opacity: 0; } }
@-webkit-keyframes yellow-fade-in-out {
from {
opacity: 0; }
40% {
opacity: 0; }
50% {
opacity: 1; }
75% {
opacity: 1; }
76% {
opacity: 0; } }
@keyframes yellow-fade-in-out {
from {
opacity: 0; }
40% {
opacity: 0; }
50% {
opacity: 1; }
75% {
opacity: 1; }
76% {
opacity: 0; } }
@-webkit-keyframes green-fade-in-out {
from {
opacity: 0; }
65% {
opacity: 0; }
75% {
opacity: 1; }
90% {
opacity: 1; }
100% {
opacity: 0; } }
@keyframes green-fade-in-out {
from {
opacity: 0; }
65% {
opacity: 0; }
75% {
opacity: 1; }
90% {
opacity: 1; }
100% {
opacity: 0; } }
/**
* Patch the gap that appear between the two adjacent div.circle-clipper while the
* spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11).
*/
.gap-patch {
position: absolute;
box-sizing: border-box;
top: 0;
left: 45%;
width: 10%;
height: 100%;
overflow: hidden;
border-color: inherit; }
.gap-patch .circle {
width: 1000%;
left: -450%; }
.circle-clipper {
display: inline-block;
position: relative;
width: 50%;
height: 100%;
overflow: hidden;
border-color: inherit; }
.circle-clipper .circle {
width: 200%;
box-sizing: border-box;
height: 100%;
border-width: 3px;
/* STROKEWIDTH */
border-style: solid;
border-color: inherit;
border-bottom-color: transparent !important;
border-radius: 50%;
-webkit-animation: none;
animation: none;
position: absolute;
top: 0;
right: 0;
bottom: 0; }
.circle-clipper.left .circle {
left: 0;
border-right-color: transparent !important;
-webkit-transform: rotate(129deg);
transform: rotate(129deg); }
.circle-clipper.right .circle {
left: -100%;
border-left-color: transparent !important;
-webkit-transform: rotate(-129deg);
transform: rotate(-129deg); }
.active .circle-clipper.left .circle {
/* duration: ARCTIME */
-webkit-animation: left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
.active .circle-clipper.right .circle {
/* duration: ARCTIME */
-webkit-animation: right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
@-webkit-keyframes left-spin {
from {
-webkit-transform: rotate(130deg); }
50% {
-webkit-transform: rotate(-5deg); }
to {
-webkit-transform: rotate(130deg); } }
@keyframes left-spin {
from {
transform: rotate(130deg); }
50% {
transform: rotate(-5deg); }
to {
transform: rotate(130deg); } }
@-webkit-keyframes right-spin {
from {
-webkit-transform: rotate(-130deg); }
50% {
-webkit-transform: rotate(5deg); }
to {
-webkit-transform: rotate(-130deg); } }
@keyframes right-spin {
from {
transform: rotate(-130deg); }
50% {
transform: rotate(5deg); }
to {
transform: rotate(-130deg); } }
#spinnerContainer.cooldown {
/* duration: SHRINK_TIME */
-webkit-animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0, 0.2, 1);
animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0, 0.2, 1); }
@-webkit-keyframes fade-out {
from {
opacity: 1; }
to {
opacity: 0; } }
@keyframes fade-out {
from {
opacity: 1; }
to {
opacity: 0; } }
.slider {
position: relative;
height: 440px;
width: 100%; }
.slider.fullscreen {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0; }
.slider.fullscreen ul.slides {
height: 100%; }
.slider.fullscreen ul.indicators {
z-index: 2;
bottom: 30px; }
.slider ul.slides {
background-color: #9e9e9e;
margin: 0;
height: 400px; }
.slider ul.slides li {
-ms-filter: "progid:DXImageTransform@mixin Microsoft@mixin Alpha(Opacity=${iefactor})";
filter: "alpha(opacity=(${iefactor}))";
-moz-opacity: 0;
-khtml-opacity: 0;
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 100%;
height: inherit;
overflow: hidden; }
.slider ul.slides li img {
height: 100%; }
.slider ul.slides li .caption {
color: #fff;
position: absolute;
top: 15%;
left: 15%;
width: 70%;
-ms-filter: "progid:DXImageTransform@mixin Microsoft@mixin Alpha(Opacity=${iefactor})";
filter: "alpha(opacity=(${iefactor}))";
-moz-opacity: 0;
-khtml-opacity: 0;
opacity: 0; }
.slider ul.slides li .caption p {
color: #e0e0e0; }
.slider ul.slides li.active {
z-index: 2; }
.slider ul.indicators {
position: absolute;
text-align: center;
left: 0;
right: 0;
bottom: 0;
margin: 0; }
.slider ul.indicators li.indicator-item {
display: inline-block;
position: relative;
cursor: pointer;
height: 16px;
width: 16px;
margin: 0 12px;
background-color: #e0e0e0;
-webkit-transition: background-color 0.3s;
-moz-transition: background-color 0.3s;
-o-transition: background-color 0.3s;
-ms-transition: background-color 0.3s;
transition: background-color 0.3s;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
background-clip: padding-box; }
.slider ul.indicators li.indicator-item.active {
background-color: #4CAF50; }
/* ==========================================================================
$BASE-PICKER
========================================================================== */
/**
* Note: the root picker element should *NOT* be styled more than what's here.
*/
.picker {
font-size: 16px;
text-align: left;
line-height: 1.2;
color: #000000;
position: absolute;
z-index: 10000;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
/**
* The picker input element.
*/
.picker__input {
cursor: default; }
/**
* When the picker is opened, the input element is "activated".
*/
.picker__input.picker__input--active {
border-color: #0089ec; }
/**
* The holder is the only "scrollable" top-level container element.
*/
.picker__holder {
width: 100%;
overflow-y: auto;
-webkit-overflow-scrolling: touch; }
/*!
* Default mobile-first, responsive styling for pickadate.js
* Demo: http://amsul.github.io/pickadate.js
*/
/**
* Note: the root picker element should *NOT* be styled more than what's here.
*/
/**
* Make the holder and frame fullscreen.
*/
.picker__holder, .picker__frame {
bottom: 0;
left: 0;
right: 0;
top: 100%; }
/**
* The holder should overlay the entire screen.
*/
.picker__holder {
position: fixed;
-webkit-transition: background 0.15s ease-out, top 0s 0.15s;
-moz-transition: background 0.15s ease-out, top 0s 0.15s;
transition: background 0.15s ease-out, top 0s 0.15s;
-webkit-backface-visibility: hidden; }
/**
* The frame that bounds the box contents of the picker.
*/
.picker__frame {
position: absolute;
margin: 0 auto;
min-width: 256px;
max-width: 300px;
max-height: 350px;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
-webkit-transition: all 0.15s ease-out;
-moz-transition: all 0.15s ease-out;
transition: all 0.15s ease-out; }
@media (min-height: 28.875em) {
.picker__frame {
overflow: visible;
top: auto;
bottom: -100%;
max-height: 80%; }
}
@media (min-height: 40.125em) {
.picker__frame {
margin-bottom: 7.5%; }
}
/**
* The wrapper sets the stage to vertically align the box contents.
*/
.picker__wrap {
display: table;
width: 100%;
height: 100%; }
@media (min-height: 28.875em) {
.picker__wrap {
display: block; }
}
/**
* The box contains all the picker contents.
*/
.picker__box {
background: #ffffff;
display: table-cell;
vertical-align: middle; }
@media (min-height: 28.875em) {
.picker__box {
display: block;
border: 1px solid #777777;
border-top-color: #898989;
border-bottom-width: 0;
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
-webkit-box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24);
-moz-box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24);
box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); }
}
/**
* When the picker opens...
*/
.picker--opened .picker__holder {
top: 0;
background: transparent;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#1E000000,endColorstr=#1E000000)";
zoom: 1;
background: rgba(0, 0, 0, 0.32);
-webkit-transition: background 0.15s ease-out;
-moz-transition: background 0.15s ease-out;
transition: background 0.15s ease-out; }
.picker--opened .picker__frame {
top: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
-moz-opacity: 1;
opacity: 1; }
@media (min-height: 35.875em) {
.picker--opened .picker__frame {
top: 10%;
bottom: 20% auto; }
}
/**
* For `large` screens, transform into an inline picker.
*/
/* ==========================================================================
CUSTOM MATERIALIZE STYLES
========================================================================== */
.picker__input.picker__input--active {
border-color: #E3F2FD; }
.picker__frame {
margin: 0 auto;
max-width: 325px; }
@media (min-height: 38.875em) {
.picker--opened .picker__frame {
top: 10%;
bottom: auto; }
}
/* ==========================================================================
$BASE-DATE-PICKER
========================================================================== */
/**
* The picker box.
*/
.picker__box {
padding: 0 1em; }
/**
* The header containing the month and year stuff.
*/
.picker__header {
text-align: center;
position: relative;
margin-top: 0.75em; }
/**
* The month and year labels.
*/
.picker__month, .picker__year {
display: inline-block;
margin-left: 0.25em;
margin-right: 0.25em; }
/**
* The month and year selectors.
*/
.picker__select--month, .picker__select--year {
height: 2em;
padding: 0.5em;
margin-left: 0.25em;
margin-right: 0.25em; }
@media (min-width: 24.5em) {
.picker__select--month, .picker__select--year {
margin-top: -0.5em; }
}
.picker__select--month {
width: 35%; }
.picker__select--year {
width: 22.5%; }
.picker__select--month:focus, .picker__select--year:focus {
border-color: #0089ec; }
/**
* The month navigation buttons.
*/
.picker__nav--prev, .picker__nav--next {
position: absolute;
padding: 0.5em 1.25em;
width: 1em;
height: 1em;
box-sizing: content-box;
top: -0.25em; }
.picker__nav--prev {
left: -1em;
padding-right: 1.25em; }
.picker__nav--next {
right: -1em;
padding-left: 1.25em; }
.picker__nav--prev:hover, .picker__nav--next:hover {
cursor: pointer;
color: #000000;
background: #b1dcfb; }
.picker__nav--disabled, .picker__nav--disabled:hover, .picker__nav--disabled:before, .picker__nav--disabled:before:hover {
cursor: default;
background: none;
border-right-color: #f5f5f5;
border-left-color: #f5f5f5; }
/**
* The calendar table of dates
*/
.picker__table {
text-align: center;
border-collapse: collapse;
border-spacing: 0;
table-layout: fixed;
font-size: 1rem;
width: 100%;
margin-top: 0.75em;
margin-bottom: 0.5em; }
.picker__table th, .picker__table td {
text-align: center; }
.picker__table td {
margin: 0;
padding: 0; }
/**
* The weekday labels
*/
.picker__weekday {
width: 14.285714286%;
font-size: 0.75em;
padding-bottom: 0.25em;
color: #999999;
font-weight: 500;
/* Increase the spacing a tad */ }
@media (min-height: 33.875em) {
.picker__weekday {
padding-bottom: 0.5em; }
}
/**
* The days on the calendar
*/
.picker__day--today {
position: relative;
color: #595959;
letter-spacing: -0.3;
padding: 0.75rem 0;
font-weight: 400;
border: 1px solid transparent; }
.picker__day--disabled:before {
border-top-color: #aaaaaa; }
.picker__day--infocus:hover {
cursor: pointer;
color: #000;
font-weight: 500; }
.picker__day--outfocus {
padding: 0.75rem 0;
color: #fff; }
.picker__day--outfocus:hover {
cursor: pointer;
color: #dddddd;
font-weight: 500; }
.picker__day--highlighted:hover, .picker--focused .picker__day--highlighted {
cursor: pointer;
color: #000000; }
.picker__day--selected, .picker__day--selected:hover, .picker--focused .picker__day--selected {
border-radius: 50%;
-webkit-transform: scale(0.75);
-moz-transform: scale(0.75);
-ms-transform: scale(0.75);
-o-transform: scale(0.75);
transform: scale(0.75);
background: #0089ec;
color: #ffffff; }
.picker__day--disabled, .picker__day--disabled:hover, .picker--focused .picker__day--disabled {
background: #f5f5f5;
border-color: #f5f5f5;
color: #dddddd;
cursor: default; }
.picker__day--highlighted.picker__day--disabled, .picker__day--highlighted.picker__day--disabled:hover {
background: #bbbbbb; }
/**
* The footer containing the "today", "clear", and "close" buttons.
*/
.picker__footer {
text-align: center;
display: flex;
align-items: center;
justify-content: space-between; }
.picker__button--today, .picker__button--clear, .picker__button--close {
border: 1px solid #ffffff;
background: #ffffff;
font-size: 0.8em;
padding: 0.66em 0;
font-weight: bold;
width: 33%;
display: inline-block;
vertical-align: bottom; }
.picker__button--today:hover, .picker__button--clear:hover, .picker__button--close:hover {
cursor: pointer;
color: #000000;
background: #b1dcfb;
border-bottom-color: #b1dcfb; }
.picker__button--today:focus, .picker__button--clear:focus, .picker__button--close:focus {
background: #b1dcfb;
border-color: #0089ec;
outline: none; }
.picker__button--today:before, .picker__button--clear:before, .picker__button--close:before {
position: relative;
display: inline-block;
height: 0; }
.picker__button--today:before, .picker__button--clear:before {
content: " ";
margin-right: 0.45em; }
.picker__button--today:before {
top: -0.05em;
width: 0;
border-top: 0.66em solid #0059bc;
border-left: 0.66em solid transparent; }
.picker__button--clear:before {
top: -0.25em;
width: 0.66em;
border-top: 3px solid #ee2200; }
.picker__button--close:before {
content: "\D7";
top: -0.1em;
vertical-align: top;
font-size: 1.1em;
margin-right: 0.35em;
color: #777777; }
.picker__button--today[disabled], .picker__button--today[disabled]:hover {
background: #f5f5f5;
border-color: #f5f5f5;
color: #dddddd;
cursor: default; }
.picker__button--today[disabled]:before {
border-top-color: #aaaaaa; }
/* ==========================================================================
CUSTOM MATERIALIZE STYLES
========================================================================== */
.picker__box {
border-radius: 2px;
overflow: hidden; }
.picker__date-display {
text-align: center;
background-color: #26a69a;
color: #fff;
padding-bottom: 15px;
font-weight: 300; }
.picker__weekday-display {
background-color: #00897b;
padding: 10px;
font-weight: 200;
letter-spacing: 0.5;
font-size: 1rem;
margin-bottom: 15px; }
.picker__month-display {
text-transform: uppercase;
font-size: 2rem; }
.picker__day-display {
font-size: 4.5rem;
font-weight: 400; }
.picker__year-display {
font-size: 1.8rem;
color: #80cbc4; }
.picker__box {
padding: 0; }
.picker__calendar-container {
padding: 0 1rem; }
.picker__calendar-container thead {
border: none; }
.picker__table {
margin-top: 0;
margin-bottom: 0.5em; }
.picker__day--infocus {
color: #595959;
letter-spacing: -0.3;
padding: 0.75rem 0;
font-weight: 400;
border: 1px solid transparent; }
.picker--focused .picker__day--highlighted {
color: #26a69a; }
.picker__weekday {
font-size: 0.9rem; }
.picker--focused .picker__day--selected {
border-radius: 50%;
-webkit-transform: scale(0.9);
-moz-transform: scale(0.9);
-ms-transform: scale(0.9);
-o-transform: scale(0.9);
transform: scale(0.9);
background-color: #009688;
color: #ffffff; }
.picker--focused .picker__day--selected.picker__day--outfocus {
background-color: #b2dfdb; }
.picker__footer {
text-align: right;
padding: 5px 10px; }
.picker__close, .picker__today {
font-size: 1.1rem;
padding: 0 1rem;
color: #26a69a; }
.picker__nav--prev:before, .picker__nav--next:before {
content: " ";
border-top: 0.5em solid transparent;
border-bottom: 0.5em solid transparent;
border-right: 0.75em solid #676767;
width: 0;
height: 0;
display: block;
margin: 0 auto; }
.picker__nav--next:before {
border-right: 0;
border-left: 0.75em solid #676767; }
/* ==========================================================================
$BASE-TIME-PICKER
========================================================================== */
/**
* The list of times.
*/
.picker__list {
list-style: none;
padding: 0.75em 0 4.2em;
margin: 0; }
/**
* The times on the clock.
*/
.picker__list-item {
border-bottom: 1px solid #dddddd;
border-top: 1px solid #dddddd;
margin-bottom: -1px;
position: relative;
background: #ffffff;
padding: 0.75em 1.25em; }
@media (min-height: 46.75em) {
.picker__list-item {
padding: 0.5em 1em; }
}
/* Hovered time */
.picker__list-item:hover {
cursor: pointer;
color: #000000;
background: #b1dcfb;
border-color: #0089ec;
z-index: 10; }
/* Highlighted and hovered/focused time */
.picker__list-item--highlighted {
border-color: #0089ec;
z-index: 10; }
.picker__list-item--highlighted:hover, .picker--focused .picker__list-item--highlighted {
cursor: pointer;
color: #000000;
background: #b1dcfb; }
/* Selected and hovered/focused time */
.picker__list-item--selected, .picker__list-item--selected:hover, .picker--focused .picker__list-item--selected {
background: #0089ec;
color: #ffffff;
z-index: 10; }
/* Disabled time */
.picker__list-item--disabled, .picker__list-item--disabled:hover, .picker--focused .picker__list-item--disabled {
background: #f5f5f5;
border-color: #f5f5f5;
color: #dddddd;
cursor: default;
border-color: #dddddd;
z-index: auto; }
/**
* The clear button
*/
.picker--time .picker__button--clear {
display: block;
width: 80%;
margin: 1em auto 0;
padding: 1em 1.25em;
background: none;
border: 0;
font-weight: 500;
font-size: 0.67em;
text-align: center;
text-transform: uppercase;
color: #666; }
.picker--time .picker__button--clear:hover, .picker--time .picker__button--clear:focus {
color: #000000;
background: #b1dcfb;
background: #ee2200;
border-color: #ee2200;
cursor: pointer;
color: #ffffff;
outline: none; }
.picker--time .picker__button--clear:before {
top: -0.25em;
color: #666;
font-size: 1.25em;
font-weight: bold; }
.picker--time .picker__button--clear:hover:before, .picker--time .picker__button--clear:focus:before {
color: #ffffff; }
/* ==========================================================================
$DEFAULT-TIME-PICKER
========================================================================== */
/**
* The frame the bounds the time picker.
*/
.picker--time .picker__frame {
min-width: 256px;
max-width: 320px; }
/**
* The picker box.
*/
.picker--time .picker__box {
font-size: 1em;
background: #f2f2f2;
padding: 0; }
@media (min-height: 40.125em) {
.picker--time .picker__box {
margin-bottom: 5em; }
}
| Teino1978-Corp/Teino1978-Corp-cdnjs | ajax/libs/materialize/0.95.0/css/materialize.css | CSS | mit | 170,988 |
/**
* @license AngularJS v1.0.0rc9
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
'use strict';
/**
* @ngdoc overview
* @name angular.module.ngSanitize
* @description
*/
/*
* HTML Parser By Misko Hevery (misko@hevery.com)
* based on: HTML Parser By John Resig (ejohn.org)
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
*
* // Use like so:
* htmlParser(htmlString, {
* start: function(tag, attrs, unary) {},
* end: function(tag) {},
* chars: function(text) {},
* comment: function(text) {}
* });
*
*/
/**
* @ngdoc service
* @name angular.module.ngSanitize.$sanitize
* @function
*
* @description
* The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
* then serialized back to properly escaped html string. This means that no unsafe input can make
* it into the returned string, however, since our parser is more strict than a typical browser
* parser, it's possible that some obscure input, which would be recognized as valid HTML by a
* browser, won't make it through the sanitizer.
*
* @param {string} html Html input.
* @returns {string} Sanitized html.
*
* @example
<doc:example module="ngSanitize">
<doc:source>
<script>
function Ctrl($scope) {
$scope.snippet =
'<p style="color:blue">an html\n' +
'<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
'snippet</p>';
}
</script>
<div ng-controller="Ctrl">
Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
<table>
<tr>
<td>Filter</td>
<td>Source</td>
<td>Rendered</td>
</tr>
<tr id="html-filter">
<td>html filter</td>
<td>
<pre><div ng-bind-html="snippet"><br/></div></pre>
</td>
<td>
<div ng-bind-html="snippet"></div>
</td>
</tr>
<tr id="escaped-html">
<td>no filter</td>
<td><pre><div ng-bind="snippet"><br/></div></pre></td>
<td><div ng-bind="snippet"></div></td>
</tr>
<tr id="html-unsafe-filter">
<td>unsafe html filter</td>
<td><pre><div ng-bind-html-unsafe="snippet"><br/></div></pre></td>
<td><div ng-bind-html-unsafe="snippet"></div></td>
</tr>
</table>
</div>
</doc:source>
<doc:scenario>
it('should sanitize the html snippet ', function() {
expect(using('#html-filter').element('div').html()).
toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
});
it('should escape snippet without any filter', function() {
expect(using('#escaped-html').element('div').html()).
toBe("<p style=\"color:blue\">an html\n" +
"<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
"snippet</p>");
});
it('should inline raw snippet if filtered as unsafe', function() {
expect(using('#html-unsafe-filter').element("div").html()).
toBe("<p style=\"color:blue\">an html\n" +
"<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
"snippet</p>");
});
it('should update', function() {
input('snippet').enter('new <b>text</b>');
expect(using('#html-filter').binding('snippet')).toBe('new <b>text</b>');
expect(using('#escaped-html').element('div').html()).toBe("new <b>text</b>");
expect(using('#html-unsafe-filter').binding("snippet")).toBe('new <b>text</b>');
});
</doc:scenario>
</doc:example>
*/
var $sanitize = function(html) {
var buf = [];
htmlParser(html, htmlSanitizeWriter(buf));
return buf.join('');
};
// Regular Expressions for parsing tags and attributes
var START_TAG_REGEXP = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/,
ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
BEGIN_TAG_REGEXP = /^</,
BEGING_END_TAGE_REGEXP = /^<\s*\//,
COMMENT_REGEXP = /<!--(.*?)-->/g,
CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
URI_REGEXP = /^((ftp|https?):\/\/|mailto:|#)/,
NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; // Match everything outside of normal chars and " (quote character)
// Good source of info about elements and attributes
// http://dev.w3.org/html5/spec/Overview.html#semantics
// http://simon.html5.org/html-elements
// Safe Void Elements - HTML5
// http://dev.w3.org/html5/spec/Overview.html#void-elements
var voidElements = makeMap("area,br,col,hr,img,wbr");
// Elements that you can, intentionally, leave open (and which close themselves)
// http://dev.w3.org/html5/spec/Overview.html#optional-tags
var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
optionalEndTagInlineElements = makeMap("rp,rt"),
optionalEndTagElements = angular.extend({}, optionalEndTagInlineElements, optionalEndTagBlockElements);
// Safe Block Elements - HTML5
var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article,aside," +
"blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6," +
"header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));
// Inline Elements - HTML5
var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b,bdi,bdo," +
"big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small," +
"span,strike,strong,sub,sup,time,tt,u,var"));
// Special Elements (can contain anything)
var specialElements = makeMap("script,style");
var validElements = angular.extend({}, voidElements, blockElements, inlineElements, optionalEndTagElements);
//Attributes that have href and hence need to be sanitized
var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap");
var validAttrs = angular.extend({}, uriAttrs, makeMap(
'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+
'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+
'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+
'scope,scrolling,shape,span,start,summary,target,title,type,'+
'valign,value,vspace,width'));
function makeMap(str) {
var obj = {}, items = str.split(','), i;
for (i = 0; i < items.length; i++) obj[items[i]] = true;
return obj;
}
/**
* @example
* htmlParser(htmlString, {
* start: function(tag, attrs, unary) {},
* end: function(tag) {},
* chars: function(text) {},
* comment: function(text) {}
* });
*
* @param {string} html string
* @param {object} handler
*/
function htmlParser( html, handler ) {
var index, chars, match, stack = [], last = html;
stack.last = function() { return stack[ stack.length - 1 ]; };
while ( html ) {
chars = true;
// Make sure we're not in a script or style element
if ( !stack.last() || !specialElements[ stack.last() ] ) {
// Comment
if ( html.indexOf("<!--") === 0 ) {
index = html.indexOf("-->");
if ( index >= 0 ) {
if (handler.comment) handler.comment( html.substring( 4, index ) );
html = html.substring( index + 3 );
chars = false;
}
// end tag
} else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
match = html.match( END_TAG_REGEXP );
if ( match ) {
html = html.substring( match[0].length );
match[0].replace( END_TAG_REGEXP, parseEndTag );
chars = false;
}
// start tag
} else if ( BEGIN_TAG_REGEXP.test(html) ) {
match = html.match( START_TAG_REGEXP );
if ( match ) {
html = html.substring( match[0].length );
match[0].replace( START_TAG_REGEXP, parseStartTag );
chars = false;
}
}
if ( chars ) {
index = html.indexOf("<");
var text = index < 0 ? html : html.substring( 0, index );
html = index < 0 ? "" : html.substring( index );
if (handler.chars) handler.chars( decodeEntities(text) );
}
} else {
html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), function(all, text){
text = text.
replace(COMMENT_REGEXP, "$1").
replace(CDATA_REGEXP, "$1");
if (handler.chars) handler.chars( decodeEntities(text) );
return "";
});
parseEndTag( "", stack.last() );
}
if ( html == last ) {
throw "Parse Error: " + html;
}
last = html;
}
// Clean up any remaining tags
parseEndTag();
function parseStartTag( tag, tagName, rest, unary ) {
tagName = angular.lowercase(tagName);
if ( blockElements[ tagName ] ) {
while ( stack.last() && inlineElements[ stack.last() ] ) {
parseEndTag( "", stack.last() );
}
}
if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {
parseEndTag( "", tagName );
}
unary = voidElements[ tagName ] || !!unary;
if ( !unary )
stack.push( tagName );
var attrs = {};
rest.replace(ATTR_REGEXP, function(match, name, doubleQuotedValue, singleQoutedValue, unqoutedValue) {
var value = doubleQuotedValue
|| singleQoutedValue
|| unqoutedValue
|| '';
attrs[name] = decodeEntities(value);
});
if (handler.start) handler.start( tagName, attrs, unary );
}
function parseEndTag( tag, tagName ) {
var pos = 0, i;
tagName = angular.lowercase(tagName);
if ( tagName )
// Find the closest opened tag of the same type
for ( pos = stack.length - 1; pos >= 0; pos-- )
if ( stack[ pos ] == tagName )
break;
if ( pos >= 0 ) {
// Close all the open elements, up the stack
for ( i = stack.length - 1; i >= pos; i-- )
if (handler.end) handler.end( stack[ i ] );
// Remove the open elements from the stack
stack.length = pos;
}
}
}
/**
* decodes all entities into regular string
* @param value
* @returns {string} A string with decoded entities.
*/
var hiddenPre=document.createElement("pre");
function decodeEntities(value) {
hiddenPre.innerHTML=value.replace(/</g,"<");
return hiddenPre.innerText || hiddenPre.textContent || '';
}
/**
* Escapes all potentially dangerous characters, so that the
* resulting string can be safely inserted into attribute or
* element text.
* @param value
* @returns escaped text
*/
function encodeEntities(value) {
return value.
replace(/&/g, '&').
replace(NON_ALPHANUMERIC_REGEXP, function(value){
return '&#' + value.charCodeAt(0) + ';';
}).
replace(/</g, '<').
replace(/>/g, '>');
}
/**
* create an HTML/XML writer which writes to buffer
* @param {Array} buf use buf.jain('') to get out sanitized html string
* @returns {object} in the form of {
* start: function(tag, attrs, unary) {},
* end: function(tag) {},
* chars: function(text) {},
* comment: function(text) {}
* }
*/
function htmlSanitizeWriter(buf){
var ignore = false;
var out = angular.bind(buf, buf.push);
return {
start: function(tag, attrs, unary){
tag = angular.lowercase(tag);
if (!ignore && specialElements[tag]) {
ignore = tag;
}
if (!ignore && validElements[tag] == true) {
out('<');
out(tag);
angular.forEach(attrs, function(value, key){
var lkey=angular.lowercase(key);
if (validAttrs[lkey]==true && (uriAttrs[lkey]!==true || value.match(URI_REGEXP))) {
out(' ');
out(key);
out('="');
out(encodeEntities(value));
out('"');
}
});
out(unary ? '/>' : '>');
}
},
end: function(tag){
tag = angular.lowercase(tag);
if (!ignore && validElements[tag] == true) {
out('</');
out(tag);
out('>');
}
if (tag == ignore) {
ignore = false;
}
},
chars: function(chars){
if (!ignore) {
out(encodeEntities(chars));
}
}
};
}
// define ngSanitize module and register $sanitize service
angular.module('ngSanitize', []).value('$sanitize', $sanitize);
/**
* @ngdoc directive
* @name angular.module.ngSanitize.directive.ngBindHtml
*
* @description
* Creates a binding that will sanitize the result of evaluating the `expression` with the
* {@link angular.module.ngSanitize.$sanitize $sanitize} service and innerHTML the result into the current element.
*
* See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples.
*
* @element ANY
* @param {expression} ngBindHtml {@link guide/dev_guide.expressions Expression} to evaluate.
*/
angular.module('ngSanitize').directive('ngBindHtml', ['$sanitize', function($sanitize) {
return function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBindHtml);
scope.$watch(attr.ngBindHtml, function(value) {
value = $sanitize(value);
element.html(value || '');
});
};
}]);
/**
* @ngdoc filter
* @name angular.module.ngSanitize.filter.linky
* @function
*
* @description
* Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
* plain email address links.
*
* @param {string} text Input text.
* @returns {string} Html-linkified text.
*
* @example
<doc:example module="ngSanitize">
<doc:source>
<script>
function Ctrl($scope) {
$scope.snippet =
'Pretty text with some links:\n'+
'http://angularjs.org/,\n'+
'mailto:us@somewhere.org,\n'+
'another@somewhere.org,\n'+
'and one more: ftp://127.0.0.1/.';
}
</script>
<div ng-controller="Ctrl">
Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
<table>
<tr>
<td>Filter</td>
<td>Source</td>
<td>Rendered</td>
</tr>
<tr id="linky-filter">
<td>linky filter</td>
<td>
<pre><div ng-bind-html="snippet | linky"><br></div></pre>
</td>
<td>
<div ng-bind-html="snippet | linky"></div>
</td>
</tr>
<tr id="escaped-html">
<td>no filter</td>
<td><pre><div ng-bind="snippet"><br></div></pre></td>
<td><div ng-bind="snippet"></div></td>
</tr>
</table>
</doc:source>
<doc:scenario>
it('should linkify the snippet with urls', function() {
expect(using('#linky-filter').binding('snippet | linky')).
toBe('Pretty text with some links: ' +
'<a href="http://angularjs.org/">http://angularjs.org/</a>, ' +
'<a href="mailto:us@somewhere.org">us@somewhere.org</a>, ' +
'<a href="mailto:another@somewhere.org">another@somewhere.org</a>, ' +
'and one more: <a href="ftp://127.0.0.1/">ftp://127.0.0.1/</a>.');
});
it ('should not linkify snippet without the linky filter', function() {
expect(using('#escaped-html').binding('snippet')).
toBe("Pretty text with some links:\n" +
"http://angularjs.org/,\n" +
"mailto:us@somewhere.org,\n" +
"another@somewhere.org,\n" +
"and one more: ftp://127.0.0.1/.");
});
it('should update', function() {
input('snippet').enter('new http://link.');
expect(using('#linky-filter').binding('snippet | linky')).
toBe('new <a href="http://link">http://link</a>.');
expect(using('#escaped-html').binding('snippet')).toBe('new http://link.');
});
</doc:scenario>
</doc:example>
*/
angular.module('ngSanitize').filter('linky', function() {
var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,
MAILTO_REGEXP = /^mailto:/;
return function(text) {
if (!text) return text;
var match;
var raw = text;
var html = [];
// TODO(vojta): use $sanitize instead
var writer = htmlSanitizeWriter(html);
var url;
var i;
while ((match = raw.match(LINKY_URL_REGEXP))) {
// We can not end in these as they are sometimes found at the end of the sentence
url = match[0];
// if we did not match ftp/http/mailto then assume mailto
if (match[2] == match[3]) url = 'mailto:' + url;
i = match.index;
writer.chars(raw.substr(0, i));
writer.start('a', {href:url});
writer.chars(match[0].replace(MAILTO_REGEXP, ''));
writer.end('a');
raw = raw.substring(i + match[0].length);
}
writer.chars(raw);
return html.join('');
};
});
})(window, window.angular);
| LaurensRietveld/cdnjs | ajax/libs/angular.js/1.0.0rc9/angular-sanitize.js | JavaScript | mit | 17,454 |
.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:3px}.mce-arrow-down{margin-top:-3px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:20px}.mce-arrow.mce-arrow-left:after{left:21px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:20px}.mce-arrow.mce-arrow-right:after{right:21px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1;transform:scale(1)}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary{min-width:50px;color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-alignnone{-ie7-icon:"\e003"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-rotateleft{-ie7-icon:"\eaa8"}.mce-i-rotateright{-ie7-icon:"\eaa9"}.mce-i-crop{-ie7-icon:"\ee78"}.mce-i-editimage{-ie7-icon:"\e914"}.mce-i-options{-ie7-icon:"\ec6a"}.mce-i-flipv{-ie7-icon:"\eaaa"}.mce-i-fliph{-ie7-icon:"\eaac"}.mce-i-zoomin{-ie7-icon:"\eb35"}.mce-i-zoomout{-ie7-icon:"\eb36"}.mce-i-sun{-ie7-icon:"\eccc"}.mce-i-moon{-ie7-icon:"\eccd"}.mce-i-arrowleft{-ie7-icon:"\edc0"}.mce-i-arrowright{-ie7-icon:"\edb8"}.mce-i-drop{-ie7-icon:"\e934"}.mce-i-contrast{-ie7-icon:"\ecd4"}.mce-i-sharpen{-ie7-icon:"\eba7"}.mce-i-palette{-ie7-icon:"\e92a"}.mce-i-resize2{-ie7-icon:"\edf9"}.mce-i-orientation{-ie7-icon:"\e601"}.mce-i-invert{-ie7-icon:"\e602"}.mce-i-gamma{-ie7-icon:"\e600"}.mce-i-remove{-ie7-icon:"\ed6a"}.mce-i-codesample{-ie7-icon:"\e603"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#bbb} | brix/cdnjs | ajax/libs/tinymce/4.3.10/skins/lightgray/skin.ie7.min.css | CSS | mit | 32,462 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Locale\Tests;
use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\Util\IntlTestHelper;
use Symfony\Component\Locale\Locale;
/**
* Test case for the {@link Locale} class.
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class LocaleTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
// Locale extends \Locale, so intl must be present
IntlTestHelper::requireIntl($this);
}
public function testGetDisplayCountries()
{
$countries = Locale::getDisplayCountries('en');
$this->assertEquals('Brazil', $countries['BR']);
}
public function testGetCountries()
{
$countries = Locale::getCountries();
$this->assertTrue(in_array('BR', $countries));
}
public function testGetDisplayLanguages()
{
$languages = Locale::getDisplayLanguages('en');
$this->assertEquals('Brazilian Portuguese', $languages['pt_BR']);
}
public function testGetLanguages()
{
$languages = Locale::getLanguages();
$this->assertTrue(in_array('pt_BR', $languages));
}
public function testGetDisplayLocales()
{
$locales = Locale::getDisplayLocales('en');
$this->assertEquals('Portuguese', $locales['pt']);
}
public function testGetLocales()
{
$locales = Locale::getLocales();
$this->assertTrue(in_array('pt', $locales));
}
}
| Jamkyle/raha.zeuweb | vendor/symfony/symfony/src/Symfony/Component/Locale/Tests/LocaleTest.php | PHP | mit | 1,688 |
tinyMCE.addI18n('my.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); | RobLoach/cdnjs | ajax/libs/tinymce/3.5.8/plugins/advlink/langs/my_dlg.js | JavaScript | mit | 1,667 |
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Unit test for Google Test's --gtest_list_tests flag.
A user can ask Google Test to list all tests by specifying the
--gtest_list_tests flag. This script tests such functionality
by invoking gtest_list_tests_unittest_ (a program written with
Google Test) the command line flags.
"""
__author__ = 'phanna@google.com (Patrick Hanna)'
import gtest_test_utils
import re
# Constants.
# The command line flag for enabling/disabling listing all tests.
LIST_TESTS_FLAG = 'gtest_list_tests'
# Path to the gtest_list_tests_unittest_ program.
EXE_PATH = gtest_test_utils.GetTestExecutablePath('gtest_list_tests_unittest_')
# The expected output when running gtest_list_tests_unittest_ with
# --gtest_list_tests
EXPECTED_OUTPUT_NO_FILTER_RE = re.compile(r"""FooDeathTest\.
Test1
Foo\.
Bar1
Bar2
DISABLED_Bar3
Abc\.
Xyz
Def
FooBar\.
Baz
FooTest\.
Test1
DISABLED_Test2
Test3
TypedTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\.
TestA
TestB
TypedTest/1\. # TypeParam = int\s*\*
TestA
TestB
TypedTest/2\. # TypeParam = .*MyArray<bool,\s*42>
TestA
TestB
My/TypeParamTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\.
TestA
TestB
My/TypeParamTest/1\. # TypeParam = int\s*\*
TestA
TestB
My/TypeParamTest/2\. # TypeParam = .*MyArray<bool,\s*42>
TestA
TestB
MyInstantiation/ValueParamTest\.
TestA/0 # GetParam\(\) = one line
TestA/1 # GetParam\(\) = two\\nlines
TestA/2 # GetParam\(\) = a very\\nlo{241}\.\.\.
TestB/0 # GetParam\(\) = one line
TestB/1 # GetParam\(\) = two\\nlines
TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\.
""")
# The expected output when running gtest_list_tests_unittest_ with
# --gtest_list_tests and --gtest_filter=Foo*.
EXPECTED_OUTPUT_FILTER_FOO_RE = re.compile(r"""FooDeathTest\.
Test1
Foo\.
Bar1
Bar2
DISABLED_Bar3
FooBar\.
Baz
FooTest\.
Test1
DISABLED_Test2
Test3
""")
# Utilities.
def Run(args):
"""Runs gtest_list_tests_unittest_ and returns the list of tests printed."""
return gtest_test_utils.Subprocess([EXE_PATH] + args,
capture_stderr=False).output
# The unit test.
class GTestListTestsUnitTest(gtest_test_utils.TestCase):
"""Tests using the --gtest_list_tests flag to list all tests."""
def RunAndVerify(self, flag_value, expected_output_re, other_flag):
"""Runs gtest_list_tests_unittest_ and verifies that it prints
the correct tests.
Args:
flag_value: value of the --gtest_list_tests flag;
None if the flag should not be present.
expected_output_re: regular expression that matches the expected
output after running command;
other_flag: a different flag to be passed to command
along with gtest_list_tests;
None if the flag should not be present.
"""
if flag_value is None:
flag = ''
flag_expression = 'not set'
elif flag_value == '0':
flag = '--%s=0' % LIST_TESTS_FLAG
flag_expression = '0'
else:
flag = '--%s' % LIST_TESTS_FLAG
flag_expression = '1'
args = [flag]
if other_flag is not None:
args += [other_flag]
output = Run(args)
if expected_output_re:
self.assert_(
expected_output_re.match(output),
('when %s is %s, the output of "%s" is "%s",\n'
'which does not match regex "%s"' %
(LIST_TESTS_FLAG, flag_expression, ' '.join(args), output,
expected_output_re.pattern)))
else:
self.assert_(
not EXPECTED_OUTPUT_NO_FILTER_RE.match(output),
('when %s is %s, the output of "%s" is "%s"'%
(LIST_TESTS_FLAG, flag_expression, ' '.join(args), output)))
def testDefaultBehavior(self):
"""Tests the behavior of the default mode."""
self.RunAndVerify(flag_value=None,
expected_output_re=None,
other_flag=None)
def testFlag(self):
"""Tests using the --gtest_list_tests flag."""
self.RunAndVerify(flag_value='0',
expected_output_re=None,
other_flag=None)
self.RunAndVerify(flag_value='1',
expected_output_re=EXPECTED_OUTPUT_NO_FILTER_RE,
other_flag=None)
def testOverrideNonFilterFlags(self):
"""Tests that --gtest_list_tests overrides the non-filter flags."""
self.RunAndVerify(flag_value='1',
expected_output_re=EXPECTED_OUTPUT_NO_FILTER_RE,
other_flag='--gtest_break_on_failure')
def testWithFilterFlags(self):
"""Tests that --gtest_list_tests takes into account the
--gtest_filter flag."""
self.RunAndVerify(flag_value='1',
expected_output_re=EXPECTED_OUTPUT_FILTER_FOO_RE,
other_flag='--gtest_filter=Foo*')
if __name__ == '__main__':
gtest_test_utils.Main()
| gcielniak/yaml-cpp | test/gmock-1.7.0/gtest/test/gtest_list_tests_unittest.py | Python | mit | 6,515 |
angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,macFrac:0,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3,maxFrac:3},{minInt:1,minFrac:2,macFrac:0,posPre:"\u00A4",posSuf:"",negPre:"\u00A4-",negSuf:"",gSize:3,lgSize:3,maxFrac:2}],CURRENCY_SYM:"¥"},pluralCat:function(c){return b.OTHER},DATETIME_FORMATS:{MONTH:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],SHORTMONTH:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],DAY:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],SHORTDAY:["周日","周一","周二","周三","周四","周五","周六"],AMPMS:["上午","下午"],medium:"yyyy-M-d ah:mm:ss","short":"yy-M-d ah:mm",fullDate:"y年M月d日EEEE",longDate:"y年M月d日",mediumDate:"yyyy-M-d",shortDate:"yy-M-d",mediumTime:"ah:mm:ss",shortTime:"ah:mm"},id:"zh-hans"})}]); | boneskull/cdnjs | ajax/libs/angular-i18n/1.0.0rc6/angular-locale_zh-hans.min.js | JavaScript | mit | 1,077 |
angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{MONTH:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],SHORTMONTH:["Xan","Feb","Mar","Abr","Mai","Xuñ","Xul","Ago","Set","Out","Nov","Dec"],DAY:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"],SHORTDAY:["Dom","Lun","Mar","Mér","Xov","Ven","Sáb"],AMPMS:["AM","PM"],medium:"d MMM, y HH:mm:ss","short":"dd/MM/yy HH:mm",fullDate:"EEEE dd MMMM y",longDate:"dd MMMM y",mediumDate:"d MMM, y",shortDate:"dd/MM/yy",mediumTime:"HH:mm:ss",shortTime:"HH:mm"},NUMBER_FORMATS:{DECIMAL_SEP:",",GROUP_SEP:".",PATTERNS:[{minInt:1,minFrac:0,macFrac:0,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3,maxFrac:3},{minInt:1,minFrac:2,macFrac:0,posPre:"",posSuf:" \u00A4",negPre:"-",negSuf:" \u00A4",gSize:3,lgSize:3,maxFrac:2}],CURRENCY_SYM:"€"},pluralCat:function(c){if(c==1){return b.ONE}return b.OTHER},id:"gl"})}]); | sashberd/cdnjs | ajax/libs/angular-i18n/1.0.0rc7/angular-locale_gl.min.js | JavaScript | mit | 1,063 |
angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{MONTH:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],SHORTMONTH:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],DAY:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],SHORTDAY:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],AMPMS:["AM","PM"],medium:"dd MMM y HH:mm:ss","short":"dd MM yyyy HH:mm",fullDate:"dd MMMM y EEEE",longDate:"dd MMMM y",mediumDate:"dd MMM y",shortDate:"dd MM yyyy",mediumTime:"HH:mm:ss",shortTime:"HH:mm"},NUMBER_FORMATS:{DECIMAL_SEP:",",GROUP_SEP:".",PATTERNS:[{minInt:1,minFrac:0,macFrac:0,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3,maxFrac:3},{minInt:1,minFrac:2,macFrac:0,posPre:"",posSuf:" \u00A4",negPre:"-",negSuf:" \u00A4",gSize:3,lgSize:3,maxFrac:2}],CURRENCY_SYM:"YTL"},pluralCat:function(c){return b.OTHER},id:"tr"})}]); | maruilian11/cdnjs | ajax/libs/angular-i18n/1.0.0rc8/angular-locale_tr.min.js | JavaScript | mit | 1,045 |
define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-solarized-light",t.cssText=".ace-solarized-light .ace_gutter {background: #fbf1d3;color: #333}.ace-solarized-light .ace_print-margin {width: 1px;background: #e8e8e8}.ace-solarized-light {background-color: #FDF6E3;color: #586E75}.ace-solarized-light .ace_cursor {color: #000000}.ace-solarized-light .ace_marker-layer .ace_selection {background: rgba(7, 54, 67, 0.09)}.ace-solarized-light.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FDF6E3;border-radius: 2px}.ace-solarized-light .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-solarized-light .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_marker-layer .ace_active-line {background: #EEE8D5}.ace-solarized-light .ace_gutter-active-line {background-color : #EDE5C1}.ace-solarized-light .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-light .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_keyword,.ace-solarized-light .ace_meta,.ace-solarized-light .ace_support.ace_class,.ace-solarized-light .ace_support.ace_type {color: #859900}.ace-solarized-light .ace_constant.ace_character,.ace-solarized-light .ace_constant.ace_other {color: #CB4B16}.ace-solarized-light .ace_constant.ace_language {color: #B58900}.ace-solarized-light .ace_constant.ace_numeric {color: #D33682}.ace-solarized-light .ace_fold {background-color: #268BD2;border-color: #586E75}.ace-solarized-light .ace_entity.ace_name.ace_function,.ace-solarized-light .ace_entity.ace_name.ace_tag,.ace-solarized-light .ace_support.ace_function,.ace-solarized-light .ace_variable,.ace-solarized-light .ace_variable.ace_language {color: #268BD2}.ace-solarized-light .ace_storage {color: #073642}.ace-solarized-light .ace_string {color: #2AA198}.ace-solarized-light .ace_string.ace_regexp {color: #D30102}.ace-solarized-light .ace_comment,.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {color: #93A1A1}.ace-solarized-light .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) | asimihsan/jsdelivr | files/ace/1.1.8/min/theme-solarized_light.js | JavaScript | mit | 2,374 |
define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-pastel-on-dark",t.cssText=".ace-pastel-on-dark .ace_gutter {background: #353030;color: #8F938F}.ace-pastel-on-dark .ace_print-margin {width: 1px;background: #353030}.ace-pastel-on-dark {background-color: #2C2828;color: #8F938F}.ace-pastel-on-dark .ace_cursor {color: #A7A7A7}.ace-pastel-on-dark .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #2C2828;border-radius: 2px}.ace-pastel-on-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-pastel-on-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_keyword,.ace-pastel-on-dark .ace_meta {color: #757aD8}.ace-pastel-on-dark .ace_constant,.ace-pastel-on-dark .ace_constant.ace_character,.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,.ace-pastel-on-dark .ace_constant.ace_other {color: #4FB7C5}.ace-pastel-on-dark .ace_keyword.ace_operator {color: #797878}.ace-pastel-on-dark .ace_constant.ace_character {color: #AFA472}.ace-pastel-on-dark .ace_constant.ace_language {color: #DE8E30}.ace-pastel-on-dark .ace_constant.ace_numeric {color: #CCCCCC}.ace-pastel-on-dark .ace_invalid,.ace-pastel-on-dark .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-pastel-on-dark .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-pastel-on-dark .ace_fold {background-color: #757aD8;border-color: #8F938F}.ace-pastel-on-dark .ace_support.ace_function {color: #AEB2F8}.ace-pastel-on-dark .ace_string {color: #66A968}.ace-pastel-on-dark .ace_string.ace_regexp {color: #E9C062}.ace-pastel-on-dark .ace_comment {color: #A6C6FF}.ace-pastel-on-dark .ace_variable {color: #BEBF55}.ace-pastel-on-dark .ace_variable.ace_language {color: #C1C144}.ace-pastel-on-dark .ace_xml-pe {color: #494949}.ace-pastel-on-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) | aashish24/cdnjs | ajax/libs/ace/1.1.4/theme-pastel_on_dark.js | JavaScript | mit | 2,647 |
define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=".ace-solarized-dark .ace_gutter {background: #01313f;color: #d0edf7}.ace-solarized-dark .ace_print-margin {width: 1px;background: #33555E}.ace-solarized-dark {background-color: #002B36;color: #93A1A1}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,.ace-solarized-dark .ace_storage {color: #93A1A1}.ace-solarized-dark .ace_cursor,.ace-solarized-dark .ace_string.ace_regexp {color: #D30102}.ace-solarized-dark .ace_marker-layer .ace_active-line,.ace-solarized-dark .ace_marker-layer .ace_selection {background: rgba(255, 255, 255, 0.1)}.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002B36;border-radius: 2px}.ace-solarized-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-solarized-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_gutter-active-line {background-color: #0d3440}.ace-solarized-dark .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-dark .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_keyword,.ace-solarized-dark .ace_meta,.ace-solarized-dark .ace_support.ace_class,.ace-solarized-dark .ace_support.ace_type {color: #859900}.ace-solarized-dark .ace_constant.ace_character,.ace-solarized-dark .ace_constant.ace_other {color: #CB4B16}.ace-solarized-dark .ace_constant.ace_language {color: #B58900}.ace-solarized-dark .ace_constant.ace_numeric {color: #D33682}.ace-solarized-dark .ace_fold {background-color: #268BD2;border-color: #93A1A1}.ace-solarized-dark .ace_entity.ace_name.ace_function,.ace-solarized-dark .ace_entity.ace_name.ace_tag,.ace-solarized-dark .ace_support.ace_function,.ace-solarized-dark .ace_variable,.ace-solarized-dark .ace_variable.ace_language {color: #268BD2}.ace-solarized-dark .ace_string {color: #2AA198}.ace-solarized-dark .ace_comment {font-style: italic;color: #657B83}.ace-solarized-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) | jessepollak/cdnjs | ajax/libs/ace/1.1.4/theme-solarized_dark.js | JavaScript | mit | 2,326 |
(function(){
// Copyright (c) 2005 Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.
// Basic JavaScript BN library - subset useful for RSA encryption.
// Bits per digit
var dbits;
// JavaScript engine analysis
var canary = 0xdeadbeefcafe;
var j_lm = ((canary&0xffffff)==0xefcafe);
// (public) Constructor
function BigInteger(a,b,c) {
if(a != null)
if("number" == typeof a) this.fromNumber(a,b,c);
else if(b == null && "string" != typeof a) this.fromString(a,256);
else this.fromString(a,b);
}
// return new, unset BigInteger
function nbi() { return new BigInteger(null); }
// am: Compute w_j += (x*this_i), propagate carries,
// c is initial carry, returns final carry.
// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
// We need to select the fastest one that works in this environment.
// am1: use a single mult and divide to get the high bits,
// max digit bits should be 26 because
// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
function am1(i,x,w,j,c,n) {
while(--n >= 0) {
var v = x*this[i++]+w[j]+c;
c = Math.floor(v/0x4000000);
w[j++] = v&0x3ffffff;
}
return c;
}
// am2 avoids a big mult-and-extract completely.
// Max digit bits should be <= 30 because we do bitwise ops
// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
function am2(i,x,w,j,c,n) {
var xl = x&0x7fff, xh = x>>15;
while(--n >= 0) {
var l = this[i]&0x7fff;
var h = this[i++]>>15;
var m = xh*l+h*xl;
l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);
c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
w[j++] = l&0x3fffffff;
}
return c;
}
// Alternately, set max digit bits to 28 since some
// browsers slow down when dealing with 32-bit numbers.
function am3(i,x,w,j,c,n) {
var xl = x&0x3fff, xh = x>>14;
while(--n >= 0) {
var l = this[i]&0x3fff;
var h = this[i++]>>14;
var m = xh*l+h*xl;
l = xl*l+((m&0x3fff)<<14)+w[j]+c;
c = (l>>28)+(m>>14)+xh*h;
w[j++] = l&0xfffffff;
}
return c;
}
var inBrowser = typeof navigator !== "undefined";
if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
BigInteger.prototype.am = am2;
dbits = 30;
}
else if(inBrowser && j_lm && (navigator.appName != "Netscape")) {
BigInteger.prototype.am = am1;
dbits = 26;
}
else { // Mozilla/Netscape seems to prefer am3
BigInteger.prototype.am = am3;
dbits = 28;
}
BigInteger.prototype.DB = dbits;
BigInteger.prototype.DM = ((1<<dbits)-1);
BigInteger.prototype.DV = (1<<dbits);
var BI_FP = 52;
BigInteger.prototype.FV = Math.pow(2,BI_FP);
BigInteger.prototype.F1 = BI_FP-dbits;
BigInteger.prototype.F2 = 2*dbits-BI_FP;
// Digit conversions
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
var BI_RC = new Array();
var rr,vv;
rr = "0".charCodeAt(0);
for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
rr = "a".charCodeAt(0);
for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
rr = "A".charCodeAt(0);
for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
function int2char(n) { return BI_RM.charAt(n); }
function intAt(s,i) {
var c = BI_RC[s.charCodeAt(i)];
return (c==null)?-1:c;
}
// (protected) copy this to r
function bnpCopyTo(r) {
for(var i = this.t-1; i >= 0; --i) r[i] = this[i];
r.t = this.t;
r.s = this.s;
}
// (protected) set from integer value x, -DV <= x < DV
function bnpFromInt(x) {
this.t = 1;
this.s = (x<0)?-1:0;
if(x > 0) this[0] = x;
else if(x < -1) this[0] = x+this.DV;
else this.t = 0;
}
// return bigint initialized to value
function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
// (protected) set from string and radix
function bnpFromString(s,b) {
var k;
if(b == 16) k = 4;
else if(b == 8) k = 3;
else if(b == 256) k = 8; // byte array
else if(b == 2) k = 1;
else if(b == 32) k = 5;
else if(b == 4) k = 2;
else { this.fromRadix(s,b); return; }
this.t = 0;
this.s = 0;
var i = s.length, mi = false, sh = 0;
while(--i >= 0) {
var x = (k==8)?s[i]&0xff:intAt(s,i);
if(x < 0) {
if(s.charAt(i) == "-") mi = true;
continue;
}
mi = false;
if(sh == 0)
this[this.t++] = x;
else if(sh+k > this.DB) {
this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<<sh;
this[this.t++] = (x>>(this.DB-sh));
}
else
this[this.t-1] |= x<<sh;
sh += k;
if(sh >= this.DB) sh -= this.DB;
}
if(k == 8 && (s[0]&0x80) != 0) {
this.s = -1;
if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<<sh;
}
this.clamp();
if(mi) BigInteger.ZERO.subTo(this,this);
}
// (protected) clamp off excess high words
function bnpClamp() {
var c = this.s&this.DM;
while(this.t > 0 && this[this.t-1] == c) --this.t;
}
// (public) return string representation in given radix
function bnToString(b) {
if(this.s < 0) return "-"+this.negate().toString(b);
var k;
if(b == 16) k = 4;
else if(b == 8) k = 3;
else if(b == 2) k = 1;
else if(b == 32) k = 5;
else if(b == 4) k = 2;
else return this.toRadix(b);
var km = (1<<k)-1, d, m = false, r = "", i = this.t;
var p = this.DB-(i*this.DB)%k;
if(i-- > 0) {
if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }
while(i >= 0) {
if(p < k) {
d = (this[i]&((1<<p)-1))<<(k-p);
d |= this[--i]>>(p+=this.DB-k);
}
else {
d = (this[i]>>(p-=k))&km;
if(p <= 0) { p += this.DB; --i; }
}
if(d > 0) m = true;
if(m) r += int2char(d);
}
}
return m?r:"0";
}
// (public) -this
function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
// (public) |this|
function bnAbs() { return (this.s<0)?this.negate():this; }
// (public) return + if this > a, - if this < a, 0 if equal
function bnCompareTo(a) {
var r = this.s-a.s;
if(r != 0) return r;
var i = this.t;
r = i-a.t;
if(r != 0) return (this.s<0)?-r:r;
while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
return 0;
}
// returns bit length of the integer x
function nbits(x) {
var r = 1, t;
if((t=x>>>16) != 0) { x = t; r += 16; }
if((t=x>>8) != 0) { x = t; r += 8; }
if((t=x>>4) != 0) { x = t; r += 4; }
if((t=x>>2) != 0) { x = t; r += 2; }
if((t=x>>1) != 0) { x = t; r += 1; }
return r;
}
// (public) return the number of bits in "this"
function bnBitLength() {
if(this.t <= 0) return 0;
return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
}
// (protected) r = this << n*DB
function bnpDLShiftTo(n,r) {
var i;
for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
for(i = n-1; i >= 0; --i) r[i] = 0;
r.t = this.t+n;
r.s = this.s;
}
// (protected) r = this >> n*DB
function bnpDRShiftTo(n,r) {
for(var i = n; i < this.t; ++i) r[i-n] = this[i];
r.t = Math.max(this.t-n,0);
r.s = this.s;
}
// (protected) r = this << n
function bnpLShiftTo(n,r) {
var bs = n%this.DB;
var cbs = this.DB-bs;
var bm = (1<<cbs)-1;
var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;
for(i = this.t-1; i >= 0; --i) {
r[i+ds+1] = (this[i]>>cbs)|c;
c = (this[i]&bm)<<bs;
}
for(i = ds-1; i >= 0; --i) r[i] = 0;
r[ds] = c;
r.t = this.t+ds+1;
r.s = this.s;
r.clamp();
}
// (protected) r = this >> n
function bnpRShiftTo(n,r) {
r.s = this.s;
var ds = Math.floor(n/this.DB);
if(ds >= this.t) { r.t = 0; return; }
var bs = n%this.DB;
var cbs = this.DB-bs;
var bm = (1<<bs)-1;
r[0] = this[ds]>>bs;
for(var i = ds+1; i < this.t; ++i) {
r[i-ds-1] |= (this[i]&bm)<<cbs;
r[i-ds] = this[i]>>bs;
}
if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;
r.t = this.t-ds;
r.clamp();
}
// (protected) r = this - a
function bnpSubTo(a,r) {
var i = 0, c = 0, m = Math.min(a.t,this.t);
while(i < m) {
c += this[i]-a[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
if(a.t < this.t) {
c -= a.s;
while(i < this.t) {
c += this[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
c += this.s;
}
else {
c += this.s;
while(i < a.t) {
c -= a[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
c -= a.s;
}
r.s = (c<0)?-1:0;
if(c < -1) r[i++] = this.DV+c;
else if(c > 0) r[i++] = c;
r.t = i;
r.clamp();
}
// (protected) r = this * a, r != this,a (HAC 14.12)
// "this" should be the larger one if appropriate.
function bnpMultiplyTo(a,r) {
var x = this.abs(), y = a.abs();
var i = x.t;
r.t = i+y.t;
while(--i >= 0) r[i] = 0;
for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
r.s = 0;
r.clamp();
if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
}
// (protected) r = this^2, r != this (HAC 14.16)
function bnpSquareTo(r) {
var x = this.abs();
var i = r.t = 2*x.t;
while(--i >= 0) r[i] = 0;
for(i = 0; i < x.t-1; ++i) {
var c = x.am(i,x[i],r,2*i,0,1);
if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
r[i+x.t] -= x.DV;
r[i+x.t+1] = 1;
}
}
if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);
r.s = 0;
r.clamp();
}
// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
// r != q, this != m. q or r may be null.
function bnpDivRemTo(m,q,r) {
var pm = m.abs();
if(pm.t <= 0) return;
var pt = this.abs();
if(pt.t < pm.t) {
if(q != null) q.fromInt(0);
if(r != null) this.copyTo(r);
return;
}
if(r == null) r = nbi();
var y = nbi(), ts = this.s, ms = m.s;
var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus
if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
else { pm.copyTo(y); pt.copyTo(r); }
var ys = y.t;
var y0 = y[ys-1];
if(y0 == 0) return;
var yt = y0*(1<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);
var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;
var i = r.t, j = i-ys, t = (q==null)?nbi():q;
y.dlShiftTo(j,t);
if(r.compareTo(t) >= 0) {
r[r.t++] = 1;
r.subTo(t,r);
}
BigInteger.ONE.dlShiftTo(ys,t);
t.subTo(y,y); // "negative" y so we can replace sub with am later
while(y.t < ys) y[y.t++] = 0;
while(--j >= 0) {
// Estimate quotient digit
var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);
if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
y.dlShiftTo(j,t);
r.subTo(t,r);
while(r[i] < --qd) r.subTo(t,r);
}
}
if(q != null) {
r.drShiftTo(ys,q);
if(ts != ms) BigInteger.ZERO.subTo(q,q);
}
r.t = ys;
r.clamp();
if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
if(ts < 0) BigInteger.ZERO.subTo(r,r);
}
// (public) this mod a
function bnMod(a) {
var r = nbi();
this.abs().divRemTo(a,null,r);
if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
return r;
}
// Modular reduction using "classic" algorithm
function Classic(m) { this.m = m; }
function cConvert(x) {
if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
else return x;
}
function cRevert(x) { return x; }
function cReduce(x) { x.divRemTo(this.m,null,x); }
function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
Classic.prototype.convert = cConvert;
Classic.prototype.revert = cRevert;
Classic.prototype.reduce = cReduce;
Classic.prototype.mulTo = cMulTo;
Classic.prototype.sqrTo = cSqrTo;
// (protected) return "-1/this % 2^DB"; useful for Mont. reduction
// justification:
// xy == 1 (mod m)
// xy = 1+km
// xy(2-xy) = (1+km)(1-km)
// x[y(2-xy)] = 1-k^2m^2
// x[y(2-xy)] == 1 (mod m^2)
// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
// JS multiply "overflows" differently from C/C++, so care is needed here.
function bnpInvDigit() {
if(this.t < 1) return 0;
var x = this[0];
if((x&1) == 0) return 0;
var y = x&3; // y == 1/x mod 2^2
y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
// last step - calculate inverse mod DV directly;
// assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits
// we really want the negative inverse, and -DV < y < DV
return (y>0)?this.DV-y:-y;
}
// Montgomery reduction
function Montgomery(m) {
this.m = m;
this.mp = m.invDigit();
this.mpl = this.mp&0x7fff;
this.mph = this.mp>>15;
this.um = (1<<(m.DB-15))-1;
this.mt2 = 2*m.t;
}
// xR mod m
function montConvert(x) {
var r = nbi();
x.abs().dlShiftTo(this.m.t,r);
r.divRemTo(this.m,null,r);
if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
return r;
}
// x/R mod m
function montRevert(x) {
var r = nbi();
x.copyTo(r);
this.reduce(r);
return r;
}
// x = x/R mod m (HAC 14.32)
function montReduce(x) {
while(x.t <= this.mt2) // pad x so am has enough room later
x[x.t++] = 0;
for(var i = 0; i < this.m.t; ++i) {
// faster way of calculating u0 = x[i]*mp mod DV
var j = x[i]&0x7fff;
var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;
// use am to combine the multiply-shift-add into one call
j = i+this.m.t;
x[j] += this.m.am(0,u0,x,i,0,this.m.t);
// propagate carry
while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }
}
x.clamp();
x.drShiftTo(this.m.t,x);
if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
}
// r = "x^2/R mod m"; x != r
function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
// r = "xy/R mod m"; x,y != r
function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
Montgomery.prototype.convert = montConvert;
Montgomery.prototype.revert = montRevert;
Montgomery.prototype.reduce = montReduce;
Montgomery.prototype.mulTo = montMulTo;
Montgomery.prototype.sqrTo = montSqrTo;
// (protected) true iff this is even
function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
function bnpExp(e,z) {
if(e > 0xffffffff || e < 1) return BigInteger.ONE;
var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
g.copyTo(r);
while(--i >= 0) {
z.sqrTo(r,r2);
if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
else { var t = r; r = r2; r2 = t; }
}
return z.revert(r);
}
// (public) this^e % m, 0 <= e < 2^32
function bnModPowInt(e,m) {
var z;
if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
return this.exp(e,z);
}
// protected
BigInteger.prototype.copyTo = bnpCopyTo;
BigInteger.prototype.fromInt = bnpFromInt;
BigInteger.prototype.fromString = bnpFromString;
BigInteger.prototype.clamp = bnpClamp;
BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
BigInteger.prototype.drShiftTo = bnpDRShiftTo;
BigInteger.prototype.lShiftTo = bnpLShiftTo;
BigInteger.prototype.rShiftTo = bnpRShiftTo;
BigInteger.prototype.subTo = bnpSubTo;
BigInteger.prototype.multiplyTo = bnpMultiplyTo;
BigInteger.prototype.squareTo = bnpSquareTo;
BigInteger.prototype.divRemTo = bnpDivRemTo;
BigInteger.prototype.invDigit = bnpInvDigit;
BigInteger.prototype.isEven = bnpIsEven;
BigInteger.prototype.exp = bnpExp;
// public
BigInteger.prototype.toString = bnToString;
BigInteger.prototype.negate = bnNegate;
BigInteger.prototype.abs = bnAbs;
BigInteger.prototype.compareTo = bnCompareTo;
BigInteger.prototype.bitLength = bnBitLength;
BigInteger.prototype.mod = bnMod;
BigInteger.prototype.modPowInt = bnModPowInt;
// "constants"
BigInteger.ZERO = nbv(0);
BigInteger.ONE = nbv(1);
// Copyright (c) 2005-2009 Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.
// Extended JavaScript BN functions, required for RSA private ops.
// Version 1.1: new BigInteger("0", 10) returns "proper" zero
// Version 1.2: square() API, isProbablePrime fix
// (public)
function bnClone() { var r = nbi(); this.copyTo(r); return r; }
// (public) return value as integer
function bnIntValue() {
if(this.s < 0) {
if(this.t == 1) return this[0]-this.DV;
else if(this.t == 0) return -1;
}
else if(this.t == 1) return this[0];
else if(this.t == 0) return 0;
// assumes 16 < DB < 32
return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0];
}
// (public) return value as byte
function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; }
// (public) return value as short (assumes DB>=16)
function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }
// (protected) return x s.t. r^x < DV
function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }
// (public) 0 if this == 0, 1 if this > 0
function bnSigNum() {
if(this.s < 0) return -1;
else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
else return 1;
}
// (protected) convert to radix string
function bnpToRadix(b) {
if(b == null) b = 10;
if(this.signum() == 0 || b < 2 || b > 36) return "0";
var cs = this.chunkSize(b);
var a = Math.pow(b,cs);
var d = nbv(a), y = nbi(), z = nbi(), r = "";
this.divRemTo(d,y,z);
while(y.signum() > 0) {
r = (a+z.intValue()).toString(b).substr(1) + r;
y.divRemTo(d,y,z);
}
return z.intValue().toString(b) + r;
}
// (protected) convert from radix string
function bnpFromRadix(s,b) {
this.fromInt(0);
if(b == null) b = 10;
var cs = this.chunkSize(b);
var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
for(var i = 0; i < s.length; ++i) {
var x = intAt(s,i);
if(x < 0) {
if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
continue;
}
w = b*w+x;
if(++j >= cs) {
this.dMultiply(d);
this.dAddOffset(w,0);
j = 0;
w = 0;
}
}
if(j > 0) {
this.dMultiply(Math.pow(b,j));
this.dAddOffset(w,0);
}
if(mi) BigInteger.ZERO.subTo(this,this);
}
// (protected) alternate constructor
function bnpFromNumber(a,b,c) {
if("number" == typeof b) {
// new BigInteger(int,int,RNG)
if(a < 2) this.fromInt(1);
else {
this.fromNumber(a,c);
if(!this.testBit(a-1)) // force MSB set
this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
if(this.isEven()) this.dAddOffset(1,0); // force odd
while(!this.isProbablePrime(b)) {
this.dAddOffset(2,0);
if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
}
}
}
else {
// new BigInteger(int,RNG)
var x = new Array(), t = a&7;
x.length = (a>>3)+1;
b.nextBytes(x);
if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;
this.fromString(x,256);
}
}
// (public) convert to bigendian byte array
function bnToByteArray() {
var i = this.t, r = new Array();
r[0] = this.s;
var p = this.DB-(i*this.DB)%8, d, k = 0;
if(i-- > 0) {
if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)
r[k++] = d|(this.s<<(this.DB-p));
while(i >= 0) {
if(p < 8) {
d = (this[i]&((1<<p)-1))<<(8-p);
d |= this[--i]>>(p+=this.DB-8);
}
else {
d = (this[i]>>(p-=8))&0xff;
if(p <= 0) { p += this.DB; --i; }
}
if((d&0x80) != 0) d |= -256;
if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
if(k > 0 || d != this.s) r[k++] = d;
}
}
return r;
}
function bnEquals(a) { return(this.compareTo(a)==0); }
function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
// (protected) r = this op a (bitwise)
function bnpBitwiseTo(a,op,r) {
var i, f, m = Math.min(a.t,this.t);
for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);
if(a.t < this.t) {
f = a.s&this.DM;
for(i = m; i < this.t; ++i) r[i] = op(this[i],f);
r.t = this.t;
}
else {
f = this.s&this.DM;
for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);
r.t = a.t;
}
r.s = op(this.s,a.s);
r.clamp();
}
// (public) this & a
function op_and(x,y) { return x&y; }
function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
// (public) this | a
function op_or(x,y) { return x|y; }
function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
// (public) this ^ a
function op_xor(x,y) { return x^y; }
function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
// (public) this & ~a
function op_andnot(x,y) { return x&~y; }
function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
// (public) ~this
function bnNot() {
var r = nbi();
for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];
r.t = this.t;
r.s = ~this.s;
return r;
}
// (public) this << n
function bnShiftLeft(n) {
var r = nbi();
if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
return r;
}
// (public) this >> n
function bnShiftRight(n) {
var r = nbi();
if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
return r;
}
// return index of lowest 1-bit in x, x < 2^31
function lbit(x) {
if(x == 0) return -1;
var r = 0;
if((x&0xffff) == 0) { x >>= 16; r += 16; }
if((x&0xff) == 0) { x >>= 8; r += 8; }
if((x&0xf) == 0) { x >>= 4; r += 4; }
if((x&3) == 0) { x >>= 2; r += 2; }
if((x&1) == 0) ++r;
return r;
}
// (public) returns index of lowest 1-bit (or -1 if none)
function bnGetLowestSetBit() {
for(var i = 0; i < this.t; ++i)
if(this[i] != 0) return i*this.DB+lbit(this[i]);
if(this.s < 0) return this.t*this.DB;
return -1;
}
// return number of 1 bits in x
function cbit(x) {
var r = 0;
while(x != 0) { x &= x-1; ++r; }
return r;
}
// (public) return number of set bits
function bnBitCount() {
var r = 0, x = this.s&this.DM;
for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);
return r;
}
// (public) true iff nth bit is set
function bnTestBit(n) {
var j = Math.floor(n/this.DB);
if(j >= this.t) return(this.s!=0);
return((this[j]&(1<<(n%this.DB)))!=0);
}
// (protected) this op (1<<n)
function bnpChangeBit(n,op) {
var r = BigInteger.ONE.shiftLeft(n);
this.bitwiseTo(r,op,r);
return r;
}
// (public) this | (1<<n)
function bnSetBit(n) { return this.changeBit(n,op_or); }
// (public) this & ~(1<<n)
function bnClearBit(n) { return this.changeBit(n,op_andnot); }
// (public) this ^ (1<<n)
function bnFlipBit(n) { return this.changeBit(n,op_xor); }
// (protected) r = this + a
function bnpAddTo(a,r) {
var i = 0, c = 0, m = Math.min(a.t,this.t);
while(i < m) {
c += this[i]+a[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
if(a.t < this.t) {
c += a.s;
while(i < this.t) {
c += this[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
c += this.s;
}
else {
c += this.s;
while(i < a.t) {
c += a[i];
r[i++] = c&this.DM;
c >>= this.DB;
}
c += a.s;
}
r.s = (c<0)?-1:0;
if(c > 0) r[i++] = c;
else if(c < -1) r[i++] = this.DV+c;
r.t = i;
r.clamp();
}
// (public) this + a
function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
// (public) this - a
function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
// (public) this * a
function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
// (public) this^2
function bnSquare() { var r = nbi(); this.squareTo(r); return r; }
// (public) this / a
function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
// (public) this % a
function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
// (public) [this/a,this%a]
function bnDivideAndRemainder(a) {
var q = nbi(), r = nbi();
this.divRemTo(a,q,r);
return new Array(q,r);
}
// (protected) this *= n, this >= 0, 1 < n < DV
function bnpDMultiply(n) {
this[this.t] = this.am(0,n-1,this,0,0,this.t);
++this.t;
this.clamp();
}
// (protected) this += n << w words, this >= 0
function bnpDAddOffset(n,w) {
if(n == 0) return;
while(this.t <= w) this[this.t++] = 0;
this[w] += n;
while(this[w] >= this.DV) {
this[w] -= this.DV;
if(++w >= this.t) this[this.t++] = 0;
++this[w];
}
}
// A "null" reducer
function NullExp() {}
function nNop(x) { return x; }
function nMulTo(x,y,r) { x.multiplyTo(y,r); }
function nSqrTo(x,r) { x.squareTo(r); }
NullExp.prototype.convert = nNop;
NullExp.prototype.revert = nNop;
NullExp.prototype.mulTo = nMulTo;
NullExp.prototype.sqrTo = nSqrTo;
// (public) this^e
function bnPow(e) { return this.exp(e,new NullExp()); }
// (protected) r = lower n words of "this * a", a.t <= n
// "this" should be the larger one if appropriate.
function bnpMultiplyLowerTo(a,n,r) {
var i = Math.min(this.t+a.t,n);
r.s = 0; // assumes a,this >= 0
r.t = i;
while(i > 0) r[--i] = 0;
var j;
for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);
for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);
r.clamp();
}
// (protected) r = "this * a" without lower n words, n > 0
// "this" should be the larger one if appropriate.
function bnpMultiplyUpperTo(a,n,r) {
--n;
var i = r.t = this.t+a.t-n;
r.s = 0; // assumes a,this >= 0
while(--i >= 0) r[i] = 0;
for(i = Math.max(n-this.t,0); i < a.t; ++i)
r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);
r.clamp();
r.drShiftTo(1,r);
}
// Barrett modular reduction
function Barrett(m) {
// setup Barrett
this.r2 = nbi();
this.q3 = nbi();
BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
this.mu = this.r2.divide(m);
this.m = m;
}
function barrettConvert(x) {
if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
else if(x.compareTo(this.m) < 0) return x;
else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
}
function barrettRevert(x) { return x; }
// x = x mod m (HAC 14.42)
function barrettReduce(x) {
x.drShiftTo(this.m.t-1,this.r2);
if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
x.subTo(this.r2,x);
while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
}
// r = x^2 mod m; x != r
function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
// r = x*y mod m; x,y != r
function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
Barrett.prototype.convert = barrettConvert;
Barrett.prototype.revert = barrettRevert;
Barrett.prototype.reduce = barrettReduce;
Barrett.prototype.mulTo = barrettMulTo;
Barrett.prototype.sqrTo = barrettSqrTo;
// (public) this^e % m (HAC 14.85)
function bnModPow(e,m) {
var i = e.bitLength(), k, r = nbv(1), z;
if(i <= 0) return r;
else if(i < 18) k = 1;
else if(i < 48) k = 3;
else if(i < 144) k = 4;
else if(i < 768) k = 5;
else k = 6;
if(i < 8)
z = new Classic(m);
else if(m.isEven())
z = new Barrett(m);
else
z = new Montgomery(m);
// precomputation
var g = new Array(), n = 3, k1 = k-1, km = (1<<k)-1;
g[1] = z.convert(this);
if(k > 1) {
var g2 = nbi();
z.sqrTo(g[1],g2);
while(n <= km) {
g[n] = nbi();
z.mulTo(g2,g[n-2],g[n]);
n += 2;
}
}
var j = e.t-1, w, is1 = true, r2 = nbi(), t;
i = nbits(e[j])-1;
while(j >= 0) {
if(i >= k1) w = (e[j]>>(i-k1))&km;
else {
w = (e[j]&((1<<(i+1))-1))<<(k1-i);
if(j > 0) w |= e[j-1]>>(this.DB+i-k1);
}
n = k;
while((w&1) == 0) { w >>= 1; --n; }
if((i -= n) < 0) { i += this.DB; --j; }
if(is1) { // ret == 1, don't bother squaring or multiplying it
g[w].copyTo(r);
is1 = false;
}
else {
while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
z.mulTo(r2,g[w],r);
}
while(j >= 0 && (e[j]&(1<<i)) == 0) {
z.sqrTo(r,r2); t = r; r = r2; r2 = t;
if(--i < 0) { i = this.DB-1; --j; }
}
}
return z.revert(r);
}
// (public) gcd(this,a) (HAC 14.54)
function bnGCD(a) {
var x = (this.s<0)?this.negate():this.clone();
var y = (a.s<0)?a.negate():a.clone();
if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
var i = x.getLowestSetBit(), g = y.getLowestSetBit();
if(g < 0) return x;
if(i < g) g = i;
if(g > 0) {
x.rShiftTo(g,x);
y.rShiftTo(g,y);
}
while(x.signum() > 0) {
if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
if(x.compareTo(y) >= 0) {
x.subTo(y,x);
x.rShiftTo(1,x);
}
else {
y.subTo(x,y);
y.rShiftTo(1,y);
}
}
if(g > 0) y.lShiftTo(g,y);
return y;
}
// (protected) this % n, n < 2^26
function bnpModInt(n) {
if(n <= 0) return 0;
var d = this.DV%n, r = (this.s<0)?n-1:0;
if(this.t > 0)
if(d == 0) r = this[0]%n;
else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;
return r;
}
// (public) 1/this % m (HAC 14.61)
function bnModInverse(m) {
var ac = m.isEven();
if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
var u = m.clone(), v = this.clone();
var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
while(u.signum() != 0) {
while(u.isEven()) {
u.rShiftTo(1,u);
if(ac) {
if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
a.rShiftTo(1,a);
}
else if(!b.isEven()) b.subTo(m,b);
b.rShiftTo(1,b);
}
while(v.isEven()) {
v.rShiftTo(1,v);
if(ac) {
if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
c.rShiftTo(1,c);
}
else if(!d.isEven()) d.subTo(m,d);
d.rShiftTo(1,d);
}
if(u.compareTo(v) >= 0) {
u.subTo(v,u);
if(ac) a.subTo(c,a);
b.subTo(d,b);
}
else {
v.subTo(u,v);
if(ac) c.subTo(a,c);
d.subTo(b,d);
}
}
if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
if(d.compareTo(m) >= 0) return d.subtract(m);
if(d.signum() < 0) d.addTo(m,d); else return d;
if(d.signum() < 0) return d.add(m); else return d;
}
var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
var lplim = (1<<26)/lowprimes[lowprimes.length-1];
// (public) test primality with certainty >= 1-.5^t
function bnIsProbablePrime(t) {
var i, x = this.abs();
if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {
for(i = 0; i < lowprimes.length; ++i)
if(x[0] == lowprimes[i]) return true;
return false;
}
if(x.isEven()) return false;
i = 1;
while(i < lowprimes.length) {
var m = lowprimes[i], j = i+1;
while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
m = x.modInt(m);
while(i < j) if(m%lowprimes[i++] == 0) return false;
}
return x.millerRabin(t);
}
// (protected) true if probably prime (HAC 4.24, Miller-Rabin)
function bnpMillerRabin(t) {
var n1 = this.subtract(BigInteger.ONE);
var k = n1.getLowestSetBit();
if(k <= 0) return false;
var r = n1.shiftRight(k);
t = (t+1)>>1;
if(t > lowprimes.length) t = lowprimes.length;
var a = nbi();
for(var i = 0; i < t; ++i) {
//Pick bases at random, instead of starting at 2
a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);
var y = a.modPow(r,this);
if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
var j = 1;
while(j++ < k && y.compareTo(n1) != 0) {
y = y.modPowInt(2,this);
if(y.compareTo(BigInteger.ONE) == 0) return false;
}
if(y.compareTo(n1) != 0) return false;
}
}
return true;
}
// protected
BigInteger.prototype.chunkSize = bnpChunkSize;
BigInteger.prototype.toRadix = bnpToRadix;
BigInteger.prototype.fromRadix = bnpFromRadix;
BigInteger.prototype.fromNumber = bnpFromNumber;
BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
BigInteger.prototype.changeBit = bnpChangeBit;
BigInteger.prototype.addTo = bnpAddTo;
BigInteger.prototype.dMultiply = bnpDMultiply;
BigInteger.prototype.dAddOffset = bnpDAddOffset;
BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
BigInteger.prototype.modInt = bnpModInt;
BigInteger.prototype.millerRabin = bnpMillerRabin;
// public
BigInteger.prototype.clone = bnClone;
BigInteger.prototype.intValue = bnIntValue;
BigInteger.prototype.byteValue = bnByteValue;
BigInteger.prototype.shortValue = bnShortValue;
BigInteger.prototype.signum = bnSigNum;
BigInteger.prototype.toByteArray = bnToByteArray;
BigInteger.prototype.equals = bnEquals;
BigInteger.prototype.min = bnMin;
BigInteger.prototype.max = bnMax;
BigInteger.prototype.and = bnAnd;
BigInteger.prototype.or = bnOr;
BigInteger.prototype.xor = bnXor;
BigInteger.prototype.andNot = bnAndNot;
BigInteger.prototype.not = bnNot;
BigInteger.prototype.shiftLeft = bnShiftLeft;
BigInteger.prototype.shiftRight = bnShiftRight;
BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
BigInteger.prototype.bitCount = bnBitCount;
BigInteger.prototype.testBit = bnTestBit;
BigInteger.prototype.setBit = bnSetBit;
BigInteger.prototype.clearBit = bnClearBit;
BigInteger.prototype.flipBit = bnFlipBit;
BigInteger.prototype.add = bnAdd;
BigInteger.prototype.subtract = bnSubtract;
BigInteger.prototype.multiply = bnMultiply;
BigInteger.prototype.divide = bnDivide;
BigInteger.prototype.remainder = bnRemainder;
BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
BigInteger.prototype.modPow = bnModPow;
BigInteger.prototype.modInverse = bnModInverse;
BigInteger.prototype.pow = bnPow;
BigInteger.prototype.gcd = bnGCD;
BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
// JSBN-specific extension
BigInteger.prototype.square = bnSquare;
// Expose the Barrett function
BigInteger.prototype.Barrett = Barrett
// BigInteger interfaces not implemented in jsbn:
// BigInteger(int signum, byte[] magnitude)
// double doubleValue()
// float floatValue()
// int hashCode()
// long longValue()
// static BigInteger valueOf(long val)
// Random number generator - requires a PRNG backend, e.g. prng4.js
// For best results, put code like
// <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
// in your main HTML document.
var rng_state;
var rng_pool;
var rng_pptr;
// Mix in a 32-bit integer into the pool
function rng_seed_int(x) {
rng_pool[rng_pptr++] ^= x & 255;
rng_pool[rng_pptr++] ^= (x >> 8) & 255;
rng_pool[rng_pptr++] ^= (x >> 16) & 255;
rng_pool[rng_pptr++] ^= (x >> 24) & 255;
if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
}
// Mix in the current time (w/milliseconds) into the pool
function rng_seed_time() {
rng_seed_int(new Date().getTime());
}
// Initialize the pool with junk if needed.
if(rng_pool == null) {
rng_pool = new Array();
rng_pptr = 0;
var t;
if(typeof window !== "undefined" && window.crypto) {
if (window.crypto.getRandomValues) {
// Use webcrypto if available
var ua = new Uint8Array(32);
window.crypto.getRandomValues(ua);
for(t = 0; t < 32; ++t)
rng_pool[rng_pptr++] = ua[t];
}
else if(navigator.appName == "Netscape" && navigator.appVersion < "5") {
// Extract entropy (256 bits) from NS4 RNG if available
var z = window.crypto.random(32);
for(t = 0; t < z.length; ++t)
rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
}
}
while(rng_pptr < rng_psize) { // extract some randomness from Math.random()
t = Math.floor(65536 * Math.random());
rng_pool[rng_pptr++] = t >>> 8;
rng_pool[rng_pptr++] = t & 255;
}
rng_pptr = 0;
rng_seed_time();
//rng_seed_int(window.screenX);
//rng_seed_int(window.screenY);
}
function rng_get_byte() {
if(rng_state == null) {
rng_seed_time();
rng_state = prng_newstate();
rng_state.init(rng_pool);
for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
rng_pool[rng_pptr] = 0;
rng_pptr = 0;
//rng_pool = null;
}
// TODO: allow reseeding after first request
return rng_state.next();
}
function rng_get_bytes(ba) {
var i;
for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
}
function SecureRandom() {}
SecureRandom.prototype.nextBytes = rng_get_bytes;
// prng4.js - uses Arcfour as a PRNG
function Arcfour() {
this.i = 0;
this.j = 0;
this.S = new Array();
}
// Initialize arcfour context from key, an array of ints, each from [0..255]
function ARC4init(key) {
var i, j, t;
for(i = 0; i < 256; ++i)
this.S[i] = i;
j = 0;
for(i = 0; i < 256; ++i) {
j = (j + this.S[i] + key[i % key.length]) & 255;
t = this.S[i];
this.S[i] = this.S[j];
this.S[j] = t;
}
this.i = 0;
this.j = 0;
}
function ARC4next() {
var t;
this.i = (this.i + 1) & 255;
this.j = (this.j + this.S[this.i]) & 255;
t = this.S[this.i];
this.S[this.i] = this.S[this.j];
this.S[this.j] = t;
return this.S[(t + this.S[this.i]) & 255];
}
Arcfour.prototype.init = ARC4init;
Arcfour.prototype.next = ARC4next;
// Plug in your RNG constructor here
function prng_newstate() {
return new Arcfour();
}
// Pool size must be a multiple of 4 and greater than 32.
// An array of bytes the size of the pool will be passed to init()
var rng_psize = 256;
if (typeof exports !== 'undefined') {
exports = module.exports = {
BigInteger: BigInteger,
SecureRandom: SecureRandom,
};
} else {
this.BigInteger = BigInteger;
this.SecureRandom = SecureRandom;
}
}).call(this);
| plantdiet/plantdiet.github.io | node_modules/gulp-sass/node_modules/node-sass/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js | JavaScript | mit | 41,810 |
/*!
* Sizzle CSS Selector Engine v1.10.18
* http://sizzlejs.com/
*
* Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-02-05
*/
(function( window ) {
var i,
support,
Expr,
getText,
isXML,
compile,
select,
outermostContext,
sortInput,
hasDuplicate,
// Local document vars
setDocument,
document,
docElem,
documentIsHTML,
rbuggyQSA,
rbuggyMatches,
matches,
contains,
// Instance-specific data
expando = "sizzle" + -(new Date()),
preferredDoc = window.document,
dirruns = 0,
done = 0,
classCache = createCache(),
tokenCache = createCache(),
compilerCache = createCache(),
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
}
return 0;
},
// General-purpose constants
strundefined = typeof undefined,
MAX_NEGATIVE = 1 << 31,
// Instance methods
hasOwn = ({}).hasOwnProperty,
arr = [],
pop = arr.pop,
push_native = arr.push,
push = arr.push,
slice = arr.slice,
// Use a stripped-down indexOf if we can't use a native one
indexOf = arr.indexOf || function( elem ) {
var i = 0,
len = this.length;
for ( ; i < len; i++ ) {
if ( this[i] === elem ) {
return i;
}
}
return -1;
},
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
// Regular expressions
// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
whitespace = "[\\x20\\t\\r\\n\\f]",
// http://www.w3.org/TR/css3-syntax/#characters
characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
// Loosely modeled on CSS identifier characters
// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
identifier = characterEncoding.replace( "w", "w#" ),
// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
// Prefer arguments quoted,
// then not containing pseudos/brackets,
// then attribute selectors/non-parenthetical expressions,
// then anything else
// These preferences are here to reduce the number of selectors
// needing tokenize in the PSEUDO preFilter
pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
rpseudo = new RegExp( pseudos ),
ridentifier = new RegExp( "^" + identifier + "$" ),
matchExpr = {
"ID": new RegExp( "^#(" + characterEncoding + ")" ),
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
},
rinputs = /^(?:input|select|textarea|button)$/i,
rheader = /^h\d$/i,
rnative = /^[^{]+\{\s*\[native \w/,
// Easily-parseable/retrievable ID or TAG or CLASS selectors
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling = /[+~]/,
rescape = /'|\\/g,
// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
funescape = function( _, escaped, escapedWhitespace ) {
var high = "0x" + escaped - 0x10000;
// NaN means non-codepoint
// Support: Firefox<24
// Workaround erroneous numeric interpretation of +"0x"
return high !== high || escapedWhitespace ?
escaped :
high < 0 ?
// BMP codepoint
String.fromCharCode( high + 0x10000 ) :
// Supplemental Plane codepoint (surrogate pair)
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
};
// Optimize for push.apply( _, NodeList )
try {
push.apply(
(arr = slice.call( preferredDoc.childNodes )),
preferredDoc.childNodes
);
// Support: Android<4.0
// Detect silently failing push.apply
arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
push = { apply: arr.length ?
// Leverage slice if possible
function( target, els ) {
push_native.apply( target, slice.call(els) );
} :
// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;
// Can't trust NodeList.length
while ( (target[j++] = els[i++]) ) {}
target.length = j - 1;
}
};
}
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
setDocument( context );
}
context = context || document;
results = results || [];
if ( !selector || typeof selector !== "string" ) {
return results;
}
if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
return [];
}
if ( documentIsHTML && !seed ) {
// Shortcuts
if ( (match = rquickExpr.exec( selector )) ) {
// Speed-up: Sizzle("#ID")
if ( (m = match[1]) ) {
if ( nodeType === 9 ) {
elem = context.getElementById( m );
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document (jQuery #6963)
if ( elem && elem.parentNode ) {
// Handle the case where IE, Opera, and Webkit return items
// by name instead of ID
if ( elem.id === m ) {
results.push( elem );
return results;
}
} else {
return results;
}
} else {
// Context is not a document
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
contains( context, elem ) && elem.id === m ) {
results.push( elem );
return results;
}
}
// Speed-up: Sizzle("TAG")
} else if ( match[2] ) {
push.apply( results, context.getElementsByTagName( selector ) );
return results;
// Speed-up: Sizzle(".CLASS")
} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
push.apply( results, context.getElementsByClassName( m ) );
return results;
}
}
// QSA path
if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
nid = old = expando;
newContext = context;
newSelector = nodeType === 9 && selector;
// qSA works strangely on Element-rooted queries
// We can work around this by specifying an extra ID on the root
// and working up from there (Thanks to Andrew Dupont for the technique)
// IE 8 doesn't work on object elements
if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
groups = tokenize( selector );
if ( (old = context.getAttribute("id")) ) {
nid = old.replace( rescape, "\\$&" );
} else {
context.setAttribute( "id", nid );
}
nid = "[id='" + nid + "'] ";
i = groups.length;
while ( i-- ) {
groups[i] = nid + toSelector( groups[i] );
}
newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
newSelector = groups.join(",");
}
if ( newSelector ) {
try {
push.apply( results,
newContext.querySelectorAll( newSelector )
);
return results;
} catch(qsaError) {
} finally {
if ( !old ) {
context.removeAttribute("id");
}
}
}
}
}
// All others
return select( selector.replace( rtrim, "$1" ), context, results, seed );
}
/**
* Create key-value caches of limited size
* @returns {Function(string, Object)} Returns the Object data after storing it on itself with
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
* deleting the oldest entry
*/
function createCache() {
var keys = [];
function cache( key, value ) {
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
if ( keys.push( key + " " ) > Expr.cacheLength ) {
// Only keep the most recent entries
delete cache[ keys.shift() ];
}
return (cache[ key + " " ] = value);
}
return cache;
}
/**
* Mark a function for special use by Sizzle
* @param {Function} fn The function to mark
*/
function markFunction( fn ) {
fn[ expando ] = true;
return fn;
}
/**
* Support testing using an element
* @param {Function} fn Passed the created div and expects a boolean result
*/
function assert( fn ) {
var div = document.createElement("div");
try {
return !!fn( div );
} catch (e) {
return false;
} finally {
// Remove from its parent by default
if ( div.parentNode ) {
div.parentNode.removeChild( div );
}
// release memory in IE
div = null;
}
}
/**
* Adds the same handler for all of the specified attrs
* @param {String} attrs Pipe-separated list of attributes
* @param {Function} handler The method that will be applied
*/
function addHandle( attrs, handler ) {
var arr = attrs.split("|"),
i = attrs.length;
while ( i-- ) {
Expr.attrHandle[ arr[i] ] = handler;
}
}
/**
* Checks document order of two siblings
* @param {Element} a
* @param {Element} b
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
*/
function siblingCheck( a, b ) {
var cur = b && a,
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
( ~b.sourceIndex || MAX_NEGATIVE ) -
( ~a.sourceIndex || MAX_NEGATIVE );
// Use IE sourceIndex if available on both nodes
if ( diff ) {
return diff;
}
// Check if b follows a
if ( cur ) {
while ( (cur = cur.nextSibling) ) {
if ( cur === b ) {
return -1;
}
}
}
return a ? 1 : -1;
}
/**
* Returns a function to use in pseudos for input types
* @param {String} type
*/
function createInputPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === type;
};
}
/**
* Returns a function to use in pseudos for buttons
* @param {String} type
*/
function createButtonPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
return (name === "input" || name === "button") && elem.type === type;
};
}
/**
* Returns a function to use in pseudos for positionals
* @param {Function} fn
*/
function createPositionalPseudo( fn ) {
return markFunction(function( argument ) {
argument = +argument;
return markFunction(function( seed, matches ) {
var j,
matchIndexes = fn( [], seed.length, argument ),
i = matchIndexes.length;
// Match elements found at the specified indexes
while ( i-- ) {
if ( seed[ (j = matchIndexes[i]) ] ) {
seed[j] = !(matches[j] = seed[j]);
}
}
});
});
}
/**
* Checks a node for validity as a Sizzle context
* @param {Element|Object=} context
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
*/
function testContext( context ) {
return context && typeof context.getElementsByTagName !== strundefined && context;
}
// Expose support vars for convenience
support = Sizzle.support = {};
/**
* Detects XML nodes
* @param {Element|Object} elem An element or a document
* @returns {Boolean} True iff elem is a non-HTML XML node
*/
isXML = Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
/**
* Sets document-related variables once based on the current document
* @param {Element|Object} [doc] An element or document object to use to set the document
* @returns {Object} Returns the current document
*/
setDocument = Sizzle.setDocument = function( node ) {
var hasCompare,
doc = node ? node.ownerDocument || node : preferredDoc,
parent = doc.defaultView;
// If no document and documentElement is available, return
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
return document;
}
// Set our document
document = doc;
docElem = doc.documentElement;
// Support tests
documentIsHTML = !isXML( doc );
// Support: IE>8
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
// IE6-8 do not support the defaultView property so parent will be undefined
if ( parent && parent !== parent.top ) {
// IE11 does not have attachEvent, so all must suffer
if ( parent.addEventListener ) {
parent.addEventListener( "unload", function() {
setDocument();
}, false );
} else if ( parent.attachEvent ) {
parent.attachEvent( "onunload", function() {
setDocument();
});
}
}
/* Attributes
---------------------------------------------------------------------- */
// Support: IE<8
// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
support.attributes = assert(function( div ) {
div.className = "i";
return !div.getAttribute("className");
});
/* getElement(s)By*
---------------------------------------------------------------------- */
// Check if getElementsByTagName("*") returns only elements
support.getElementsByTagName = assert(function( div ) {
div.appendChild( doc.createComment("") );
return !div.getElementsByTagName("*").length;
});
// Check if getElementsByClassName can be trusted
support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
div.innerHTML = "<div class='a'></div><div class='a i'></div>";
// Support: Safari<4
// Catch class over-caching
div.firstChild.className = "i";
// Support: Opera<10
// Catch gEBCN failure to find non-leading classes
return div.getElementsByClassName("i").length === 2;
});
// Support: IE<10
// Check if getElementById returns elements by name
// The broken getElementById methods don't pick up programatically-set names,
// so use a roundabout getElementsByName test
support.getById = assert(function( div ) {
docElem.appendChild( div ).id = expando;
return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
});
// ID find and filter
if ( support.getById ) {
Expr.find["ID"] = function( id, context ) {
if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
var m = context.getElementById( id );
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
return m && m.parentNode ? [m] : [];
}
};
Expr.filter["ID"] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
return elem.getAttribute("id") === attrId;
};
};
} else {
// Support: IE6/7
// getElementById is not reliable as a find shortcut
delete Expr.find["ID"];
Expr.filter["ID"] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
return node && node.value === attrId;
};
};
}
// Tag
Expr.find["TAG"] = support.getElementsByTagName ?
function( tag, context ) {
if ( typeof context.getElementsByTagName !== strundefined ) {
return context.getElementsByTagName( tag );
}
} :
function( tag, context ) {
var elem,
tmp = [],
i = 0,
results = context.getElementsByTagName( tag );
// Filter out possible comments
if ( tag === "*" ) {
while ( (elem = results[i++]) ) {
if ( elem.nodeType === 1 ) {
tmp.push( elem );
}
}
return tmp;
}
return results;
};
// Class
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
return context.getElementsByClassName( className );
}
};
/* QSA/matchesSelector
---------------------------------------------------------------------- */
// QSA and matchesSelector support
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
rbuggyMatches = [];
// qSa(:focus) reports false when true (Chrome 21)
// We allow this because of a bug in IE8/9 that throws an error
// whenever `document.activeElement` is accessed on an iframe
// So, we allow :focus to pass through QSA all the time to avoid the IE error
// See http://bugs.jquery.com/ticket/13378
rbuggyQSA = [];
if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
// Build QSA regex
// Regex strategy adopted from Diego Perini
assert(function( div ) {
// Select is set to empty string on purpose
// This is to test IE's treatment of not explicitly
// setting a boolean content attribute,
// since its presence should be enough
// http://bugs.jquery.com/ticket/12359
div.innerHTML = "<select t=''><option selected=''></option></select>";
// Support: IE8, Opera 10-12
// Nothing should be selected when empty strings follow ^= or $= or *=
if ( div.querySelectorAll("[t^='']").length ) {
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
}
// Support: IE8
// Boolean attributes and "value" are not treated correctly
if ( !div.querySelectorAll("[selected]").length ) {
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
}
// Webkit/Opera - :checked should return selected option elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
// IE8 throws error here and will not see later tests
if ( !div.querySelectorAll(":checked").length ) {
rbuggyQSA.push(":checked");
}
});
assert(function( div ) {
// Support: Windows 8 Native Apps
// The type and name attributes are restricted during .innerHTML assignment
var input = doc.createElement("input");
input.setAttribute( "type", "hidden" );
div.appendChild( input ).setAttribute( "name", "D" );
// Support: IE8
// Enforce case-sensitivity of name attribute
if ( div.querySelectorAll("[name=d]").length ) {
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
}
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
// IE8 throws error here and will not see later tests
if ( !div.querySelectorAll(":enabled").length ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}
// Opera 10-11 does not throw on post-comma invalid pseudos
div.querySelectorAll("*,:x");
rbuggyQSA.push(",.*:");
});
}
if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector) )) ) {
assert(function( div ) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
support.disconnectedMatch = matches.call( div, "div" );
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( div, "[s!='']:x" );
rbuggyMatches.push( "!=", pseudos );
});
}
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
/* Contains
---------------------------------------------------------------------- */
hasCompare = rnative.test( docElem.compareDocumentPosition );
// Element contains another
// Purposefully does not implement inclusive descendent
// As in, an element does not contain itself
contains = hasCompare || rnative.test( docElem.contains ) ?
function( a, b ) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!( bup && bup.nodeType === 1 && (
adown.contains ?
adown.contains( bup ) :
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
));
} :
function( a, b ) {
if ( b ) {
while ( (b = b.parentNode) ) {
if ( b === a ) {
return true;
}
}
}
return false;
};
/* Sorting
---------------------------------------------------------------------- */
// Document order sorting
sortOrder = hasCompare ?
function( a, b ) {
// Flag for duplicate removal
if ( a === b ) {
hasDuplicate = true;
return 0;
}
// Sort on method existence if only one input has compareDocumentPosition
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if ( compare ) {
return compare;
}
// Calculate position if both inputs belong to the same document
compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
a.compareDocumentPosition( b ) :
// Otherwise we know they are disconnected
1;
// Disconnected nodes
if ( compare & 1 ||
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
// Choose the first element that is related to our preferred document
if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
return -1;
}
if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
return 1;
}
// Maintain original order
return sortInput ?
( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
0;
}
return compare & 4 ? -1 : 1;
} :
function( a, b ) {
// Exit early if the nodes are identical
if ( a === b ) {
hasDuplicate = true;
return 0;
}
var cur,
i = 0,
aup = a.parentNode,
bup = b.parentNode,
ap = [ a ],
bp = [ b ];
// Parentless nodes are either documents or disconnected
if ( !aup || !bup ) {
return a === doc ? -1 :
b === doc ? 1 :
aup ? -1 :
bup ? 1 :
sortInput ?
( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
0;
// If the nodes are siblings, we can do a quick check
} else if ( aup === bup ) {
return siblingCheck( a, b );
}
// Otherwise we need full lists of their ancestors for comparison
cur = a;
while ( (cur = cur.parentNode) ) {
ap.unshift( cur );
}
cur = b;
while ( (cur = cur.parentNode) ) {
bp.unshift( cur );
}
// Walk down the tree looking for a discrepancy
while ( ap[i] === bp[i] ) {
i++;
}
return i ?
// Do a sibling check if the nodes have a common ancestor
siblingCheck( ap[i], bp[i] ) :
// Otherwise nodes in our document sort first
ap[i] === preferredDoc ? -1 :
bp[i] === preferredDoc ? 1 :
0;
};
return doc;
};
Sizzle.matches = function( expr, elements ) {
return Sizzle( expr, null, null, elements );
};
Sizzle.matchesSelector = function( elem, expr ) {
// Set document vars if needed
if ( ( elem.ownerDocument || elem ) !== document ) {
setDocument( elem );
}
// Make sure that attribute selectors are quoted
expr = expr.replace( rattributeQuotes, "='$1']" );
if ( support.matchesSelector && documentIsHTML &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
try {
var ret = matches.call( elem, expr );
// IE 9's matchesSelector returns false on disconnected nodes
if ( ret || support.disconnectedMatch ||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9
elem.document && elem.document.nodeType !== 11 ) {
return ret;
}
} catch(e) {}
}
return Sizzle( expr, document, null, [elem] ).length > 0;
};
Sizzle.contains = function( context, elem ) {
// Set document vars if needed
if ( ( context.ownerDocument || context ) !== document ) {
setDocument( context );
}
return contains( context, elem );
};
Sizzle.attr = function( elem, name ) {
// Set document vars if needed
if ( ( elem.ownerDocument || elem ) !== document ) {
setDocument( elem );
}
var fn = Expr.attrHandle[ name.toLowerCase() ],
// Don't get fooled by Object.prototype properties (jQuery #13807)
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, !documentIsHTML ) :
undefined;
return val !== undefined ?
val :
support.attributes || !documentIsHTML ?
elem.getAttribute( name ) :
(val = elem.getAttributeNode(name)) && val.specified ?
val.value :
null;
};
Sizzle.error = function( msg ) {
throw new Error( "Syntax error, unrecognized expression: " + msg );
};
/**
* Document sorting and removing duplicates
* @param {ArrayLike} results
*/
Sizzle.uniqueSort = function( results ) {
var elem,
duplicates = [],
j = 0,
i = 0;
// Unless we *know* we can detect duplicates, assume their presence
hasDuplicate = !support.detectDuplicates;
sortInput = !support.sortStable && results.slice( 0 );
results.sort( sortOrder );
if ( hasDuplicate ) {
while ( (elem = results[i++]) ) {
if ( elem === results[ i ] ) {
j = duplicates.push( i );
}
}
while ( j-- ) {
results.splice( duplicates[ j ], 1 );
}
}
// Clear input after sorting to release objects
// See https://github.com/jquery/sizzle/pull/225
sortInput = null;
return results;
};
/**
* Utility function for retrieving the text value of an array of DOM nodes
* @param {Array|Element} elem
*/
getText = Sizzle.getText = function( elem ) {
var node,
ret = "",
i = 0,
nodeType = elem.nodeType;
if ( !nodeType ) {
// If no nodeType, this is expected to be an array
while ( (node = elem[i++]) ) {
// Do not traverse comment nodes
ret += getText( node );
}
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
// Use textContent for elements
// innerText usage removed for consistency of new lines (jQuery #11153)
if ( typeof elem.textContent === "string" ) {
return elem.textContent;
} else {
// Traverse its children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
ret += getText( elem );
}
}
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
// Do not include comment or processing instruction nodes
return ret;
};
Expr = Sizzle.selectors = {
// Can be adjusted by the user
cacheLength: 50,
createPseudo: markFunction,
match: matchExpr,
attrHandle: {},
find: {},
relative: {
">": { dir: "parentNode", first: true },
" ": { dir: "parentNode" },
"+": { dir: "previousSibling", first: true },
"~": { dir: "previousSibling" }
},
preFilter: {
"ATTR": function( match ) {
match[1] = match[1].replace( runescape, funescape );
// Move the given value to match[3] whether quoted or unquoted
match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
if ( match[2] === "~=" ) {
match[3] = " " + match[3] + " ";
}
return match.slice( 0, 4 );
},
"CHILD": function( match ) {
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
4 xn-component of xn+y argument ([+-]?\d*n|)
5 sign of xn-component
6 x of xn-component
7 sign of y-component
8 y of y-component
*/
match[1] = match[1].toLowerCase();
if ( match[1].slice( 0, 3 ) === "nth" ) {
// nth-* requires argument
if ( !match[3] ) {
Sizzle.error( match[0] );
}
// numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
// other types prohibit arguments
} else if ( match[3] ) {
Sizzle.error( match[0] );
}
return match;
},
"PSEUDO": function( match ) {
var excess,
unquoted = !match[5] && match[2];
if ( matchExpr["CHILD"].test( match[0] ) ) {
return null;
}
// Accept quoted arguments as-is
if ( match[3] && match[4] !== undefined ) {
match[2] = match[4];
// Strip excess characters from unquoted arguments
} else if ( unquoted && rpseudo.test( unquoted ) &&
// Get excess from tokenize (recursively)
(excess = tokenize( unquoted, true )) &&
// advance to the next closing parenthesis
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
// excess is a negative index
match[0] = match[0].slice( 0, excess );
match[2] = unquoted.slice( 0, excess );
}
// Return only captures needed by the pseudo filter method (type and argument)
return match.slice( 0, 3 );
}
},
filter: {
"TAG": function( nodeNameSelector ) {
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
return nodeNameSelector === "*" ?
function() { return true; } :
function( elem ) {
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
};
},
"CLASS": function( className ) {
var pattern = classCache[ className + " " ];
return pattern ||
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
classCache( className, function( elem ) {
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
});
},
"ATTR": function( name, operator, check ) {
return function( elem ) {
var result = Sizzle.attr( elem, name );
if ( result == null ) {
return operator === "!=";
}
if ( !operator ) {
return true;
}
result += "";
return operator === "=" ? result === check :
operator === "!=" ? result !== check :
operator === "^=" ? check && result.indexOf( check ) === 0 :
operator === "*=" ? check && result.indexOf( check ) > -1 :
operator === "$=" ? check && result.slice( -check.length ) === check :
operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
false;
};
},
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
return first === 1 && last === 0 ?
// Shortcut for :nth-*(n)
function( elem ) {
return !!elem.parentNode;
} :
function( elem, context, xml ) {
var cache, outerCache, node, diff, nodeIndex, start,
dir = simple !== forward ? "nextSibling" : "previousSibling",
parent = elem.parentNode,
name = ofType && elem.nodeName.toLowerCase(),
useCache = !xml && !ofType;
if ( parent ) {
// :(first|last|only)-(child|of-type)
if ( simple ) {
while ( dir ) {
node = elem;
while ( (node = node[ dir ]) ) {
if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
return false;
}
}
// Reverse direction for :only-* (if we haven't yet done so)
start = dir = type === "only" && !start && "nextSibling";
}
return true;
}
start = [ forward ? parent.firstChild : parent.lastChild ];
// non-xml :nth-child(...) stores cache data on `parent`
if ( forward && useCache ) {
// Seek `elem` from a previously-cached index
outerCache = parent[ expando ] || (parent[ expando ] = {});
cache = outerCache[ type ] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = cache[0] === dirruns && cache[2];
node = nodeIndex && parent.childNodes[ nodeIndex ];
while ( (node = ++nodeIndex && node && node[ dir ] ||
// Fallback to seeking `elem` from the start
(diff = nodeIndex = 0) || start.pop()) ) {
// When found, cache indexes on `parent` and break
if ( node.nodeType === 1 && ++diff && node === elem ) {
outerCache[ type ] = [ dirruns, nodeIndex, diff ];
break;
}
}
// Use previously-cached element index if available
} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
diff = cache[1];
// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
} else {
// Use the same loop as above to seek `elem` from the start
while ( (node = ++nodeIndex && node && node[ dir ] ||
(diff = nodeIndex = 0) || start.pop()) ) {
if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
// Cache the index of each encountered element
if ( useCache ) {
(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
}
if ( node === elem ) {
break;
}
}
}
}
// Incorporate the offset, then check against cycle size
diff -= last;
return diff === first || ( diff % first === 0 && diff / first >= 0 );
}
};
},
"PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
Sizzle.error( "unsupported pseudo: " + pseudo );
// The user may use createPseudo to indicate that
// arguments are needed to create the filter function
// just as Sizzle does
if ( fn[ expando ] ) {
return fn( argument );
}
// But maintain support for old signatures
if ( fn.length > 1 ) {
args = [ pseudo, pseudo, "", argument ];
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
markFunction(function( seed, matches ) {
var idx,
matched = fn( seed, argument ),
i = matched.length;
while ( i-- ) {
idx = indexOf.call( seed, matched[i] );
seed[ idx ] = !( matches[ idx ] = matched[i] );
}
}) :
function( elem ) {
return fn( elem, 0, args );
};
}
return fn;
}
},
pseudos: {
// Potentially complex pseudos
"not": markFunction(function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
var input = [],
results = [],
matcher = compile( selector.replace( rtrim, "$1" ) );
return matcher[ expando ] ?
markFunction(function( seed, matches, context, xml ) {
var elem,
unmatched = matcher( seed, null, xml, [] ),
i = seed.length;
// Match elements unmatched by `matcher`
while ( i-- ) {
if ( (elem = unmatched[i]) ) {
seed[i] = !(matches[i] = elem);
}
}
}) :
function( elem, context, xml ) {
input[0] = elem;
matcher( input, null, xml, results );
return !results.pop();
};
}),
"has": markFunction(function( selector ) {
return function( elem ) {
return Sizzle( selector, elem ).length > 0;
};
}),
"contains": markFunction(function( text ) {
return function( elem ) {
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
};
}),
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
"lang": markFunction( function( lang ) {
// lang value must be a valid identifier
if ( !ridentifier.test(lang || "") ) {
Sizzle.error( "unsupported lang: " + lang );
}
lang = lang.replace( runescape, funescape ).toLowerCase();
return function( elem ) {
var elemLang;
do {
if ( (elemLang = documentIsHTML ?
elem.lang :
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
}
} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
return false;
};
}),
// Miscellaneous
"target": function( elem ) {
var hash = window.location && window.location.hash;
return hash && hash.slice( 1 ) === elem.id;
},
"root": function( elem ) {
return elem === docElem;
},
"focus": function( elem ) {
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
"enabled": function( elem ) {
return elem.disabled === false;
},
"disabled": function( elem ) {
return elem.disabled === true;
},
"checked": function( elem ) {
// In CSS3, :checked should return both checked and selected elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
},
"selected": function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
// Contents
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7; etc.)
// nodeType < 6 works because attributes (2) do not appear as children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
if ( elem.nodeType < 6 ) {
return false;
}
}
return true;
},
"parent": function( elem ) {
return !Expr.pseudos["empty"]( elem );
},
// Element/input types
"header": function( elem ) {
return rheader.test( elem.nodeName );
},
"input": function( elem ) {
return rinputs.test( elem.nodeName );
},
"button": function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === "button" || name === "button";
},
"text": function( elem ) {
var attr;
return elem.nodeName.toLowerCase() === "input" &&
elem.type === "text" &&
// Support: IE<8
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
},
// Position-in-collection
"first": createPositionalPseudo(function() {
return [ 0 ];
}),
"last": createPositionalPseudo(function( matchIndexes, length ) {
return [ length - 1 ];
}),
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
return [ argument < 0 ? argument + length : argument ];
}),
"even": createPositionalPseudo(function( matchIndexes, length ) {
var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"odd": createPositionalPseudo(function( matchIndexes, length ) {
var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; --i >= 0; ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
}
return matchIndexes;
})
}
};
Expr.pseudos["nth"] = Expr.pseudos["eq"];
// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
Expr.pseudos[ i ] = createButtonPseudo( i );
}
// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
function tokenize( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
if ( cached ) {
return parseOnly ? 0 : cached.slice( 0 );
}
soFar = selector;
groups = [];
preFilters = Expr.preFilter;
while ( soFar ) {
// Comma and first run
if ( !matched || (match = rcomma.exec( soFar )) ) {
if ( match ) {
// Don't consume trailing commas as valid
soFar = soFar.slice( match[0].length ) || soFar;
}
groups.push( (tokens = []) );
}
matched = false;
// Combinators
if ( (match = rcombinators.exec( soFar )) ) {
matched = match.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match[0].replace( rtrim, " " )
});
soFar = soFar.slice( matched.length );
}
// Filters
for ( type in Expr.filter ) {
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
(match = preFilters[ type ]( match ))) ) {
matched = match.shift();
tokens.push({
value: matched,
type: type,
matches: match
});
soFar = soFar.slice( matched.length );
}
}
if ( !matched ) {
break;
}
}
// Return the length of the invalid excess
// if we're just parsing
// Otherwise, throw an error or return tokens
return parseOnly ?
soFar.length :
soFar ?
Sizzle.error( selector ) :
// Cache the tokens
tokenCache( selector, groups ).slice( 0 );
}
function toSelector( tokens ) {
var i = 0,
len = tokens.length,
selector = "";
for ( ; i < len; i++ ) {
selector += tokens[i].value;
}
return selector;
}
function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
return combinator.first ?
// Check against closest ancestor/preceding element
function( elem, context, xml ) {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
return matcher( elem, context, xml );
}
}
} :
// Check against all ancestor/preceding elements
function( elem, context, xml ) {
var oldCache, outerCache,
newCache = [ dirruns, doneName ];
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
if ( xml ) {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
if ( matcher( elem, context, xml ) ) {
return true;
}
}
}
} else {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
outerCache = elem[ expando ] || (elem[ expando ] = {});
if ( (oldCache = outerCache[ dir ]) &&
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
// Assign to newCache so results back-propagate to previous elements
return (newCache[ 2 ] = oldCache[ 2 ]);
} else {
// Reuse newcache so results back-propagate to previous elements
outerCache[ dir ] = newCache;
// A match means we're done; a fail means we have to keep checking
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
return true;
}
}
}
}
}
};
}
function elementMatcher( matchers ) {
return matchers.length > 1 ?
function( elem, context, xml ) {
var i = matchers.length;
while ( i-- ) {
if ( !matchers[i]( elem, context, xml ) ) {
return false;
}
}
return true;
} :
matchers[0];
}
function multipleContexts( selector, contexts, results ) {
var i = 0,
len = contexts.length;
for ( ; i < len; i++ ) {
Sizzle( selector, contexts[i], results );
}
return results;
}
function condense( unmatched, map, filter, context, xml ) {
var elem,
newUnmatched = [],
i = 0,
len = unmatched.length,
mapped = map != null;
for ( ; i < len; i++ ) {
if ( (elem = unmatched[i]) ) {
if ( !filter || filter( elem, context, xml ) ) {
newUnmatched.push( elem );
if ( mapped ) {
map.push( i );
}
}
}
}
return newUnmatched;
}
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
postFinder = setMatcher( postFinder, postSelector );
}
return markFunction(function( seed, results, context, xml ) {
var temp, i, elem,
preMap = [],
postMap = [],
preexisting = results.length,
// Get initial elements from seed or context
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
// Prefilter to get matcher input, preserving a map for seed-results synchronization
matcherIn = preFilter && ( seed || !selector ) ?
condense( elems, preMap, preFilter, context, xml ) :
elems,
matcherOut = matcher ?
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
// ...intermediate processing is necessary
[] :
// ...otherwise use results directly
results :
matcherIn;
// Find primary matches
if ( matcher ) {
matcher( matcherIn, matcherOut, context, xml );
}
// Apply postFilter
if ( postFilter ) {
temp = condense( matcherOut, postMap );
postFilter( temp, [], context, xml );
// Un-match failing elements by moving them back to matcherIn
i = temp.length;
while ( i-- ) {
if ( (elem = temp[i]) ) {
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
}
}
}
if ( seed ) {
if ( postFinder || preFilter ) {
if ( postFinder ) {
// Get the final matcherOut by condensing this intermediate into postFinder contexts
temp = [];
i = matcherOut.length;
while ( i-- ) {
if ( (elem = matcherOut[i]) ) {
// Restore matcherIn since elem is not yet a final match
temp.push( (matcherIn[i] = elem) );
}
}
postFinder( null, (matcherOut = []), temp, xml );
}
// Move matched elements from seed to results to keep them synchronized
i = matcherOut.length;
while ( i-- ) {
if ( (elem = matcherOut[i]) &&
(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
seed[temp] = !(results[temp] = elem);
}
}
}
// Add elements to results, through postFinder if defined
} else {
matcherOut = condense(
matcherOut === results ?
matcherOut.splice( preexisting, matcherOut.length ) :
matcherOut
);
if ( postFinder ) {
postFinder( null, results, matcherOut, xml );
} else {
push.apply( results, matcherOut );
}
}
});
}
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
i = leadingRelative ? 1 : 0,
// The foundational matcher ensures that elements are reachable from top-level context(s)
matchContext = addCombinator( function( elem ) {
return elem === checkContext;
}, implicitRelative, true ),
matchAnyContext = addCombinator( function( elem ) {
return indexOf.call( checkContext, elem ) > -1;
}, implicitRelative, true ),
matchers = [ function( elem, context, xml ) {
return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
(checkContext = context).nodeType ?
matchContext( elem, context, xml ) :
matchAnyContext( elem, context, xml ) );
} ];
for ( ; i < len; i++ ) {
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
} else {
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
// Return special upon seeing a positional matcher
if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
}
return setMatcher(
i > 1 && elementMatcher( matchers ),
i > 1 && toSelector(
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
).replace( rtrim, "$1" ),
matcher,
i < j && matcherFromTokens( tokens.slice( i, j ) ),
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
j < len && toSelector( tokens )
);
}
matchers.push( matcher );
}
}
return elementMatcher( matchers );
}
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
setMatched = [],
contextBackup = outermostContext,
// We must always have either seed elements or outermost context
elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
// Use integer dirruns iff this is the outermost matcher
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
len = elems.length;
if ( outermost ) {
outermostContext = context !== document && context;
}
// Add elements passing elementMatchers directly to results
// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
// Support: IE<9, Safari
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
if ( byElement && elem ) {
j = 0;
while ( (matcher = elementMatchers[j++]) ) {
if ( matcher( elem, context, xml ) ) {
results.push( elem );
break;
}
}
if ( outermost ) {
dirruns = dirrunsUnique;
}
}
// Track unmatched elements for set filters
if ( bySet ) {
// They will have gone through all possible matchers
if ( (elem = !matcher && elem) ) {
matchedCount--;
}
// Lengthen the array for every element, matched or not
if ( seed ) {
unmatched.push( elem );
}
}
}
// Apply set filters to unmatched elements
matchedCount += i;
if ( bySet && i !== matchedCount ) {
j = 0;
while ( (matcher = setMatchers[j++]) ) {
matcher( unmatched, setMatched, context, xml );
}
if ( seed ) {
// Reintegrate element matches to eliminate the need for sorting
if ( matchedCount > 0 ) {
while ( i-- ) {
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] = pop.call( results );
}
}
}
// Discard index placeholder values to get only actual matches
setMatched = condense( setMatched );
}
// Add matches to results
push.apply( results, setMatched );
// Seedless set matches succeeding multiple successful matchers stipulate sorting
if ( outermost && !seed && setMatched.length > 0 &&
( matchedCount + setMatchers.length ) > 1 ) {
Sizzle.uniqueSort( results );
}
}
// Override manipulation of globals by nested matchers
if ( outermost ) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ?
markFunction( superMatcher ) :
superMatcher;
}
compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
var i,
setMatchers = [],
elementMatchers = [],
cached = compilerCache[ selector + " " ];
if ( !cached ) {
// Generate a function of recursive functions that can be used to check each element
if ( !match ) {
match = tokenize( selector );
}
i = match.length;
while ( i-- ) {
cached = matcherFromTokens( match[i] );
if ( cached[ expando ] ) {
setMatchers.push( cached );
} else {
elementMatchers.push( cached );
}
}
// Cache the compiled function
cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
// Save selector and tokenization
cached.selector = selector;
}
return cached;
};
/**
* A low-level selection function that works with Sizzle's compiled
* selector functions
* @param {String|Function} selector A selector or a pre-compiled
* selector function built with Sizzle.compile
* @param {Element} context
* @param {Array} [results]
* @param {Array} [seed] A set of elements to match against
*/
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
results = results || [];
// Try to minimize operations if there is no seed and only one group
if ( match.length === 1 ) {
// Take a shortcut and set the context if the root selector is an ID
tokens = match[0] = match[0].slice( 0 );
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
support.getById && context.nodeType === 9 && documentIsHTML &&
Expr.relative[ tokens[1].type ] ) {
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
if ( !context ) {
return results;
// Precompiled matchers will still verify ancestry, so step up a level
} else if ( compiled ) {
context = context.parentNode;
}
selector = selector.slice( tokens.shift().value.length );
}
// Fetch a seed set for right-to-left matching
i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
while ( i-- ) {
token = tokens[i];
// Abort if we hit a combinator
if ( Expr.relative[ (type = token.type) ] ) {
break;
}
if ( (find = Expr.find[ type ]) ) {
// Search, expanding context for leading sibling combinators
if ( (seed = find(
token.matches[0].replace( runescape, funescape ),
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
)) ) {
// If seed is empty or no tokens remain, we can return early
tokens.splice( i, 1 );
selector = seed.length && toSelector( tokens );
if ( !selector ) {
push.apply( results, seed );
return results;
}
break;
}
}
}
}
// Compile and execute a filtering function if one is not provided
// Provide `match` to avoid retokenization if we modified the selector above
( compiled || compile( selector, match ) )(
seed,
context,
!documentIsHTML,
results,
rsibling.test( selector ) && testContext( context.parentNode ) || context
);
return results;
};
// One-time assignments
// Sort stability
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
// Support: Chrome<14
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;
// Initialize against the default document
setDocument();
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function( div1 ) {
// Should return 1, but returns 4 (following)
return div1.compareDocumentPosition( document.createElement("div") ) & 1;
});
// Support: IE<8
// Prevent attribute/property "interpolation"
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( div ) {
div.innerHTML = "<a href='#'></a>";
return div.firstChild.getAttribute("href") === "#" ;
}) ) {
addHandle( "type|href|height|width", function( elem, name, isXML ) {
if ( !isXML ) {
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
}
});
}
// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert(function( div ) {
div.innerHTML = "<input/>";
div.firstChild.setAttribute( "value", "" );
return div.firstChild.getAttribute( "value" ) === "";
}) ) {
addHandle( "value", function( elem, name, isXML ) {
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
return elem.defaultValue;
}
});
}
// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert(function( div ) {
return div.getAttribute("disabled") == null;
}) ) {
addHandle( booleans, function( elem, name, isXML ) {
var val;
if ( !isXML ) {
return elem[ name ] === true ? name.toLowerCase() :
(val = elem.getAttributeNode( name )) && val.specified ?
val.value :
null;
}
});
}
// EXPOSE
if ( typeof define === "function" && define.amd ) {
define(function() { return Sizzle; });
// Sizzle requires that there be a global window in Common-JS like environments
} else if ( typeof module !== "undefined" && module.exports ) {
module.exports = Sizzle;
} else {
window.Sizzle = Sizzle;
}
// EXPOSE
(function(jQuery){
jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
webshims.isReady('sizzle', true);
})(window.webshims && window.webshims.$ || window.jQuery, window.Sizzle);
})( window );
| Amomo/cdnjs | ajax/libs/webshim/1.14.2/dev/shims/sizzle.js | JavaScript | mit | 60,410 |
var Organic=function(){var a={helpers:{},lib:{atoms:{},molecules:{}}},b=function(b){if("./helpers/extend"==b)return a.helpers.extend;if("/helpers/snippets"==b||"../../helpers/snippets"==b)return a.helpers.snippets;if("/lib/atoms/atoms"==b||"../../lib/atoms/atoms"==b||"../atoms/atoms.js"==b)return a.lib.atoms.atoms;if("../../helpers/units"==b)return a.helpers.units;if("../../helpers/args"==b)return a.helpers.args;if("path"==b)return{basename:function(a){return a.split("/").pop()}};var c=b.split("/");return function d(a){var b=c.shift().replace(".js","");return a[b]?0==c.length?a[b]:d(a[b]):void 0}(a)},c="",d=function(b,c,e){"undefined"==typeof b&&(b=[]),"undefined"==typeof c&&(c=a.lib),"undefined"==typeof e&&(e="lib/");for(var f in c)"function"==typeof c[f]?b.push(e+f+".js"):d(b,c[f],e+f+"/");return b};a.helpers.args=function(a){return a=a.toString().replace(/\/ /g,"/").split("/")},a.helpers.extend=function(){for(var a=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},b=arguments[0],c=1;c<arguments.length;c++)b=a(b,arguments[c]);return b},a.helpers.snippets=function(){return{pos:"position","pos:s":"position:static","pos:a":"position:absolute","pos:r":"position:relative","pos:f":"position:fixed","t:a":"top:auto",rig:"right","r:a":"right:auto",bot:"bottom",lef:"left","l:a":"left:auto",zin:"z-index","z:a":"z-index:auto",fl:"float","fl:n":"float:none","fl:l":"float:left","fl:r":"float:right",cl:"clear","cl:n":"clear:none","cl:l":"clear:left","cl:r":"clear:right","cl:b":"clear:both",dis:"display","d:n":"display:none","d:b":"display:block","d:i":"display:inline","d:ib":"display:inline-block","d:li":"display:list-item","d:ri":"display:run-in","d:cp":"display:compact","d:tb":"display:table","d:itb":"display:inline-table","d:tbcp":"display:table-caption","d:tbcl":"display:table-column","d:tbclg":"display:table-column-group","d:tbhg":"display:table-header-group","d:tbfg":"display:table-footer-group","d:tbr":"display:table-row","d:tbrg":"display:table-row-group","d:tbc":"display:table-cell","d:rb":"display:ruby","d:rbb":"display:ruby-base","d:rbbg":"display:ruby-base-group","d:rbt":"display:ruby-text","d:rbtg":"display:ruby-text-group",vis:"visibility","v:v":"visibility:visible","v:h":"visibility:hidden","v:c":"visibility:collapse",ov:"overflow","ov:v":"overflow:visible","ov:h":"overflow:hidden","ov:s":"overflow:scroll","ov:a":"overflow:auto",ovx:"overflow-x","ovx:v":"overflow-x:visible","ovx:h":"overflow-x:hidden","ovx:s":"overflow-x:scroll","ovx:a":"overflow-x:auto",ovy:"overflow-y","ovy:v":"overflow-y:visible","ovy:h":"overflow-y:hidden","ovy:s":"overflow-y:scroll","ovy:a":"overflow-y:auto",ovs:"overflow-style","ovs:a":"overflow-style:auto","ovs:s":"overflow-style:scrollbar","ovs:p":"overflow-style:panner","ovs:m":"overflow-style:move","ovs:mq":"overflow-style:marquee",zoo:"zoom:1",cp:"clip","cp:a":"clip:auto","cp:r":"clip:rect()",rz:"resize","rz:n":"resize:none","rz:b":"resize:both","rz:h":"resize:horizontal","rz:v":"resize:vertical",cur:"cursor","cur:a":"cursor:auto","cur:d":"cursor:default","cur:c":"cursor:crosshair","cur:ha":"cursor:hand","cur:he":"cursor:help","cur:m":"cursor:move","cur:p":"cursor:pointer","cur:t":"cursor:text",mar:"margin","m:au":"margin:0 auto",mt:"margin-top","mt:a":"margin-top:auto",mr:"margin-right","mr:a":"margin-right:auto",mb:"margin-bottom","mb:a":"margin-bottom:auto",ml:"margin-left","ml:a":"margin-left:auto",pad:"padding",pt:"padding-top",pr:"padding-right",pb:"padding-bottom",pl:"padding-left",bxz:"box-sizing","bxz:cb":"box-sizing:content-box","bxz:bb":"box-sizing:border-box",bxsh:"box-shadow","bxsh:n":"box-shadow:none","bxsh+":"box-shadow:0 0 0 #000",wid:"width","w:a":"width:auto",hei:"height","h:a":"height:auto",maw:"max-width","maw:n":"max-width:none",mah:"max-height","mah:n":"max-height:none",miw:"min-width",mih:"min-height",fon:"font","fon+":"font:1em Arial, sans-serif",fw:"font-weight","fw:n":"font-weight:normal","fw:b":"font-weight:bold","fw:br":"font-weight:bolder","fw:lr":"font-weight:lighter",fs:"font-style","fs:n":"font-style:normal","fs:i":"font-style:italic","fs:o":"font-style:oblique",fv:"font-variant","fv:n":"font-variant:normal","fv:sc":"font-variant:small-caps",fz:"font-size",fza:"font-size-adjust","fza:n":"font-size-adjust:none",ff:"font-family","ff:s":"font-family:serif","ff:ss":"font-family:sans-serif","ff:c":"font-family:cursive","ff:f":"font-family:fantasy","ff:m":"font-family:monospace",fef:"font-effect","fef:n":"font-effect:none","fef:eg":"font-effect:engrave","fef:eb":"font-effect:emboss","fef:o":"font-effect:outline",fem:"font-emphasize",femp:"font-emphasize-position","femp:b":"font-emphasize-position:before","femp:a":"font-emphasize-position:after",fems:"font-emphasize-style","fems:n":"font-emphasize-style:none","fems:ac":"font-emphasize-style:accent","fems:dt":"font-emphasize-style:dot","fems:c":"font-emphasize-style:circle","fems:ds":"font-emphasize-style:disc",fsm:"font-smooth","fsm:au":"font-smooth:auto","fsm:n":"font-smooth:never","fsm:al":"font-smooth:always",fst:"font-stretch","fst:n":"font-stretch:normal","fst:uc":"font-stretch:ultra-condensed","fst:ec":"font-stretch:extra-condensed","fst:c":"font-stretch:condensed","fst:sc":"font-stretch:semi-condensed","fst:se":"font-stretch:semi-expanded","fst:e":"font-stretch:expanded","fst:ee":"font-stretch:extra-expanded","fst:ue":"font-stretch:ultra-expanded",va:"vertical-align","va:sup":"vertical-align:super","va:t":"vertical-align:top","va:tt":"vertical-align:text-top","va:m":"vertical-align:middle","va:bl":"vertical-align:baseline","va:b":"vertical-align:bottom","va:tb":"vertical-align:text-bottom","va:sub":"vertical-align:sub",ta:"text-align","ta:le":"text-align:left","ta:c":"text-align:center","ta:r":"text-align:right","ta:j":"text-align:justify",tal:"text-align-last","tal:a":"text-align-last:auto","tal:l":"text-align-last:left","tal:c":"text-align-last:center","tal:r":"text-align-last:right",ted:"text-decoration","ted:n":"text-decoration:none","ted:u":"text-decoration:underline","ted:o":"text-decoration:overline","ted:l":"text-decoration:line-through",te:"text-emphasis","te:n":"text-emphasis:none","te:ac":"text-emphasis:accent","te:dt":"text-emphasis:dot","te:c":"text-emphasis:circle","te:ds":"text-emphasis:disc","te:b":"text-emphasis:before","te:a":"text-emphasis:after",teh:"text-height","teh:a":"text-height:auto","teh:f":"text-height:font-size","teh:t":"text-height:text-size","teh:m":"text-height:max-size",ti:"text-indent","ti:-":"text-indent:-9999px",tj:"text-justify","tj:a":"text-justify:auto","tj:iw":"text-justify:inter-word","tj:ii":"text-justify:inter-ideograph","tj:ic":"text-justify:inter-cluster","tj:d":"text-justify:distribute","tj:k":"text-justify:kashida","tj:t":"text-justify:tibetan",tol:"text-outline","tol+":"text-outline:0 0 #000","tol:n":"text-outline:none",tr:"text-replace","tr:n":"text-replace:none",tt:"text-transform","tt:n":"text-transform:none","tt:c":"text-transform:capitalize","tt:u":"text-transform:uppercase","tt:l":"text-transform:lowercase",tw:"text-wrap","tw:n":"text-wrap:normal","tw:no":"text-wrap:none","tw:u":"text-wrap:unrestricted","tw:s":"text-wrap:suppress",tsh:"text-shadow","tsh+":"text-shadow:0 0 0 #000","tsh:n":"text-shadow:none",lh:"line-height",lts:"letter-spacing",whs:"white-space","whs:n":"white-space:normal","whs:p":"white-space:pre","whs:nw":"white-space:nowrap","whs:pw":"white-space:pre-wrap","whs:pl":"white-space:pre-line",whsc:"white-space-collapse","whsc:n":"white-space-collapse:normal","whsc:k":"white-space-collapse:keep-all","whsc:l":"white-space-collapse:loose","whsc:bs":"white-space-collapse:break-strict","whsc:ba":"white-space-collapse:break-all",wob:"word-break","wob:n":"word-break:normal","wob:k":"word-break:keep-all","wob:l":"word-break:loose","wob:bs":"word-break:break-strict","wob:ba":"word-break:break-all",wos:"word-spacing",wow:"word-wrap","wow:nm":"word-wrap:normal","wow:n":"word-wrap:none","wow:u":"word-wrap:unrestricted","wow:s":"word-wrap:suppress",bg:"background","bg+":"background:#fff url() 0 0 no-repeat","bg:n":"background:none",bgc:"background-color:#fff","bgc:t":"background-color:transparent",bgi:"background-image:url()","bgi:n":"background-image:none",bgr:"background-repeat","bgr:r":"background-repeat:repeat","bgr:n":"background-repeat:no-repeat","bgr:x":"background-repeat:repeat-x","bgr:y":"background-repeat:repeat-y",bga:"background-attachment","bga:f":"background-attachment:fixed","bga:s":"background-attachment:scroll",bgp:"background-position:0 0",bgpx:"background-position-x",bgpy:"background-position-y",bgbk:"background-break","bgbk:bb":"background-break:bounding-box","bgbk:eb":"background-break:each-box","bgbk:c":"background-break:continuous",bgcp:"background-clip","bgcp:bb":"background-clip:border-box","bgcp:pb":"background-clip:padding-box","bgcp:cb":"background-clip:content-box","bgcp:nc":"background-clip:no-clip",bgo:"background-origin","bgo:pb":"background-origin:padding-box","bgo:bb":"background-origin:border-box","bgo:cb":"background-origin:content-box",bgz:"background-size","bgz:a":"background-size:auto","bgz:ct":"background-size:contain","bgz:cv":"background-size:cover",col:"color:#000",op:"opacity",hsl:"hsl(359,100%,100%)",hsla:"hsla(359,100%,100%,0.5)",rgb:"rgb(255,255,255)",rgba:"rgba(255,255,255,0.5)",ct:"content","ct:n":"content:normal","ct:oq":"content:open-quote","ct:noq":"content:no-open-quote","ct:cq":"content:close-quote","ct:ncq":"content:no-close-quote","ct:a":"content:attr()","ct:c":"content:counter()","ct:cs":"content:counters()",quo:"quotes","q:n":"quotes:none","q:ru":"quotes:'\x00AB' '\x00BB' 'E' 'C'","q:en":"quotes:'C' 'D' '8' '9'",coi:"counter-increment",cor:"counter-reset",out:"outline","o:n":"outline:none",oo:"outline-offset",ow:"outline-width",os:"outline-style",oc:"outline-color:#000","oc:i":"outline-color:invert",tbl:"table-layout","tbl:a":"table-layout:auto","tbl:f":"table-layout:fixed",cps:"caption-side","cps:t":"caption-side:top","cps:b":"caption-side:bottom",ec:"empty-cells","ec:s":"empty-cells:show","ec:h":"empty-cells:hide",bd:"border","bd+":"border:1px solid #000","bd:n":"border:none",bdbk:"border-break","bdbk:c":"border-break:close",bdcl:"border-collapse","bdcl:c":"border-collapse:collapse","bdcl:s":"border-collapse:separate",bdc:"border-color:#000",bdi:"border-image:url()","bdi:n":"border-image:none",bdti:"border-top-image:url()","bdti:n":"border-top-image:none",bdri:"border-right-image:url()","bdri:n":"border-right-image:none",bdbi:"border-bottom-image:url()","bdbi:n":"border-bottom-image:none",bdli:"border-left-image:url()","bdli:n":"border-left-image:none",bdci:"border-corner-image:url()","bdci:n":"border-corner-image:none","bdci:c":"border-corner-image:continue",bdtli:"border-top-left-image:url()","bdtli:n":"border-top-left-image:none","bdtli:c":"border-top-left-image:continue",bdtri:"border-top-right-image:url()","bdtri:n":"border-top-right-image:none","bdtri:c":"border-top-right-image:continue",bdbri:"border-bottom-right-image:url()","bdbri:n":"border-bottom-right-image:none","bdbri:c":"border-bottom-right-image:continue",bdbli:"border-bottom-left-image:url()","bdbli:n":"border-bottom-left-image:none","bdbli:c":"border-bottom-left-image:continue",bdf:"border-fit","bdf:c":"border-fit:clip","bdf:r":"border-fit:repeat","bdf:sc":"border-fit:scale","bdf:st":"border-fit:stretch","bdf:ow":"border-fit:overwrite","bdf:of":"border-fit:overflow","bdf:sp":"border-fit:space",bdlt:"border-length","bdlt:a":"border-length:auto",bdsp:"border-spacing",bds:"border-style","bds:n":"border-style:none","bds:h":"border-style:hidden","bds:dt":"border-style:dotted","bds:ds":"border-style:dashed","bds:s":"border-style:solid","bds:db":"border-style:double","bds:dd":"border-style:dot-dash","bds:ddd":"border-style:dot-dot-dash","bds:w":"border-style:wave","bds:g":"border-style:groove","bds:r":"border-style:ridge","bds:i":"border-style:inset","bds:o":"border-style:outset",bdw:"border-width",bdt:"border-top","bdt+":"border-top:1px solid #000","bdt:n":"border-top:none",bdtw:"border-top-width",bdts:"border-top-style","bdts:n":"border-top-style:none",bdtc:"border-top-color:#000",bdr:"border-right","bdr+":"border-right:1px solid #000","bdr:n":"border-right:none",bdrw:"border-right-width",bdrs:"border-right-style","bdrs:n":"border-right-style:none",bdrc:"border-right-color:#000",bdb:"border-bottom","bdb+":"border-bottom:1px solid #000","bdb:n":"border-bottom:none",bdbw:"border-bottom-width",bdbs:"border-bottom-style","bdbs:n":"border-bottom-style:none",bdbc:"border-bottom-color:#000",bdl:"border-left","bdl+":"border-left:1px solid #000","bdl:n":"border-left:none",bdlw:"border-left-width",bdls:"border-left-style","bdls:n":"border-left-style:none",bdlc:"border-left-color:#000",bdrsa:"border-radius",bdtrrs:"border-top-right-radius",bdtlrs:"border-top-left-radius",bdbrrs:"border-bottom-right-radius",bdblrs:"border-bottom-left-radius",lis:"list-style","lis:n":"list-style:none",lisp:"list-style-position","lisp:i":"list-style-position:inside","lisp:o":"list-style-position:outside",list:"list-style-type","list:n":"list-style-type:none","list:d":"list-style-type:disc","list:c":"list-style-type:circle","list:s":"list-style-type:square","list:dc":"list-style-type:decimal","list:dclz":"list-style-type:decimal-leading-zero","list:lr":"list-style-type:lower-roman","list:ur":"list-style-type:upper-roman",lisi:"list-style-image","lisi:n":"list-style-image:none",pgbb:"page-break-before","pgbb:au":"page-break-before:auto","pgbb:al":"page-break-before:always","pgbb:l":"page-break-before:left","pgbb:r":"page-break-before:right",pgbi:"page-break-inside","pgbi:au":"page-break-inside:auto","pgbi:av":"page-break-inside:avoid",pgba:"page-break-after","pgba:au":"page-break-after:auto","pgba:al":"page-break-after:always","pgba:l":"page-break-after:left","pgba:r":"page-break-after:right",orp:"orphans",widows:"widows",ipt:"!important",ffa:"@font-family {<br> font-family:;<br> src:url();<br>}","ffa+":"@font-family {<br> font-family: 'FontName';<br> src: url('FileName.eot');<br> src: url('FileName.eot?#iefix') format('embedded-opentype'),<br> url('FileName.woff') format('woff'),<br> url('FileName.ttf') format('truetype'),<br> url('FileName.svg#FontName') format('svg');<br> font-style: normal;<br> font-weight: normal;<br>}",imp:"@import url()",mp:"@media print {}","bg:ie":"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop')","op:ie":"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)","op:ms":"-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'",trf:"transform","trf:r":"transform:rotate(90deg)","trf:sc":"transform:scale(x,y)","trf:scx":"transform:scaleX(x)","trf:scy":"transform:scaleY(y)","trf:skx":"transform:skewX(90deg)","trf:sky":"transform:skewY(90deg)","trf:t":"transform:translate(x,y)","trf:tx":"transform:translateX(x)","trf:ty":"transform:translateY(y)",trs:"transition",trsde:"transition-delay",trsdu:"transition-duration",trsp:"transition-property",trstf:"transition-timing-function",ani:"animation",ann:"animation-name",adu:"animation-duration",atf:"animation-timing-function",ade:"animation-delay",aic:"animation-iteration-count",adi:"animation-direction",aps:"animation-play-state",key:"@keyframes {}",ms:"@media screen and () {}","in":"inherit",tra:"transparent",beh:"behavior:url()",cha:"@charset''",ac:" :active{}","ac:a":"&:active{}",af:" :after{}","af:a":"&:after{}",be:" :before{}","be:a":"&:before{}",ch:" :checked{}","ch:a":"&:checked{}",dsa:" :disabled{}<i>[da]</i>","dsa:a":"&:disabled{}<i>[da:a]</i>",en:" :enabled{}","en:a":"&:enabled{}",fc:" :first-child{}","fc:a":"&:first-child{}",fle:" :first-letter{}","fle:a":"&:first-letter{}",fli:" :first-line{}","fli:a":"&:first-line{}",foc:" :focus{}","foc:a":"&:focus{}",ho:" :hover{}","ho:a":"&:hover{}",ln:" :lang(){}","ln:a":"&:lang(){}",lc:" :last-child{}","lc:a":"&:last-child{}",nc:" :nth-child(){}","nc:a":"&:nth-child(){}",vit:" :visited{}","vit:a":"&:visited{}",tgt:" :target{}","tgt:a":"&:target{}",fot:" :first-of-type{}","fot:a":"&:first-of-type{}",lot:" :last-of-type{}","lot:a":"&:last-of-type{}",not:" :nth-of-type(){}","not:a":"&:nth-of-type(){}",ext:"@extend",inc:"@include",mix:"@mixin",ieh:"ie-hex-str()"}},a.helpers.units=function(a,b){return a.toString().match(/[%|in|cm|mm|em|ex|pt|pc|px|deg|ms|s]/)?a:a+(b||"%")};var e=(b("./helpers/extend"),b("fs"),b("path")),f=function(a){return d()};return a.index={absurd:null,init:function(a){"undefined"!=typeof a&&(this.absurd=a);for(var d=f(c+"/lib/"),g=this,h=0;h<d.length;h++){var i=e.basename(d[h]);!function(a){var c=b(a);g.absurd.plugin(i.replace(".js",""),function(a,b){return c(b)})}(d[h])}var j=b(c+"/helpers/snippets")();for(var k in j)k=k.split(":"),function(a){g.absurd.plugin(a,function(b,c,d){d===!1&&(d="");var e,f={};return(e=j[a+":"+c])?(e=e.split(":"),f[d+e[0]]=e[1]||""):(e=j[a])&&(f[d+e]=c),f})}(k.shift());return this}},a.lib.atoms.atoms=function(a){var b=function(a,b){return a=a.replace(/( )?:( )?/,":").split(":"),b=b||{},b[a[0]]=a[1]||"",b},c=function(a){for(var c={},d=0;d<a.length;d++)b(a[d],c);return c};return"string"==typeof a?c(a.replace(/( )?\/( )?/g,"/").split("/")):"object"==typeof a?a instanceof Array?c(a):a:void 0},a.lib.molecules.animate=function(a){var b={};switch(b["-wmso-animation-name"]="",b["-wmso-animation-duration"]="1s",name="","string"==typeof a?b["-wmso-animation-name"]=a:"object"==typeof a&&(a instanceof Array?1===a.length?b["-wmso-animation-name"]=a[0]:2===a.length?b={keyframes:{name:a[0],frames:a[1]}}:a=b={}:(b["-wmso-animation-name"]=a.name,a.duration?b["-wmso-animation-duration"]=a.duration:"",a.fillMode?b["-wmso-animation-fill-mode"]=a.fillMode:"",a.timingFunction?b["-wmso-animation-timing-function"]=a.timingFunction:"",a.iterationCount?b["-wmso-animation-iteration-count"]=a.iterationCount:"",a.delay?b["-wmso-animation-delay"]=a.delay:"",a.direction?b["-wmso-animation-direction"]=a.direction:"",a.playState?b["-wmso-animation-play-state"]=a.playState:"",a.frames&&(b.keyframes={name:a.name,frames:a.frames}))),b["-wmso-animation-name"]){case"blink":b.keyframes={name:"blink",frames:{"0%, 100%":{transparent:0},"50%":{transparent:1}}};break;case"bounce":b.keyframes={name:"bounce",frames:{"0%, 20%, 50%, 80%, 100%":{"-wmso-transform":"translateY(0)"},"40%":{"-wmso-transform":"translateY(-30px)"},"60%":{"-wmso-transform":"translateY(-15px)"}}};break;case"flash":b.keyframes={name:"flash",frames:{"0%, 50%, 100%":{opacity:"1"},"25%, 75%":{opacity:"0"}}};break;case"pulse":b.keyframes={name:"pulse",frames:{"0%":{"-wmso-transform":"scale(1)"},"50%":{"-wmso-transform":"scale(1.1)"},"100%":{"-wmso-transform":"scale(1)"}}};break;case"shake":b.keyframes={name:"shake",frames:{"0%, 100%":{"-wmso-transform":"translateX(0)"},"10%, 30%, 50%, 70%, 90%":{"-wmso-transform":"translateX(-10px)"},"20%, 40%, 60%, 80%":{"-wmso-transform":"translateX(10px)"}}};break;case"swing":b.keyframes={name:"swing",frames:{"20%":{"-wmso-transform":"rotate(15deg)"},"40%":{"-wmso-transform":"rotate(-10deg)"},"60%":{"-wmso-transform":"rotate(5deg)"},"80%":{"-wmso-transform":"rotate(-5deg)"},"100%":{"-wmso-transform":"rotate(0deg)"}}};break;case"tada":b.keyframes={name:"tada",frames:{"0%":{"-wmso-transform":"scale(1)"},"10%, 20%":{"-wmso-transform":"scale(0.9) rotate(-3deg)"},"30%, 50%, 70%, 90%":{"-wmso-transform":"scale(1.1) rotate(3deg)"},"40%, 60%, 80%":{"-wmso-transform":"scale(1.1) rotate(-3deg)"},"100%":{"-wmso-transform":"scale(1) rotate(0)"}}};break;case"wobble":b.keyframes={name:"wobble",frames:{"0%":{"-wmso-transform":"translateX(0%)"},"15%":{"-wmso-transform":"translateX(-25%) rotate(-5deg)"},"30%":{"-wmso-transform":"translateX(20%) rotate(3deg)"},"45%":{"-wmso-transform":"translateX(-15%) rotate(-3deg)"},"60%":{"-wmso-transform":"translateX(10%) rotate(2deg)"},"75%":{"-wmso-transform":"translateX(-5%) rotate(-1deg)"},"100%":{"-wmso-transform":"translateX(0%)"}}};break;case"bounceIn":b.keyframes={name:"bounceIn",frames:{"0%":{opacity:"0","-wmso-transform":"scale(.3)"},"50%":{opacity:"1","-wmso-transform":"scale(1.05)"},"70%":{"-wmso-transform":"scale(.9)"},"100%":{"-wmso-transform":"scale(1)"}}};break;case"bounceInDown":b.keyframes={name:"bounceInDown",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(-2000px)"},"60%":{opacity:"1","-wmso-transform":"translateY(30px)"},"80%":{"-wmso-transform":"translateY(-10px)"},"100%":{"-wmso-transform":"translateY(0)"}}};break;case"bounceInLeft":b.keyframes={name:"bounceInLeft",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(-2000px)"},"60%":{opacity:"1","-wmso-transform":"translateX(30px)"},"80%":{"-wmso-transform":"translateX(-10px)"},"100%":{"-wmso-transform":"translateX(0)"}}};break;case"bounceInRight":b.keyframes={name:"bounceInRight",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(2000px)"},"60%":{opacity:"1","-wmso-transform":"translateX(-30px)"},"80%":{"-wmso-transform":"translateX(10px)"},"100%":{"-wmso-transform":"translateX(0)"}}};break;case"bounceInUp":b.keyframes={name:"bounceInUp",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(2000px)"},"60%":{opacity:"1","-wmso-transform":"translateY(-30px)"},"80%":{"-wmso-transform":"translateY(10px)"},"100%":{"-wmso-transform":"translateY(0)"}}};break;case"bounceOut":b.keyframes={name:"bounceOut",frames:{"0%":{"-wmso-transform":"scale(1)"},"25%":{"-wmso-transform":"scale(.95)"},"50%":{opacity:"1","-wmso-transform":"scale(1.1)"},"100%":{opacity:"0","-wmso-transform":"scale(.3)"}}};break;case"bounceOutDown":b.keyframes={name:"bounceOutDown",frames:{"0%":{"-wmso-transform":"translateY(0)"},"20%":{opacity:"1","-wmso-transform":"translateY(-20px)"},"100%":{opacity:"0","-wmso-transform":"translateY(2000px)"}}};break;case"bounceOutLeft":b.keyframes={name:"bounceOutLeft",frames:{"0%":{"-wmso-transform":"translateX(0)"},"20%":{opacity:"1","-wmso-transform":"translateX(20px)"},"100%":{opacity:"0","-wmso-transform":"translateX(-2000px)"}}};break;case"bounceOutRight":b.keyframes={name:"bounceOutRight",frames:{"0%":{"-wmso-transform":"translateX(0)"},"20%":{opacity:"1","-wmso-transform":"translateX(-20px)"},"100%":{opacity:"0","-wmso-transform":"translateX(2000px)"}}};break;case"bounceOutUp":b.keyframes={name:"bounceOutUp",frames:{"0%":{"-wmso-transform":"translateY(0)"},"20%":{opacity:"1","-wmso-transform":"translateY(20px)"},"100%":{opacity:"0","-wmso-transform":"translateY(-2000px)"}}};break;case"fadeIn":b.keyframes={name:"fadeIn",frames:{"0%":{opacity:"0"},"100%":{opacity:"1"}}};break;case"fadeInDown":b.keyframes={name:"fadeInDown",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(-20px)"},"100%":{opacity:"1","-wmso-transform":"translateY(0)"}}};break;case"fadeInDownBig":b.keyframes={name:"fadeInDownBig",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(-2000px)"},"100%":{opacity:"1","-wmso-transform":"translateY(0)"}}};break;case"fadeInLeft":b.keyframes={name:"fadeInLeft",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(-20px)"},"100%":{opacity:"1","-wmso-transform":"translateX(0)"}}};break;case"fadeInLeftBig":b.keyframes={name:"fadeInLeftBig",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(-2000px)"},"100%":{opacity:"1","-wmso-transform":"translateX(0)"}}};break;case"fadeInRight":b.keyframes={name:"fadeInRight",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(20px)"},"100%":{opacity:"1","-wmso-transform":"translateX(0)"}}};break;case"fadeInRightBig":b.keyframes={name:"fadeInRightBig",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(2000px)"},"100%":{opacity:"1","-wmso-transform":"translateX(0)"}}};break;case"fadeInUp":b.keyframes={name:"fadeInUp",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(20px)"},"100%":{opacity:"1","-wmso-transform":"translateY(0)"}}};break;case"fadeInUpBig":b.keyframes={name:"fadeInUpBig",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(2000px)"},"100%":{opacity:"1","-wmso-transform":"translateY(0)"}}};break;case"fadeOut":b.keyframes={name:"fadeOut",frames:{"0%":{opacity:"1"},"100%":{opacity:"0"}}};break;case"fadeOutDown":b.keyframes={name:"fadeOutDown",frames:{"0%":{opacity:"1","-wmso-transform":"translateY(0)"},"100%":{opacity:"0","-wmso-transform":"translateY(20px)"}}};break;case"fadeOutDownBig":b.keyframes={name:"fadeOutDownBig",frames:{"0%":{opacity:"1","-wmso-transform":"translateY(0)"},"100%":{opacity:"0","-wmso-transform":"translateY(2000px)"}}};break;case"fadeOutLeft":b.keyframes={name:"fadeOutLeft",frames:{"0%":{opacity:"1","-wmso-transform":"translateX(0)"},"100%":{opacity:"0","-wmso-transform":"translateX(-20px)"}}};break;case"fadeOutLeftBig":b.keyframes={name:"fadeOutLeftBig",frames:{"0%":{opacity:"1","-wmso-transform":"translateX(0)"},"100%":{opacity:"0","-wmso-transform":"translateX(-2000px)"}}};break;case"fadeOutRight":b.keyframes={name:"fadeOutRight",frames:{"0%":{opacity:"1","-wmso-transform":"translateX(0)"},"100%":{opacity:"0","-wmso-transform":"translateX(20px)"}}};break;case"fadeOutRightBig":b.keyframes={name:"fadeOutRightBig",frames:{"0%":{opacity:"1","-wmso-transform":"translateX(0)"},"100%":{opacity:"0","-wmso-transform":"translateX(2000px)"}}};break;case"fadeOutUp":b.keyframes={name:"fadeOutUp",frames:{"0%":{opacity:"1","-wmso-transform":"translateY(0)"},"100%":{opacity:"0","-wmso-transform":"translateY(-20px)"}}};break;case"fadeOutUpBig":b.keyframes={name:"fadeOutUpBig",frames:{"0%":{opacity:"1","-wmso-transform":"translateY(0)"},"100%":{opacity:"0","-wmso-transform":"translateY(-2000px)"}}};break;case"flip":b.keyframes={name:"flip",frames:{"0%":{"-wmso-transform":"perspective(400px) translateZ(0) rotateY(0) scale(1)","animation-timing-function":"ease-out"},"40%":{"-wmso-transform":"perspective(400px) translateZ(150px) rotateY(170deg) scale(1)","animation-timing-function":"ease-out"},"50%":{"-wmso-transform":"perspective(400px) translateZ(150px) rotateY(190deg) scale(1)","animation-timing-function":"ease-in"},"80%":{"-wmso-transform":"perspective(400px) translateZ(0) rotateY(360deg) scale(.95)","animation-timing-function":"ease-in"},"100%":{"-wmso-transform":"perspective(400px) translateZ(0) rotateY(360deg) scale(1)","animation-timing-function":"ease-in"}}};break;case"flipInX":b.keyframes={name:"flipInX",frames:{"0%":{"-wmso-transform":"perspective(400px) rotateX(90deg)",opacity:"0"},"40%":{"-wmso-transform":"perspective(400px) rotateX(-10deg)"},"70%":{"-wmso-transform":"perspective(400px) rotateX(10deg)"},"100%":{"-wmso-transform":"perspective(400px) rotateX(0deg)",opacity:"1"}}};break;case"flipInY":b.keyframes={name:"flipInY",frames:{"0%":{"-wmso-transform":"perspective(400px) rotateY(90deg)",opacity:"0"},"40%":{"-wmso-transform":"perspective(400px) rotateY(-10deg)"},"70%":{"-wmso-transform":"perspective(400px) rotateY(10deg)"},"100%":{"-wmso-transform":"perspective(400px) rotateY(0deg)",opacity:"1"}}};break;case"flipOutX":b.keyframes={name:"flipOutX",frames:{"0%":{"-wmso-transform":"perspective(400px) rotateX(0deg)",opacity:"1"},"100%":{"-wmso-transform":"perspective(400px) rotateX(90deg)",opacity:"0"}}};break;case"flipOutY":b.keyframes={name:"flipOutY",frames:{"0%":{"-wmso-transform":"perspective(400px) rotateY(0deg)",opacity:"1"},"100%":{"-wmso-transform":"perspective(400px) rotateY(90deg)",opacity:"0"}}};break;case"lightSpeedIn":b.keyframes={name:"lightSpeedIn",frames:{"0%":{"-wmso-transform":"translateX(100%) skewX(-30deg)",opacity:"0"},"60%":{"-wmso-transform":"translateX(-20%) skewX(30deg)",opacity:"1"},"80%":{"-wmso-transform":"translateX(0%) skewX(-15deg)",opacity:"1"},"100%":{"-wmso-transform":"translateX(0%) skewX(0deg)",opacity:"1"}}};break;case"lightSpeedOut":b.keyframes={name:"lightSpeedOut",frames:{"0%":{"-wmso-transform":"translateX(0%) skewX(0deg)",opacity:"1"},"100%":{"-wmso-transform":"translateX(100%) skewX(-30deg)",opacity:"0"}}};break;case"rotateIn":b.keyframes={name:"rotateIn",frames:{"0%":{"transform-origin":"center center","-wmso-transform":"rotate(-200deg)",opacity:"0"},"100%":{"transform-origin":"center center","-wmso-transform":"rotate(0)",opacity:"1"}}};break;case"rotateInDownLeft":b.keyframes={name:"rotateInDownLeft",frames:{"0%":{"transform-origin":"left bottom","-wmso-transform":"rotate(-90deg)",opacity:"0"},"100%":{"transform-origin":"left bottom","-wmso-transform":"rotate(0)",opacity:"1"}}};break;case"rotateInDownRight":b.keyframes={name:"rotateInDownRight",frames:{"0%":{"transform-origin":"right bottom","-wmso-transform":"rotate(90deg)",opacity:"0"},"100%":{"transform-origin":"right bottom","-wmso-transform":"rotate(0)",opacity:"1"}}};break;case"rotateInUpLeft":b.keyframes={name:"rotateInUpLeft",frames:{"0%":{"transform-origin":"left bottom","-wmso-transform":"rotate(90deg)",opacity:"0"},"100%":{"transform-origin":"left bottom","-wmso-transform":"rotate(0)",opacity:"1"}}};break;case"rotateInUpRight":b.keyframes={name:"rotateInUpRight",frames:{"0%":{"transform-origin":"right bottom","-wmso-transform":"rotate(-90deg)",opacity:"0"},"100%":{"transform-origin":"right bottom","-wmso-transform":"rotate(0)",opacity:"1"}}};break;case"rotateOut":b.keyframes={name:"rotateOut",frames:{"0%":{"transform-origin":"center center","-wmso-transform":"rotate(0)",opacity:"1"},"100%":{"transform-origin":"center center","-wmso-transform":"rotate(200deg)",opacity:"0"}}};break;case"rotateOutDownLeft":b.keyframes={name:"rotateOutDownLeft",frames:{"0%":{"transform-origin":"left bottom","-wmso-transform":"rotate(0)",opacity:"1"},"100%":{"transform-origin":"left bottom","-wmso-transform":"rotate(90deg)",opacity:"0"}}};break;case"rotateOutDownRight":b.keyframes={name:"rotateOutDownRight",frames:{"0%":{"transform-origin":"right bottom","-wmso-transform":"rotate(0)",opacity:"1"},"100%":{"transform-origin":"right bottom","-wmso-transform":"rotate(-90deg)",opacity:"0"}}};break;case"rotateOutUpLeft":b.keyframes={name:"rotateOutUpLeft",frames:{"0%":{"transform-origin":"left bottom","-wmso-transform":"rotate(0)",opacity:"1"},"100%":{"transform-origin":"left bottom","-wmso-transform":"rotate(-90deg)",opacity:"0"}}};break;case"rotateOutUpRight":b.keyframes={name:"rotateOutUpRight",frames:{"0%":{"transform-origin":"right bottom","-wmso-transform":"rotate(0)",opacity:"1"},"100%":{"transform-origin":"right bottom","-wmso-transform":"rotate(90deg)",opacity:"0"}}};break;case"slideInDown":b.keyframes={name:"slideInDown",frames:{"0%":{opacity:"0","-wmso-transform":"translateY(-2000px)"},"100%":{"-wmso-transform":"translateY(0)"}}};break;case"slideInLeft":b.keyframes={name:"slideInLeft",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(-2000px)"},"100%":{"-wmso-transform":"translateX(0)"}}};break;case"slideInRight":b.keyframes={name:"slideInRight",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(2000px)"},"100%":{"-wmso-transform":"translateX(0)"}}};break;case"slideOutLeft":b.keyframes={name:"slideOutLeft",frames:{"0%":{"-wmso-transform":"translateX(0)"},"100%":{opacity:"0","-wmso-transform":"translateX(-2000px)"}}};break;case"slideOutRight":b.keyframes={name:"slideOutRight",frames:{"0%":{"-wmso-transform":"translateX(0)"},"100%":{opacity:"0","-wmso-transform":"translateX(2000px)"}}};break;case"slideOutUp":b.keyframes={name:"slideOutUp",frames:{"0%":{"-wmso-transform":"translateY(0)"},"100%":{opacity:"0","-wmso-transform":"translateY(-2000px)"}}};break;case"hinge":b.keyframes={name:"hinge",frames:{"0%":{"-wmso-transform":"rotate(0)","transform-origin":"top left","animation-timing-function":"ease-in-out"},"20%, 60%":{"-wmso-transform":"rotate(80deg)","transform-origin":"top left","animation-timing-function":"ease-in-out"},"40%":{"-wmso-transform":"rotate(60deg)","transform-origin":"top left","animation-timing-function":"ease-in-out"},"80%":{"-wmso-transform":"rotate(60deg) translateY(0)",opacity:"1","transform-origin":"top left","animation-timing-function":"ease-in-out"},"100%":{"-wmso-transform":"translateY(700px)",opacity:"0"}}};
break;case"rollIn":b.keyframes={name:"rollIn",frames:{"0%":{opacity:"0","-wmso-transform":"translateX(-100%) rotate(-120deg)"},"100%":{opacity:"1","-wmso-transform":"translateX(0px) rotate(0deg)"}}};break;case"rollOut":b.keyframes={name:"rollOut",frames:{"0%":{opacity:"1","-wmso-transform":"translateX(0px) rotate(0deg)"},"100%":{opacity:"0","-wmso-transform":"translateX(100%) rotate(120deg)"}}}}return b},a.lib.molecules.cf=function(a){var b={},c={content:'" "',display:"table",clear:"both"};switch(a){case"before":b["&:before"]=c;break;case"after":b["&:after"]=c;break;default:b["&:before"]=c,b["&:after"]=c}return b},a.lib.molecules.grid=function(a){var c=b("../../helpers/args")(a);if(2==c.length){var d={cf:"both"};return d[c[1]]={fl:"l","-mw-bxz":"bb",wid:(100/parseInt(c[0])).toFixed(2)+"%"},d}return{}},a.lib.molecules.moveto=function(a){var c=b("../../helpers/units"),d=b("../../helpers/args")(a),e=c(d[0]&&""!=d[0]?d[0]:0,"px"),f=c(d[1]&&""!=d[1]?d[1]:0,"px"),g=c(d[2]&&""!=d[2]?d[2]:0,"px");return 2==d.length?{"-ws-trf":">translate("+e+","+f+")"}:3==d.length?{"-ws-trf":">translate3d("+e+","+f+","+g+")"}:void 0},a.lib.molecules.rotateto=function(a){var c=b("../../helpers/units"),d=b("../../helpers/args")(a);return 1==d.length?{"-ws-trf":">rotate("+c(d[0],"deg")+")"}:void 0},a.lib.molecules.scaleto=function(a){var c=b("../../helpers/args")(a),d=c[0]&&""!=c[0]?c[0]:0,e=c[1]&&""!=c[1]?c[1]:0;return 2==c.length?{"-ws-trf":">scale("+d+","+e+")"}:void 0},a.lib.molecules.size=function(a){var c=b("../../helpers/units"),d=b("../../helpers/args")(a),e={};return 2==d.length?(""!=d[0]&&(e.width=c(d[0])),""!=d[1]&&(e.height=c(d[1])),e):{width:c(d[0]),height:c(d[0])}},a.lib.molecules.transparent=function(a){var c=(b("../../helpers/args")(a),{});return a=parseFloat(a),c["-s-filter"]="progid:DXImageTransform.Microsoft.Alpha(Opacity="+100*a+")",c.filter="alpha(opacity="+100*a+")",c["-m-opacity"]=a,c.opacity=a,c.KhtmlOpacity=a,c},a.index}(window); | gogoleva/cdnjs | ajax/libs/absurd/0.3.135/absurd.organic.min.js | JavaScript | mit | 33,989 |
/*! SWFMini - a SWFObject 2.2 cut down version for webshims
*
* based on SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfmini=function(){function a(){if(!s){s=!0;for(var a=r.length,b=0;a>b;b++)r[b]()}}function b(a){s?a():r[r.length]=a}function c(){q&&d()}function d(){var a=o.getElementsByTagName("body")[0],b=e(i);b.setAttribute("type",m);var c=a.appendChild(b);if(c){var d=0;!function(){if(typeof c.GetVariable!=h){var e=c.GetVariable("$version");e&&(e=e.split(" ")[1].split(","),u.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)])}else if(10>d)return d++,void setTimeout(arguments.callee,10);a.removeChild(b),c=null}()}}function e(a){return o.createElement(a)}function f(a){var b=u.pv,c=a.split(".");return c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0,b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}var g=function(){j.error("This method was removed from swfmini")},h="undefined",i="object",j=window.webshims,k="Shockwave Flash",l="ShockwaveFlash.ShockwaveFlash",m="application/x-shockwave-flash",n=window,o=document,p=navigator,q=!1,r=[c],s=!1,t=!0,u=function(){var a=typeof o.getElementById!=h&&typeof o.getElementsByTagName!=h&&typeof o.createElement!=h,b=p.userAgent.toLowerCase(),c=p.platform.toLowerCase(),d=/win/.test(c?c:b),e=/mac/.test(c?c:b),f=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,g=!1,j=[0,0,0],r=null;if(typeof p.plugins!=h&&typeof p.plugins[k]==i)r=p.plugins[k].description,!r||typeof p.mimeTypes!=h&&p.mimeTypes[m]&&!p.mimeTypes[m].enabledPlugin||(q=!0,g=!1,r=r.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),j[0]=parseInt(r.replace(/^(.*)\..*$/,"$1"),10),j[1]=parseInt(r.replace(/^.*\.(.*)\s.*$/,"$1"),10),j[2]=/[a-zA-Z]/.test(r)?parseInt(r.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof n.ActiveXObject!=h)try{var s=new ActiveXObject(l);s&&(r=s.GetVariable("$version"),r&&(g=!0,r=r.split(" ")[1].split(","),j=[parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10)]))}catch(t){}return{w3:a,pv:j,wk:f,ie:g,win:d,mac:e}}();j.ready("DOM",a),j.loader.addModule("swfmini-embed",{d:["swfmini"]});var v=f("9.0.0")?function(){return j.loader.loadList(["swfmini-embed"]),!0}:j.$.noop;return j.support.mediaelement?j.ready("WINDOWLOAD",v):v(),{registerObject:g,getObjectById:g,embedSWF:function(a,b,c,d,e,f,g,h,i,k){var l=arguments;v()?j.ready("swfmini-embed",function(){swfmini.embedSWF.apply(swfmini,l)}):k&&k({success:!1,id:b})},switchOffAutoHideShow:function(){t=!1},ua:u,getFlashPlayerVersion:function(){return{major:u.pv[0],minor:u.pv[1],release:u.pv[2]}},hasFlashPlayerVersion:f,createSWF:function(a,b,c){return u.w3?createSWF(a,b,c):void 0},showExpressInstall:g,removeSWF:g,createCSS:g,addDomLoadEvent:b,addLoadEvent:g,expressInstallCallback:g}}();webshims.isReady("swfmini",!0); | htmlstrap/cdnjs | ajax/libs/webshim/1.14.4-RC4/minified/shims/swfmini.js | JavaScript | mit | 2,908 |
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-05-16 14:36:50 (f9be68accb407158ba2b1be2c226a6ce1f649314)
*/
/**
* @docauthor Jason Johnston <jason@sencha.com>
*
* A basic text field. Can be used as a direct replacement for traditional text inputs,
* or as the base class for more sophisticated input controls (like {@link Ext.form.field.TextArea}
* and {@link Ext.form.field.ComboBox}). Has support for empty-field placeholder values (see {@link #emptyText}).
*
* # Validation
*
* The Text field has a useful set of validations built in:
*
* - {@link #allowBlank} for making the field required
* - {@link #minLength} for requiring a minimum value length
* - {@link #maxLength} for setting a maximum value length (with {@link #enforceMaxLength} to add it
* as the `maxlength` attribute on the input element)
* - {@link #regex} to specify a custom regular expression for validation
*
* In addition, custom validations may be added:
*
* - {@link #vtype} specifies a virtual type implementation from {@link Ext.form.field.VTypes} which can contain
* custom validation logic
* - {@link #validator} allows a custom arbitrary function to be called during validation
*
* The details around how and when each of these validation options get used are described in the
* documentation for {@link #getErrors}.
*
* By default, the field value is checked for validity immediately while the user is typing in the
* field. This can be controlled with the {@link #validateOnChange}, {@link #checkChangeEvents}, and
* {@link #checkChangeBuffer} configurations. Also see the details on Form Validation in the
* {@link Ext.form.Panel} class documentation.
*
* # Masking and Character Stripping
*
* Text fields can be configured with custom regular expressions to be applied to entered values before
* validation: see {@link #maskRe} and {@link #stripCharsRe} for details.
*
* # Example usage
*
* @example
* Ext.create('Ext.form.Panel', {
* title: 'Contact Info',
* width: 300,
* bodyPadding: 10,
* renderTo: Ext.getBody(),
* items: [{
* xtype: 'textfield',
* name: 'name',
* fieldLabel: 'Name',
* allowBlank: false // requires a non-empty value
* }, {
* xtype: 'textfield',
* name: 'email',
* fieldLabel: 'Email Address',
* vtype: 'email' // requires value to be a valid email address format
* }]
* });
*/
Ext.define('Ext.form.field.Text', {
extend:'Ext.form.field.Base',
alias: 'widget.textfield',
requires: ['Ext.form.field.VTypes', 'Ext.layout.component.field.Text'],
alternateClassName: ['Ext.form.TextField', 'Ext.form.Text'],
/**
* @cfg {String} vtypeText
* A custom error message to display in place of the default message provided for the **`{@link #vtype}`** currently
* set for this field. **Note**: only applies if **`{@link #vtype}`** is set, else ignored.
*/
/**
* @cfg {RegExp} stripCharsRe
* A JavaScript RegExp object used to strip unwanted content from the value
* during input. If `stripCharsRe` is specified,
* every *character sequence* matching `stripCharsRe` will be removed.
*/
/**
* @cfg {Number} size
* An initial value for the 'size' attribute on the text input element. This is only used if the field has no
* configured {@link #width} and is not given a width by its container's layout. Defaults to 20.
*/
size: 20,
/**
* @cfg {Boolean} [grow=false]
* true if this field should automatically grow and shrink to its content
*/
/**
* @cfg {Number} growMin
* The minimum width to allow when `{@link #grow} = true`
*/
growMin : 30,
/**
* @cfg {Number} growMax
* The maximum width to allow when `{@link #grow} = true`
*/
growMax : 800,
//<locale>
/**
* @cfg {String} growAppend
* A string that will be appended to the field's current value for the purposes of calculating the target field
* size. Only used when the {@link #grow} config is true. Defaults to a single capital "W" (the widest character in
* common fonts) to leave enough space for the next typed character and avoid the field value shifting before the
* width is adjusted.
*/
growAppend: 'W',
//</locale>
/**
* @cfg {String} vtype
* A validation type name as defined in {@link Ext.form.field.VTypes}
*/
/**
* @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes (character being
* typed) that do not match.
* Note: It does not filter characters already in the input.
*/
/**
* @cfg {Boolean} [disableKeyFilter=false]
* Specify true to disable input keystroke filtering
*/
/**
* @cfg {Boolean} [allowBlank=true]
* Specify false to validate that the value's length must be > 0. If `true`, then a blank value is **always** taken to be valid regardless of any {@link #vtype}
* validation that may be applied.
*
* If {@link #vtype} validation must still be applied to blank values, configure {@link #validateBlank} as `true`;
*/
allowBlank : true,
/**
* @cfg {Boolean} [validateBlank=false]
* Specify as `true` to modify the behaviour of {@link #allowBlank} so that blank values are not passed as valid, but are subject to any configure {@link #vtype} validation.
*/
validateBlank: false,
/**
* @cfg {Boolean} allowOnlyWhitespace
* Specify false to automatically trim the value before validating
* the whether the value is blank. Setting this to false automatically
* sets {@link #allowBlank} to false.
*/
allowOnlyWhitespace: true,
/**
* @cfg {Number} minLength
* Minimum input field length required
*/
minLength : 0,
/**
* @cfg {Number} maxLength
* Maximum input field length allowed by validation. This behavior is intended to
* provide instant feedback to the user by improving usability to allow pasting and editing or overtyping and back
* tracking. To restrict the maximum number of characters that can be entered into the field use the
* **{@link Ext.form.field.Text#enforceMaxLength enforceMaxLength}** option.
*
* Defaults to Number.MAX_VALUE.
*/
maxLength : Number.MAX_VALUE,
/**
* @cfg {Boolean} enforceMaxLength
* True to set the maxLength property on the underlying input field. Defaults to false
*/
//<locale>
/**
* @cfg {String} minLengthText
* Error text to display if the **{@link #minLength minimum length}** validation fails.
*/
minLengthText : 'The minimum length for this field is {0}',
//</locale>
//<locale>
/**
* @cfg {String} maxLengthText
* Error text to display if the **{@link #maxLength maximum length}** validation fails
*/
maxLengthText : 'The maximum length for this field is {0}',
//</locale>
/**
* @cfg {Boolean} [selectOnFocus=false]
* true to automatically select any existing field text when the field receives input focus
*/
//<locale>
/**
* @cfg {String} blankText
* The error text to display if the **{@link #allowBlank}** validation fails
*/
blankText : 'This field is required',
//</locale>
/**
* @cfg {Function} validator
* A custom validation function to be called during field validation ({@link #getErrors}).
* If specified, this function will be called first, allowing the developer to override the default validation
* process.
*
* This function will be passed the following parameters:
*
* @cfg {Object} validator.value The current field value
* @cfg {Boolean/String} validator.return
*
* - True if the value is valid
* - An error message if the value is invalid
*/
/**
* @cfg {RegExp} regex
* A JavaScript RegExp object to be tested against the field value during validation.
* If the test fails, the field will be marked invalid using
* either **{@link #regexText}** or **{@link #invalidText}**.
*/
/**
* @cfg {String} regexText
* The error text to display if **{@link #regex}** is used and the test fails during validation
*/
regexText : '',
/**
* @cfg {String} emptyText
* The default text to place into an empty field.
*
* Note that normally this value will be submitted to the server if this field is enabled; to prevent this you can
* set the {@link Ext.form.action.Action#submitEmptyText submitEmptyText} option of {@link Ext.form.Basic#submit} to
* false.
*
* Also note that if you use {@link #inputType inputType}:'file', {@link #emptyText} is not supported and should be
* avoided.
*
* Note that for browsers that support it, setting this property will use the HTML 5 placeholder attribute, and for
* older browsers that don't support the HTML 5 placeholder attribute the value will be placed directly into the input
* element itself as the raw value. This means that older browsers will obfuscate the {@link #emptyText} value for
* password input fields.
*/
/**
* @cfg {String} [emptyCls='x-form-empty-field']
* The CSS class to apply to an empty field to style the **{@link #emptyText}**.
* This class is automatically added and removed as needed depending on the current field value.
*/
emptyCls : Ext.baseCSSPrefix + 'form-empty-field',
/**
* @cfg {String} [requiredCls='x-form-required-field']
* The CSS class to apply to a required field, i.e. a field where **{@link #allowBlank}** is false.
*/
requiredCls : Ext.baseCSSPrefix + 'form-required-field',
/**
* @cfg {Boolean} [enableKeyEvents=false]
* true to enable the proxying of key events for the HTML input field
*/
componentLayout: 'textfield',
// private
valueContainsPlaceholder : false,
initComponent: function () {
var me = this;
if (me.allowOnlyWhitespace === false) {
me.allowBlank = false;
}
me.callParent();
me.addEvents(
/**
* @event autosize
* Fires when the **{@link #autoSize}** function is triggered and the field is resized according to the
* {@link #grow}/{@link #growMin}/{@link #growMax} configs as a result. This event provides a hook for the
* developer to apply additional logic at runtime to resize the field if needed.
* @param {Ext.form.field.Text} this This text field
* @param {Number} width The new field width
*/
'autosize',
/**
* @event keydown
* Keydown input field event. This event only fires if **{@link #enableKeyEvents}** is set to true.
* @param {Ext.form.field.Text} this This text field
* @param {Ext.EventObject} e
*/
'keydown',
/**
* @event keyup
* Keyup input field event. This event only fires if **{@link #enableKeyEvents}** is set to true.
* @param {Ext.form.field.Text} this This text field
* @param {Ext.EventObject} e
*/
'keyup',
/**
* @event keypress
* Keypress input field event. This event only fires if **{@link #enableKeyEvents}** is set to true.
* @param {Ext.form.field.Text} this This text field
* @param {Ext.EventObject} e
*/
'keypress'
);
me.addStateEvents('change');
me.setGrowSizePolicy();
},
// private
setGrowSizePolicy: function(){
if (this.grow) {
this.shrinkWrap |= 1; // width must shrinkWrap
}
},
// private
initEvents : function(){
var me = this,
el = me.inputEl;
me.callParent();
if(me.selectOnFocus || me.emptyText){
me.mon(el, 'mousedown', me.onMouseDown, me);
}
if(me.maskRe || (me.vtype && me.disableKeyFilter !== true && (me.maskRe = Ext.form.field.VTypes[me.vtype+'Mask']))){
me.mon(el, 'keypress', me.filterKeys, me);
}
if (me.enableKeyEvents) {
me.mon(el, {
scope: me,
keyup: me.onKeyUp,
keydown: me.onKeyDown,
keypress: me.onKeyPress
});
}
},
/**
* @private
* Override. Treat undefined and null values as equal to an empty string value.
*/
isEqual: function(value1, value2) {
return this.isEqualAsString(value1, value2);
},
/**
* @private
* If grow=true, invoke the autoSize method when the field's value is changed.
*/
onChange: function(newVal, oldVal) {
this.callParent(arguments);
this.autoSize();
},
getSubTplData: function() {
var me = this,
value = me.getRawValue(),
isEmpty = me.emptyText && value.length < 1,
maxLength = me.maxLength,
placeholder;
// We can't just dump the value here, since MAX_VALUE ends up
// being something like 1.xxxxe+300, which gets interpreted as 1
// in the markup
if (me.enforceMaxLength) {
if (maxLength === Number.MAX_VALUE) {
maxLength = undefined;
}
} else {
maxLength = undefined;
}
if (isEmpty) {
if (Ext.supports.Placeholder) {
placeholder = me.emptyText;
} else {
value = me.emptyText;
me.valueContainsPlaceholder = true;
}
}
return Ext.apply(me.callParent(), {
maxLength : maxLength,
readOnly : me.readOnly,
placeholder : placeholder,
value : value,
fieldCls : me.fieldCls + ((isEmpty && (placeholder || value)) ? ' ' + me.emptyCls : '') + (me.allowBlank ? '' : ' ' + me.requiredCls)
});
},
afterRender: function(){
this.autoSize();
this.callParent();
},
onMouseDown: function(e){
var me = this;
if(!me.hasFocus){
me.mon(me.inputEl, 'mouseup', Ext.emptyFn, me, { single: true, preventDefault: true });
}
},
/**
* Performs any necessary manipulation of a raw String value to prepare it for conversion and/or
* {@link #validate validation}. For text fields this applies the configured {@link #stripCharsRe}
* to the raw value.
* @param {String} value The unprocessed string value
* @return {String} The processed string value
*/
processRawValue: function(value) {
var me = this,
stripRe = me.stripCharsRe,
newValue;
if (stripRe) {
newValue = value.replace(stripRe, '');
if (newValue !== value) {
me.setRawValue(newValue);
value = newValue;
}
}
return value;
},
//private
onDisable: function(){
this.callParent();
if (Ext.isIE) {
this.inputEl.dom.unselectable = 'on';
}
},
//private
onEnable: function(){
this.callParent();
if (Ext.isIE) {
this.inputEl.dom.unselectable = '';
}
},
onKeyDown: function(e) {
this.fireEvent('keydown', this, e);
},
onKeyUp: function(e) {
this.fireEvent('keyup', this, e);
},
onKeyPress: function(e) {
this.fireEvent('keypress', this, e);
},
/**
* Resets the current field value to the originally-loaded value and clears any validation messages.
* Also adds **{@link #emptyText}** and **{@link #emptyCls}** if the original value was blank.
*/
reset : function(){
this.callParent();
this.applyEmptyText();
},
applyEmptyText : function(){
var me = this,
emptyText = me.emptyText,
isEmpty;
if (me.rendered && emptyText) {
isEmpty = me.getRawValue().length < 1 && !me.hasFocus;
if (Ext.supports.Placeholder) {
me.inputEl.dom.placeholder = emptyText;
} else if (isEmpty) {
me.setRawValue(emptyText);
me.valueContainsPlaceholder = true;
}
//all browsers need this because of a styling issue with chrome + placeholders.
//the text isnt vertically aligned when empty (and using the placeholder)
if (isEmpty) {
me.inputEl.addCls(me.emptyCls);
}
me.autoSize();
}
},
afterFirstLayout: function() {
this.callParent();
if (Ext.isIE && this.disabled) {
var el = this.inputEl;
if (el) {
el.dom.unselectable = 'on';
}
}
},
// private
beforeFocus : function(){
var me = this,
inputEl = me.inputEl,
emptyText = me.emptyText,
isEmpty;
me.callParent(arguments);
if ((emptyText && !Ext.supports.Placeholder) && (inputEl.dom.value === me.emptyText && me.valueContainsPlaceholder)) {
me.setRawValue('');
isEmpty = true;
inputEl.removeCls(me.emptyCls);
me.valueContainsPlaceholder = false;
} else if (Ext.supports.Placeholder) {
me.inputEl.removeCls(me.emptyCls);
}
if (me.selectOnFocus || isEmpty) {
// see: http://code.google.com/p/chromium/issues/detail?id=4505
if (Ext.isWebKit) {
if (!me.inputFocusTask) {
me.inputFocusTask = new Ext.util.DelayedTask(me.focusInput, me);
}
me.inputFocusTask.delay(1);
} else {
inputEl.dom.select();
}
}
},
focusInput: function(){
var input = this.inputEl;
if (input) {
input = input.dom;
if (input) {
input.select();
}
}
},
onFocus: function() {
var me = this;
me.callParent(arguments);
if (me.emptyText) {
me.autoSize();
}
},
// private
postBlur : function(){
this.callParent(arguments);
this.applyEmptyText();
},
// private
filterKeys : function(e){
/*
* On European keyboards, the right alt key, Alt Gr, is used to type certain special characters.
* JS detects a keypress of this as ctrlKey & altKey. As such, we check that alt isn't pressed
* so we can still process these special characters.
*/
if (e.ctrlKey && !e.altKey) {
return;
}
var key = e.getKey(),
charCode = String.fromCharCode(e.getCharCode());
if((Ext.isGecko || Ext.isOpera) && (e.isNavKeyPress() || key === e.BACKSPACE || (key === e.DELETE && e.button === -1))){
return;
}
if((!Ext.isGecko && !Ext.isOpera) && e.isSpecialKey() && !charCode){
return;
}
if(!this.maskRe.test(charCode)){
e.stopEvent();
}
},
getState: function() {
return this.addPropertyToState(this.callParent(), 'value');
},
applyState: function(state) {
this.callParent(arguments);
if(state.hasOwnProperty('value')) {
this.setValue(state.value);
}
},
/**
* Returns the raw String value of the field, without performing any normalization, conversion, or validation. Gets
* the current value of the input element if the field has been rendered, ignoring the value if it is the
* {@link #emptyText}. To get a normalized and converted value see {@link #getValue}.
* @return {String} The raw String value of the field
*/
getRawValue: function() {
var me = this,
v = me.callParent();
if (v === me.emptyText && me.valueContainsPlaceholder) {
v = '';
}
return v;
},
/**
* Sets a data value into the field and runs the change detection and validation. Also applies any configured
* {@link #emptyText} for text fields. To set the value directly without these inspections see {@link #setRawValue}.
* @param {Object} value The value to set
* @return {Ext.form.field.Text} this
*/
setValue: function(value) {
var me = this,
inputEl = me.inputEl;
if (inputEl && me.emptyText && !Ext.isEmpty(value)) {
inputEl.removeCls(me.emptyCls);
me.valueContainsPlaceholder = false;
}
me.callParent(arguments);
me.applyEmptyText();
return me;
},
/**
* Validates a value according to the field's validation rules and returns an array of errors
* for any failing validations. Validation rules are processed in the following order:
*
* 1. **Field specific validator**
*
* A validator offers a way to customize and reuse a validation specification.
* If a field is configured with a `{@link #validator}`
* function, it will be passed the current field value. The `{@link #validator}`
* function is expected to return either:
*
* - Boolean `true` if the value is valid (validation continues).
* - a String to represent the invalid message if invalid (validation halts).
*
* 2. **Basic Validation**
*
* If the `{@link #validator}` has not halted validation,
* basic validation proceeds as follows:
*
* - `{@link #allowBlank}` : (Invalid message = `{@link #blankText}`)
*
* Depending on the configuration of `{@link #allowBlank}`, a
* blank field will cause validation to halt at this step and return
* Boolean true or false accordingly.
*
* - `{@link #minLength}` : (Invalid message = `{@link #minLengthText}`)
*
* If the passed value does not satisfy the `{@link #minLength}`
* specified, validation halts.
*
* - `{@link #maxLength}` : (Invalid message = `{@link #maxLengthText}`)
*
* If the passed value does not satisfy the `{@link #maxLength}`
* specified, validation halts.
*
* 3. **Preconfigured Validation Types (VTypes)**
*
* If none of the prior validation steps halts validation, a field
* configured with a `{@link #vtype}` will utilize the
* corresponding {@link Ext.form.field.VTypes VTypes} validation function.
* If invalid, either the field's `{@link #vtypeText}` or
* the VTypes vtype Text property will be used for the invalid message.
* Keystrokes on the field will be filtered according to the VTypes
* vtype Mask property.
*
* 4. **Field specific regex test**
*
* If none of the prior validation steps halts validation, a field's
* configured `{@link #regex}` test will be processed.
* The invalid message for this test is configured with `{@link #regexText}`
*
* @param {Object} value The value to validate. The processed raw value will be used if nothing is passed.
* @return {String[]} Array of any validation errors
*/
getErrors: function(value) {
var me = this,
errors = me.callParent(arguments),
validator = me.validator,
vtype = me.vtype,
vtypes = Ext.form.field.VTypes,
regex = me.regex,
format = Ext.String.format,
msg, trimmed, isBlank;
value = value || me.processRawValue(me.getRawValue());
if (Ext.isFunction(validator)) {
msg = validator.call(me, value);
if (msg !== true) {
errors.push(msg);
}
}
trimmed = me.allowOnlyWhitespace ? value : Ext.String.trim(value);
if (trimmed.length < 1 || (value === me.emptyText && me.valueContainsPlaceholder)) {
if (!me.allowBlank) {
errors.push(me.blankText);
}
// If we are not configured to validate blank values, there cannot be any additional errors
if (!me.validateBlank) {
return errors;
}
isBlank = true;
}
// If a blank value has been allowed through, then exempt it dfrom the minLength check.
// It must be allowed to hit the vtype validation.
if (!isBlank && value.length < me.minLength) {
errors.push(format(me.minLengthText, me.minLength));
}
if (value.length > me.maxLength) {
errors.push(format(me.maxLengthText, me.maxLength));
}
if (vtype) {
if (!vtypes[vtype](value, me)) {
errors.push(me.vtypeText || vtypes[vtype +'Text']);
}
}
if (regex && !regex.test(value)) {
errors.push(me.regexText || me.invalidText);
}
return errors;
},
/**
* Selects text in this field
* @param {Number} [start=0] The index where the selection should start
* @param {Number} [end] The index where the selection should end (defaults to the text length)
*/
selectText : function(start, end){
var me = this,
v = me.getRawValue(),
doFocus = true,
el = me.inputEl.dom,
undef,
range;
if (v.length > 0) {
start = start === undef ? 0 : start;
end = end === undef ? v.length : end;
if (el.setSelectionRange) {
el.setSelectionRange(start, end);
}
else if(el.createTextRange) {
range = el.createTextRange();
range.moveStart('character', start);
range.moveEnd('character', end - v.length);
range.select();
}
doFocus = Ext.isGecko || Ext.isOpera;
}
if (doFocus) {
me.focus();
}
},
/**
* Automatically grows the field to accomodate the width of the text up to the maximum field width allowed. This
* only takes effect if {@link #grow} = true, and fires the {@link #autosize} event if the width changes.
*/
autoSize: function() {
var me = this;
if (me.grow && me.rendered) {
me.autoSizing = true;
me.updateLayout();
}
},
afterComponentLayout: function() {
var me = this,
width;
me.callParent(arguments);
if (me.autoSizing) {
width = me.inputEl.getWidth();
if (width !== me.lastInputWidth) {
me.fireEvent('autosize', me, width);
me.lastInputWidth = width;
delete me.autoSizing;
}
}
},
onDestroy: function(){
var me = this;
me.callParent();
if (me.inputFocusTask) {
me.inputFocusTask.cancel();
me.inputFocusTask = null;
}
}
});
| pwnall/cdnjs | ajax/libs/extjs/4.2.1/src/form/field/Text.js | JavaScript | mit | 28,161 |
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @requires OpenLayers/Format/WMSCapabilities/v1.js
*/
/**
* Class: OpenLayers.Format.WMSCapabilities/v1_3
* Abstract base class for WMS Capabilities version 1.3.X.
* SLD 1.1.0 adds in the extra operations DescribeLayer and GetLegendGraphic,
* see: http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd
*
* Inherits from:
* - <OpenLayers.Format.WMSCapabilities.v1>
*/
OpenLayers.Format.WMSCapabilities.v1_3 = OpenLayers.Class(
OpenLayers.Format.WMSCapabilities.v1, {
/**
* Property: readers
* Contains public functions, grouped by namespace prefix, that will
* be applied when a namespaced node is found matching the function
* name. The function will be applied in the scope of this parser
* with two arguments: the node being read and a context object passed
* from the parent.
*/
readers: {
"wms": OpenLayers.Util.applyDefaults({
"WMS_Capabilities": function(node, obj) {
this.readChildNodes(node, obj);
},
"LayerLimit": function(node, obj) {
obj.layerLimit = parseInt(this.getChildValue(node));
},
"MaxWidth": function(node, obj) {
obj.maxWidth = parseInt(this.getChildValue(node));
},
"MaxHeight": function(node, obj) {
obj.maxHeight = parseInt(this.getChildValue(node));
},
"BoundingBox": function(node, obj) {
var bbox = OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"].BoundingBox.apply(this, [node, obj]);
bbox.srs = node.getAttribute("CRS");
obj.bbox[bbox.srs] = bbox;
},
"CRS": function(node, obj) {
// CRS is the synonym of SRS
this.readers.wms.SRS.apply(this, [node, obj]);
},
"EX_GeographicBoundingBox": function(node, obj) {
// replacement of LatLonBoundingBox
obj.llbbox = [];
this.readChildNodes(node, obj.llbbox);
},
"westBoundLongitude": function(node, obj) {
obj[0] = this.getChildValue(node);
},
"eastBoundLongitude": function(node, obj) {
obj[2] = this.getChildValue(node);
},
"southBoundLatitude": function(node, obj) {
obj[1] = this.getChildValue(node);
},
"northBoundLatitude": function(node, obj) {
obj[3] = this.getChildValue(node);
},
"MinScaleDenominator": function(node, obj) {
obj.maxScale = parseFloat(this.getChildValue(node)).toPrecision(16);
},
"MaxScaleDenominator": function(node, obj) {
obj.minScale = parseFloat(this.getChildValue(node)).toPrecision(16);
},
"Dimension": function(node, obj) {
// dimension has extra attributes: default, multipleValues,
// nearestValue, current which used to be part of Extent. It now
// also contains the values.
var name = node.getAttribute("name").toLowerCase();
var dim = {
name: name,
units: node.getAttribute("units"),
unitsymbol: node.getAttribute("unitSymbol"),
nearestVal: node.getAttribute("nearestValue") === "1",
multipleVal: node.getAttribute("multipleValues") === "1",
"default": node.getAttribute("default") || "",
current: node.getAttribute("current") === "1",
values: this.getChildValue(node).split(",")
};
// Theoretically there can be more dimensions with the same
// name, but with a different unit. Until we meet such a case,
// let's just keep the same structure as the WMS 1.1
// GetCapabilities parser uses. We will store the last
// one encountered.
obj.dimensions[dim.name] = dim;
},
"Keyword": function(node, obj) {
// TODO: should we change the structure of keyword in v1.js?
// Make it an object with a value instead of a string?
var keyword = {value: this.getChildValue(node),
vocabulary: node.getAttribute("vocabulary")};
if (obj.keywords) {
obj.keywords.push(keyword);
}
}
}, OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"]),
"sld": {
"UserDefinedSymbolization": function(node, obj) {
this.readers.wms.UserDefinedSymbolization.apply(this, [node, obj]);
// add the two extra attributes
obj.userSymbols.inlineFeature = parseInt(node.getAttribute("InlineFeature")) == 1;
obj.userSymbols.remoteWCS = parseInt(node.getAttribute("RemoteWCS")) == 1;
},
"DescribeLayer": function(node, obj) {
this.readers.wms.DescribeLayer.apply(this, [node, obj]);
},
"GetLegendGraphic": function(node, obj) {
this.readers.wms.GetLegendGraphic.apply(this, [node, obj]);
}
}
},
CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_3"
});
| mgax/cdnjs | ajax/libs/openlayers/2.12/lib/OpenLayers/Format/WMSCapabilities/v1_3.js | JavaScript | mit | 5,893 |
/*
* Globalize Culture tr-TR
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this file need to be fixed in the generator
*/
(function( window, undefined ) {
var Globalize;
if ( typeof require !== "undefined" &&
typeof exports !== "undefined" &&
typeof module !== "undefined" ) {
// Assume CommonJS
Globalize = require( "globalize" );
} else {
// Global variable
Globalize = window.Globalize;
}
Globalize.addCultureInfo( "tr-TR", "default", {
name: "tr-TR",
englishName: "Turkish (Turkey)",
nativeName: "Türkçe (Türkiye)",
language: "tr",
numberFormat: {
",": ".",
".": ",",
percent: {
pattern: ["-%n","%n"],
",": ".",
".": ","
},
currency: {
pattern: ["-n $","n $"],
",": ".",
".": ",",
symbol: "TL"
}
},
calendars: {
standard: {
"/": ".",
firstDay: 1,
days: {
names: ["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],
namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],
namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]
},
months: {
names: ["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],
namesAbbr: ["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""]
},
AM: null,
PM: null,
patterns: {
d: "dd.MM.yyyy",
D: "dd MMMM yyyy dddd",
t: "HH:mm",
T: "HH:mm:ss",
f: "dd MMMM yyyy dddd HH:mm",
F: "dd MMMM yyyy dddd HH:mm:ss",
M: "dd MMMM",
Y: "MMMM yyyy"
}
}
}
});
}( this ));
| fatso83/cdnjs | ajax/libs/globalize/0.1.1/cultures/globalize.culture.tr-TR.js | JavaScript | mit | 1,757 |
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2015, 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. (http://ellislab.com/)
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link http://codeigniter.com
* @since Version 3.0.0
* @filesource
*/
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* CodeIgniter Session Memcached Driver
*
* @package CodeIgniter
* @subpackage Libraries
* @category Sessions
* @author Andrey Andreev
* @link http://codeigniter.com/user_guide/libraries/sessions.html
*/
class CI_Session_memcached_driver extends CI_Session_driver implements SessionHandlerInterface {
/**
* Memcached instance
*
* @var Memcached
*/
protected $_memcached;
/**
* Key prefix
*
* @var string
*/
protected $_key_prefix = 'ci_session:';
/**
* Lock key
*
* @var string
*/
protected $_lock_key;
// ------------------------------------------------------------------------
/**
* Class constructor
*
* @param array $params Configuration parameters
* @return void
*/
public function __construct(&$params)
{
parent::__construct($params);
if (empty($this->_config['save_path']))
{
log_message('error', 'Session: No Memcached save path configured.');
}
if ($this->_config['match_ip'] === TRUE)
{
$this->_key_prefix .= $_SERVER['REMOTE_ADDR'].':';
}
}
// ------------------------------------------------------------------------
/**
* Open
*
* Sanitizes save_path and initializes connections.
*
* @param string $save_path Server path(s)
* @param string $name Session cookie name, unused
* @return bool
*/
public function open($save_path, $name)
{
$this->_memcached = new Memcached();
$this->_memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, TRUE); // required for touch() usage
$server_list = array();
foreach ($this->_memcached->getServerList() as $server)
{
$server_list[] = $server['host'].':'.$server['port'];
}
if ( ! preg_match_all('#,?([^,:]+)\:(\d{1,5})(?:\:(\d+))?#', $this->_config['save_path'], $matches, PREG_SET_ORDER))
{
$this->_memcached = NULL;
log_message('error', 'Session: Invalid Memcached save path format: '.$this->_config['save_path']);
return FALSE;
}
foreach ($matches as $match)
{
// If Memcached already has this server (or if the port is invalid), skip it
if (in_array($match[1].':'.$match[2], $server_list, TRUE))
{
log_message('debug', 'Session: Memcached server pool already has '.$match[1].':'.$match[2]);
continue;
}
if ( ! $this->_memcached->addServer($match[1], $match[2], isset($match[3]) ? $match[3] : 0))
{
log_message('error', 'Could not add '.$match[1].':'.$match[2].' to Memcached server pool.');
}
else
{
$server_list[] = $match[1].':'.$match[2];
}
}
if (empty($server_list))
{
log_message('error', 'Session: Memcached server pool is empty.');
return FALSE;
}
return TRUE;
}
// ------------------------------------------------------------------------
/**
* Read
*
* Reads session data and acquires a lock
*
* @param string $session_id Session ID
* @return string Serialized session data
*/
public function read($session_id)
{
if (isset($this->_memcached) && $this->_get_lock($session_id))
{
// Needed by write() to detect session_regenerate_id() calls
$this->_session_id = $session_id;
$session_data = (string) $this->_memcached->get($this->_key_prefix.$session_id);
$this->_fingerprint = md5($session_data);
return $session_data;
}
return FALSE;
}
// ------------------------------------------------------------------------
/**
* Write
*
* Writes (create / update) session data
*
* @param string $session_id Session ID
* @param string $session_data Serialized session data
* @return bool
*/
public function write($session_id, $session_data)
{
if ( ! isset($this->_memcached))
{
return FALSE;
}
// Was the ID regenerated?
elseif ($session_id !== $this->_session_id)
{
if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id))
{
return FALSE;
}
$this->_fingerprint = md5('');
$this->_session_id = $session_id;
}
if (isset($this->_lock_key))
{
$this->_memcached->replace($this->_lock_key, time(), 300);
if ($this->_fingerprint !== ($fingerprint = md5($session_data)))
{
if ($this->_memcached->set($this->_key_prefix.$session_id, $session_data, $this->_config['expiration']))
{
$this->_fingerprint = $fingerprint;
return TRUE;
}
return FALSE;
}
return $this->_memcached->touch($this->_key_prefix.$session_id, $this->_config['expiration']);
}
return FALSE;
}
// ------------------------------------------------------------------------
/**
* Close
*
* Releases locks and closes connection.
*
* @return bool
*/
public function close()
{
if (isset($this->_memcached))
{
isset($this->_lock_key) && $this->_memcached->delete($this->_lock_key);
if ( ! $this->_memcached->quit())
{
return FALSE;
}
$this->_memcached = NULL;
return TRUE;
}
return FALSE;
}
// ------------------------------------------------------------------------
/**
* Destroy
*
* Destroys the current session.
*
* @param string $session_id Session ID
* @return bool
*/
public function destroy($session_id)
{
if (isset($this->_memcached, $this->_lock_key))
{
$this->_memcached->delete($this->_key_prefix.$session_id);
return $this->_cookie_destroy();
}
return FALSE;
}
// ------------------------------------------------------------------------
/**
* Garbage Collector
*
* Deletes expired sessions
*
* @param int $maxlifetime Maximum lifetime of sessions
* @return bool
*/
public function gc($maxlifetime)
{
// Not necessary, Memcached takes care of that.
return TRUE;
}
// ------------------------------------------------------------------------
/**
* Get lock
*
* Acquires an (emulated) lock.
*
* @param string $session_id Session ID
* @return bool
*/
protected function _get_lock($session_id)
{
if (isset($this->_lock_key))
{
return $this->_memcached->replace($this->_lock_key, time(), 300);
}
// 30 attempts to obtain a lock, in case another request already has it
$lock_key = $this->_key_prefix.$session_id.':lock';
$attempt = 0;
do
{
if ($this->_memcached->get($lock_key))
{
sleep(1);
continue;
}
if ( ! $this->_memcached->set($lock_key, time(), 300))
{
log_message('error', 'Session: Error while trying to obtain lock for '.$this->_key_prefix.$session_id);
return FALSE;
}
$this->_lock_key = $lock_key;
break;
}
while ($attempt++ < 30);
if ($attempt === 30)
{
log_message('error', 'Session: Unable to obtain lock for '.$this->_key_prefix.$session_id.' after 30 attempts, aborting.');
return FALSE;
}
$this->_lock = TRUE;
return TRUE;
}
// ------------------------------------------------------------------------
/**
* Release lock
*
* Releases a previously acquired lock
*
* @return bool
*/
protected function _release_lock()
{
if (isset($this->_memcached, $this->_lock_key) && $this->_lock)
{
if ( ! $this->_memcached->delete($this->_lock_key) && $this->_memcached->getResultCode() !== Memcached::RES_NOTFOUND)
{
log_message('error', 'Session: Error while trying to free lock for '.$this->_lock_key);
return FALSE;
}
$this->_lock_key = NULL;
$this->_lock = FALSE;
}
return TRUE;
}
}
| andrewolobo/ughe | system/libraries/Session/drivers/Session_memcached_driver.php | PHP | mit | 8,969 |
if (typeof _yuitest_coverage == "undefined"){
_yuitest_coverage = {};
_yuitest_coverline = function(src, line){
var coverage = _yuitest_coverage[src];
if (!coverage.lines[line]){
coverage.calledLines++;
}
coverage.lines[line]++;
};
_yuitest_coverfunc = function(src, name, line){
var coverage = _yuitest_coverage[src],
funcId = name + ":" + line;
if (!coverage.functions[funcId]){
coverage.calledFunctions++;
}
coverage.functions[funcId]++;
};
}
_yuitest_coverage["build/datatype-date-format/datatype-date-format.js"] = {
lines: {},
functions: {},
coveredLines: 0,
calledLines: 0,
coveredFunctions: 0,
calledFunctions: 0,
path: "build/datatype-date-format/datatype-date-format.js",
code: []
};
_yuitest_coverage["build/datatype-date-format/datatype-date-format.js"].code=["YUI.add('datatype-date-format', function (Y, NAME) {","","/**"," * The `datatype` module is an alias for three utilities, Y.Date, "," * Y.Number and Y.XML, that provide type-conversion and string-formatting"," * convenience methods for various JavaScript object types."," *"," * @module datatype"," * @main datatype"," */","","/**"," * The Date Utility provides type-conversion and string-formatting"," * convenience methods for Dates."," *"," * @module datatype-date"," * @main datatype-date"," */","","/**"," * Date module."," *"," * @module datatype-date"," */","","/**"," * Format date module implements strftime formatters for javascript based on the"," * Open Group specification defined at"," * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html"," * This implementation does not include modified conversion specifiers (i.e., Ex and Ox)"," *"," * @module datatype-date"," * @submodule datatype-date-format"," */","","/**"," * Date provides a set of utility functions to operate against Date objects."," *"," * @class Date"," * @static"," */","","/**"," * Pad a number with leading spaces, zeroes or something else"," * @method xPad"," * @param x {Number} The number to be padded"," * @param pad {String} The character to pad the number with"," * @param r {Number} (optional) The base of the pad, eg, 10 implies to two digits, 100 implies to 3 digits."," * @private"," */","var xPad=function (x, pad, r)","{"," if(typeof r === \"undefined\")"," {"," r=10;"," }"," pad = pad + \"\"; "," for( ; parseInt(x, 10)<r && r>1; r/=10) {"," x = pad + x;"," }"," return x.toString();","};","","var Dt = {"," formats: {"," a: function (d, l) { return l.a[d.getDay()]; },"," A: function (d, l) { return l.A[d.getDay()]; },"," b: function (d, l) { return l.b[d.getMonth()]; },"," B: function (d, l) { return l.B[d.getMonth()]; },"," C: function (d) { return xPad(parseInt(d.getFullYear()/100, 10), 0); },"," d: [\"getDate\", \"0\"],"," e: [\"getDate\", \" \"],"," g: function (d) { return xPad(parseInt(Dt.formats.G(d)%100, 10), 0); },"," G: function (d) {"," var y = d.getFullYear();"," var V = parseInt(Dt.formats.V(d), 10);"," var W = parseInt(Dt.formats.W(d), 10);"," "," if(W > V) {"," y++;"," } else if(W===0 && V>=52) {"," y--;"," }"," "," return y;"," },"," H: [\"getHours\", \"0\"],"," I: function (d) { var I=d.getHours()%12; return xPad(I===0?12:I, 0); },"," j: function (d) {"," var gmd_1 = new Date(\"\" + d.getFullYear() + \"/1/1 GMT\");"," var gmdate = new Date(\"\" + d.getFullYear() + \"/\" + (d.getMonth()+1) + \"/\" + d.getDate() + \" GMT\");"," var ms = gmdate - gmd_1;"," var doy = parseInt(ms/60000/60/24, 10)+1;"," return xPad(doy, 0, 100);"," },"," k: [\"getHours\", \" \"],"," l: function (d) { var I=d.getHours()%12; return xPad(I===0?12:I, \" \"); },"," m: function (d) { return xPad(d.getMonth()+1, 0); },"," M: [\"getMinutes\", \"0\"],"," p: function (d, l) { return l.p[d.getHours() >= 12 ? 1 : 0 ]; },"," P: function (d, l) { return l.P[d.getHours() >= 12 ? 1 : 0 ]; },"," s: function (d, l) { return parseInt(d.getTime()/1000, 10); },"," S: [\"getSeconds\", \"0\"],"," u: function (d) { var dow = d.getDay(); return dow===0?7:dow; },"," U: function (d) {"," var doy = parseInt(Dt.formats.j(d), 10);"," var rdow = 6-d.getDay();"," var woy = parseInt((doy+rdow)/7, 10);"," return xPad(woy, 0);"," },"," V: function (d) {"," var woy = parseInt(Dt.formats.W(d), 10);"," var dow1_1 = (new Date(\"\" + d.getFullYear() + \"/1/1\")).getDay();"," // First week is 01 and not 00 as in the case of %U and %W,"," // so we add 1 to the final result except if day 1 of the year"," // is a Monday (then %W returns 01)."," // We also need to subtract 1 if the day 1 of the year is "," // Friday-Sunday, so the resulting equation becomes:"," var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);"," if(idow === 53 && (new Date(\"\" + d.getFullYear() + \"/12/31\")).getDay() < 4)"," {"," idow = 1;"," }"," else if(idow === 0)"," {"," idow = Dt.formats.V(new Date(\"\" + (d.getFullYear()-1) + \"/12/31\"));"," }"," "," return xPad(idow, 0);"," },"," w: \"getDay\","," W: function (d) {"," var doy = parseInt(Dt.formats.j(d), 10);"," var rdow = 7-Dt.formats.u(d);"," var woy = parseInt((doy+rdow)/7, 10);"," return xPad(woy, 0, 10);"," },"," y: function (d) { return xPad(d.getFullYear()%100, 0); },"," Y: \"getFullYear\","," z: function (d) {"," var o = d.getTimezoneOffset();"," var H = xPad(parseInt(Math.abs(o/60), 10), 0);"," var M = xPad(Math.abs(o%60), 0);"," return (o>0?\"-\":\"+\") + H + M;"," },"," Z: function (d) {"," var tz = d.toString().replace(/^.*:\\d\\d( GMT[+-]\\d+)? \\(?([A-Za-z ]+)\\)?\\d*$/, \"$2\").replace(/[a-z ]/g, \"\");"," if(tz.length > 4) {"," tz = Dt.formats.z(d);"," }"," return tz;"," },"," \"%\": function (d) { return \"%\"; }"," },",""," aggregates: {"," c: \"locale\","," D: \"%m/%d/%y\","," F: \"%Y-%m-%d\","," h: \"%b\","," n: \"\\n\","," r: \"%I:%M:%S %p\","," R: \"%H:%M\","," t: \"\\t\","," T: \"%H:%M:%S\","," x: \"locale\","," X: \"locale\""," //\"+\": \"%a %b %e %T %Z %Y\""," },",""," /**"," * Takes a native JavaScript Date and formats it as a string for display to user."," *"," * @for Date"," * @method format"," * @param oDate {Date} Date."," * @param oConfig {Object} (Optional) Object literal of configuration values:"," * <dl>"," * <dt>format {HTML} (Optional)</dt>"," * <dd>"," * <p>"," * Any strftime string is supported, such as \"%I:%M:%S %p\". strftime has several format specifiers defined by the Open group at "," * <a href=\"http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html\">http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html</a>"," * PHP added a few of its own, defined at <a href=\"http://www.php.net/strftime\">http://www.php.net/strftime</a>"," * </p>"," * <p>"," * This javascript implementation supports all the PHP specifiers and a few more. The full list is below."," * </p>"," * <p>"," * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d."," * </p>"," * <dl>"," * <dt>%a</dt> <dd>abbreviated weekday name according to the current locale</dd>"," * <dt>%A</dt> <dd>full weekday name according to the current locale</dd>"," * <dt>%b</dt> <dd>abbreviated month name according to the current locale</dd>"," * <dt>%B</dt> <dd>full month name according to the current locale</dd>"," * <dt>%c</dt> <dd>preferred date and time representation for the current locale</dd>"," * <dt>%C</dt> <dd>century number (the year divided by 100 and truncated to an integer, range 00 to 99)</dd>"," * <dt>%d</dt> <dd>day of the month as a decimal number (range 01 to 31)</dd>"," * <dt>%D</dt> <dd>same as %m/%d/%y</dd>"," * <dt>%e</dt> <dd>day of the month as a decimal number, a single digit is preceded by a space (range \" 1\" to \"31\")</dd>"," * <dt>%F</dt> <dd>same as %Y-%m-%d (ISO 8601 date format)</dd>"," * <dt>%g</dt> <dd>like %G, but without the century</dd>"," * <dt>%G</dt> <dd>The 4-digit year corresponding to the ISO week number</dd>"," * <dt>%h</dt> <dd>same as %b</dd>"," * <dt>%H</dt> <dd>hour as a decimal number using a 24-hour clock (range 00 to 23)</dd>"," * <dt>%I</dt> <dd>hour as a decimal number using a 12-hour clock (range 01 to 12)</dd>"," * <dt>%j</dt> <dd>day of the year as a decimal number (range 001 to 366)</dd>"," * <dt>%k</dt> <dd>hour as a decimal number using a 24-hour clock (range 0 to 23); single digits are preceded by a blank. (See also %H.)</dd>"," * <dt>%l</dt> <dd>hour as a decimal number using a 12-hour clock (range 1 to 12); single digits are preceded by a blank. (See also %I.) </dd>"," * <dt>%m</dt> <dd>month as a decimal number (range 01 to 12)</dd>"," * <dt>%M</dt> <dd>minute as a decimal number</dd>"," * <dt>%n</dt> <dd>newline character</dd>"," * <dt>%p</dt> <dd>either \"AM\" or \"PM\" according to the given time value, or the corresponding strings for the current locale</dd>"," * <dt>%P</dt> <dd>like %p, but lower case</dd>"," * <dt>%r</dt> <dd>time in a.m. and p.m. notation equal to %I:%M:%S %p</dd>"," * <dt>%R</dt> <dd>time in 24 hour notation equal to %H:%M</dd>"," * <dt>%s</dt> <dd>number of seconds since the Epoch, ie, since 1970-01-01 00:00:00 UTC</dd>"," * <dt>%S</dt> <dd>second as a decimal number</dd>"," * <dt>%t</dt> <dd>tab character</dd>"," * <dt>%T</dt> <dd>current time, equal to %H:%M:%S</dd>"," * <dt>%u</dt> <dd>weekday as a decimal number [1,7], with 1 representing Monday</dd>"," * <dt>%U</dt> <dd>week number of the current year as a decimal number, starting with the"," * first Sunday as the first day of the first week</dd>"," * <dt>%V</dt> <dd>The ISO 8601:1988 week number of the current year as a decimal number,"," * range 01 to 53, where week 1 is the first week that has at least 4 days"," * in the current year, and with Monday as the first day of the week.</dd>"," * <dt>%w</dt> <dd>day of the week as a decimal, Sunday being 0</dd>"," * <dt>%W</dt> <dd>week number of the current year as a decimal number, starting with the"," * first Monday as the first day of the first week</dd>"," * <dt>%x</dt> <dd>preferred date representation for the current locale without the time</dd>"," * <dt>%X</dt> <dd>preferred time representation for the current locale without the date</dd>"," * <dt>%y</dt> <dd>year as a decimal number without a century (range 00 to 99)</dd>"," * <dt>%Y</dt> <dd>year as a decimal number including the century</dd>"," * <dt>%z</dt> <dd>numerical time zone representation</dd>"," * <dt>%Z</dt> <dd>time zone name or abbreviation</dd>"," * <dt>%%</dt> <dd>a literal \"%\" character</dd>"," * </dl>"," * </dd>"," * </dl>"," * @return {HTML} Formatted date for display."," */"," format : function (oDate, oConfig) {"," oConfig = oConfig || {};"," "," if(!Y.Lang.isDate(oDate)) {"," return Y.Lang.isValue(oDate) ? oDate : \"\";"," }",""," var format, resources, compatMode, sLocale, LOCALE;",""," format = oConfig.format || \"%Y-%m-%d\";",""," resources = Y.Intl.get('datatype-date-format');",""," var replace_aggs = function (m0, m1) {"," if (compatMode && m1 === \"r\") {"," return resources[m1];"," }"," var f = Dt.aggregates[m1];"," return (f === \"locale\" ? resources[m1] : f);"," };",""," var replace_formats = function (m0, m1) {"," var f = Dt.formats[m1];"," switch(Y.Lang.type(f)) {"," case \"string\": // string => built in date function"," return oDate[f]();"," case \"function\": // function => our own function"," return f.call(oDate, oDate, resources);"," case \"array\": // built in function with padding"," if(Y.Lang.type(f[0]) === \"string\") {"," return xPad(oDate[f[0]](), f[1]);"," } // no break; (fall through to default:)"," default:"," return m1;"," }"," };",""," // First replace aggregates (run in a loop because an agg may be made up of other aggs)"," while(format.match(/%[cDFhnrRtTxX]/)) {"," format = format.replace(/%([cDFhnrRtTxX])/g, replace_aggs);"," }",""," // Now replace formats (do not run in a loop otherwise %%a will be replace with the value of %a)"," var str = format.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g, replace_formats);",""," replace_aggs = replace_formats = undefined;",""," return str;"," }","};","","Y.mix(Y.namespace(\"Date\"), Dt);","","","Y.namespace(\"DataType\");","Y.DataType.Date = Y.Date;","","","}, '@VERSION@', {\"lang\": [\"ar\", \"ar-JO\", \"ca\", \"ca-ES\", \"da\", \"da-DK\", \"de\", \"de-AT\", \"de-DE\", \"el\", \"el-GR\", \"en\", \"en-AU\", \"en-CA\", \"en-GB\", \"en-IE\", \"en-IN\", \"en-JO\", \"en-MY\", \"en-NZ\", \"en-PH\", \"en-SG\", \"en-US\", \"es\", \"es-AR\", \"es-BO\", \"es-CL\", \"es-CO\", \"es-EC\", \"es-ES\", \"es-MX\", \"es-PE\", \"es-PY\", \"es-US\", \"es-UY\", \"es-VE\", \"fi\", \"fi-FI\", \"fr\", \"fr-BE\", \"fr-CA\", \"fr-FR\", \"hi\", \"hi-IN\", \"id\", \"id-ID\", \"it\", \"it-IT\", \"ja\", \"ja-JP\", \"ko\", \"ko-KR\", \"ms\", \"ms-MY\", \"nb\", \"nb-NO\", \"nl\", \"nl-BE\", \"nl-NL\", \"pl\", \"pl-PL\", \"pt\", \"pt-BR\", \"ro\", \"ro-RO\", \"ru\", \"ru-RU\", \"sv\", \"sv-SE\", \"th\", \"th-TH\", \"tr\", \"tr-TR\", \"vi\", \"vi-VN\", \"zh-Hans\", \"zh-Hans-CN\", \"zh-Hant\", \"zh-Hant-HK\", \"zh-Hant-TW\"]});"];
_yuitest_coverage["build/datatype-date-format/datatype-date-format.js"].lines = {"1":0,"51":0,"53":0,"55":0,"57":0,"58":0,"59":0,"61":0,"64":0,"66":0,"67":0,"68":0,"69":0,"70":0,"73":0,"75":0,"76":0,"77":0,"79":0,"80":0,"81":0,"82":0,"85":0,"88":0,"90":0,"91":0,"92":0,"93":0,"94":0,"97":0,"98":0,"100":0,"101":0,"102":0,"104":0,"106":0,"107":0,"108":0,"109":0,"112":0,"113":0,"119":0,"120":0,"122":0,"124":0,"126":0,"129":0,"133":0,"134":0,"135":0,"136":0,"138":0,"141":0,"142":0,"143":0,"144":0,"147":0,"148":0,"149":0,"151":0,"153":0,"244":0,"246":0,"247":0,"250":0,"252":0,"254":0,"256":0,"257":0,"258":0,"260":0,"261":0,"264":0,"265":0,"266":0,"268":0,"270":0,"272":0,"273":0,"276":0,"281":0,"282":0,"286":0,"288":0,"290":0,"294":0,"297":0,"298":0};
_yuitest_coverage["build/datatype-date-format/datatype-date-format.js"].functions = {"xPad:51":0,"a:66":0,"A:67":0,"b:68":0,"B:69":0,"C:70":0,"g:73":0,"G:74":0,"I:88":0,"j:89":0,"l:97":0,"m:98":0,"p:100":0,"P:101":0,"s:102":0,"u:104":0,"U:105":0,"V:111":0,"W:132":0,"y:138":0,"z:140":0,"Z:146":0,"\"%\":153":0,"replace_aggs:256":0,"replace_formats:264":0,"format:243":0,"(anonymous 1):1":0};
_yuitest_coverage["build/datatype-date-format/datatype-date-format.js"].coveredLines = 88;
_yuitest_coverage["build/datatype-date-format/datatype-date-format.js"].coveredFunctions = 27;
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 1);
YUI.add('datatype-date-format', function (Y, NAME) {
/**
* The `datatype` module is an alias for three utilities, Y.Date,
* Y.Number and Y.XML, that provide type-conversion and string-formatting
* convenience methods for various JavaScript object types.
*
* @module datatype
* @main datatype
*/
/**
* The Date Utility provides type-conversion and string-formatting
* convenience methods for Dates.
*
* @module datatype-date
* @main datatype-date
*/
/**
* Date module.
*
* @module datatype-date
*/
/**
* Format date module implements strftime formatters for javascript based on the
* Open Group specification defined at
* http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
* This implementation does not include modified conversion specifiers (i.e., Ex and Ox)
*
* @module datatype-date
* @submodule datatype-date-format
*/
/**
* Date provides a set of utility functions to operate against Date objects.
*
* @class Date
* @static
*/
/**
* Pad a number with leading spaces, zeroes or something else
* @method xPad
* @param x {Number} The number to be padded
* @param pad {String} The character to pad the number with
* @param r {Number} (optional) The base of the pad, eg, 10 implies to two digits, 100 implies to 3 digits.
* @private
*/
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "(anonymous 1)", 1);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 51);
var xPad=function (x, pad, r)
{
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "xPad", 51);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 53);
if(typeof r === "undefined")
{
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 55);
r=10;
}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 57);
pad = pad + "";
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 58);
for( ; parseInt(x, 10)<r && r>1; r/=10) {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 59);
x = pad + x;
}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 61);
return x.toString();
};
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 64);
var Dt = {
formats: {
a: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "a", 66);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 66);
return l.a[d.getDay()]; },
A: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "A", 67);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 67);
return l.A[d.getDay()]; },
b: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "b", 68);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 68);
return l.b[d.getMonth()]; },
B: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "B", 69);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 69);
return l.B[d.getMonth()]; },
C: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "C", 70);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 70);
return xPad(parseInt(d.getFullYear()/100, 10), 0); },
d: ["getDate", "0"],
e: ["getDate", " "],
g: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "g", 73);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 73);
return xPad(parseInt(Dt.formats.G(d)%100, 10), 0); },
G: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "G", 74);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 75);
var y = d.getFullYear();
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 76);
var V = parseInt(Dt.formats.V(d), 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 77);
var W = parseInt(Dt.formats.W(d), 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 79);
if(W > V) {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 80);
y++;
} else {_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 81);
if(W===0 && V>=52) {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 82);
y--;
}}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 85);
return y;
},
H: ["getHours", "0"],
I: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "I", 88);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 88);
var I=d.getHours()%12; return xPad(I===0?12:I, 0); },
j: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "j", 89);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 90);
var gmd_1 = new Date("" + d.getFullYear() + "/1/1 GMT");
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 91);
var gmdate = new Date("" + d.getFullYear() + "/" + (d.getMonth()+1) + "/" + d.getDate() + " GMT");
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 92);
var ms = gmdate - gmd_1;
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 93);
var doy = parseInt(ms/60000/60/24, 10)+1;
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 94);
return xPad(doy, 0, 100);
},
k: ["getHours", " "],
l: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "l", 97);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 97);
var I=d.getHours()%12; return xPad(I===0?12:I, " "); },
m: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "m", 98);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 98);
return xPad(d.getMonth()+1, 0); },
M: ["getMinutes", "0"],
p: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "p", 100);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 100);
return l.p[d.getHours() >= 12 ? 1 : 0 ]; },
P: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "P", 101);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 101);
return l.P[d.getHours() >= 12 ? 1 : 0 ]; },
s: function (d, l) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "s", 102);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 102);
return parseInt(d.getTime()/1000, 10); },
S: ["getSeconds", "0"],
u: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "u", 104);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 104);
var dow = d.getDay(); return dow===0?7:dow; },
U: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "U", 105);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 106);
var doy = parseInt(Dt.formats.j(d), 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 107);
var rdow = 6-d.getDay();
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 108);
var woy = parseInt((doy+rdow)/7, 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 109);
return xPad(woy, 0);
},
V: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "V", 111);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 112);
var woy = parseInt(Dt.formats.W(d), 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 113);
var dow1_1 = (new Date("" + d.getFullYear() + "/1/1")).getDay();
// First week is 01 and not 00 as in the case of %U and %W,
// so we add 1 to the final result except if day 1 of the year
// is a Monday (then %W returns 01).
// We also need to subtract 1 if the day 1 of the year is
// Friday-Sunday, so the resulting equation becomes:
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 119);
var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 120);
if(idow === 53 && (new Date("" + d.getFullYear() + "/12/31")).getDay() < 4)
{
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 122);
idow = 1;
}
else {_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 124);
if(idow === 0)
{
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 126);
idow = Dt.formats.V(new Date("" + (d.getFullYear()-1) + "/12/31"));
}}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 129);
return xPad(idow, 0);
},
w: "getDay",
W: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "W", 132);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 133);
var doy = parseInt(Dt.formats.j(d), 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 134);
var rdow = 7-Dt.formats.u(d);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 135);
var woy = parseInt((doy+rdow)/7, 10);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 136);
return xPad(woy, 0, 10);
},
y: function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "y", 138);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 138);
return xPad(d.getFullYear()%100, 0); },
Y: "getFullYear",
z: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "z", 140);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 141);
var o = d.getTimezoneOffset();
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 142);
var H = xPad(parseInt(Math.abs(o/60), 10), 0);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 143);
var M = xPad(Math.abs(o%60), 0);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 144);
return (o>0?"-":"+") + H + M;
},
Z: function (d) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "Z", 146);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 147);
var tz = d.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/, "$2").replace(/[a-z ]/g, "");
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 148);
if(tz.length > 4) {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 149);
tz = Dt.formats.z(d);
}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 151);
return tz;
},
"%": function (d) { _yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "\"%\"", 153);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 153);
return "%"; }
},
aggregates: {
c: "locale",
D: "%m/%d/%y",
F: "%Y-%m-%d",
h: "%b",
n: "\n",
r: "%I:%M:%S %p",
R: "%H:%M",
t: "\t",
T: "%H:%M:%S",
x: "locale",
X: "locale"
//"+": "%a %b %e %T %Z %Y"
},
/**
* Takes a native JavaScript Date and formats it as a string for display to user.
*
* @for Date
* @method format
* @param oDate {Date} Date.
* @param oConfig {Object} (Optional) Object literal of configuration values:
* <dl>
* <dt>format {HTML} (Optional)</dt>
* <dd>
* <p>
* Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at
* <a href="http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html">http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html</a>
* PHP added a few of its own, defined at <a href="http://www.php.net/strftime">http://www.php.net/strftime</a>
* </p>
* <p>
* This javascript implementation supports all the PHP specifiers and a few more. The full list is below.
* </p>
* <p>
* If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d.
* </p>
* <dl>
* <dt>%a</dt> <dd>abbreviated weekday name according to the current locale</dd>
* <dt>%A</dt> <dd>full weekday name according to the current locale</dd>
* <dt>%b</dt> <dd>abbreviated month name according to the current locale</dd>
* <dt>%B</dt> <dd>full month name according to the current locale</dd>
* <dt>%c</dt> <dd>preferred date and time representation for the current locale</dd>
* <dt>%C</dt> <dd>century number (the year divided by 100 and truncated to an integer, range 00 to 99)</dd>
* <dt>%d</dt> <dd>day of the month as a decimal number (range 01 to 31)</dd>
* <dt>%D</dt> <dd>same as %m/%d/%y</dd>
* <dt>%e</dt> <dd>day of the month as a decimal number, a single digit is preceded by a space (range " 1" to "31")</dd>
* <dt>%F</dt> <dd>same as %Y-%m-%d (ISO 8601 date format)</dd>
* <dt>%g</dt> <dd>like %G, but without the century</dd>
* <dt>%G</dt> <dd>The 4-digit year corresponding to the ISO week number</dd>
* <dt>%h</dt> <dd>same as %b</dd>
* <dt>%H</dt> <dd>hour as a decimal number using a 24-hour clock (range 00 to 23)</dd>
* <dt>%I</dt> <dd>hour as a decimal number using a 12-hour clock (range 01 to 12)</dd>
* <dt>%j</dt> <dd>day of the year as a decimal number (range 001 to 366)</dd>
* <dt>%k</dt> <dd>hour as a decimal number using a 24-hour clock (range 0 to 23); single digits are preceded by a blank. (See also %H.)</dd>
* <dt>%l</dt> <dd>hour as a decimal number using a 12-hour clock (range 1 to 12); single digits are preceded by a blank. (See also %I.) </dd>
* <dt>%m</dt> <dd>month as a decimal number (range 01 to 12)</dd>
* <dt>%M</dt> <dd>minute as a decimal number</dd>
* <dt>%n</dt> <dd>newline character</dd>
* <dt>%p</dt> <dd>either "AM" or "PM" according to the given time value, or the corresponding strings for the current locale</dd>
* <dt>%P</dt> <dd>like %p, but lower case</dd>
* <dt>%r</dt> <dd>time in a.m. and p.m. notation equal to %I:%M:%S %p</dd>
* <dt>%R</dt> <dd>time in 24 hour notation equal to %H:%M</dd>
* <dt>%s</dt> <dd>number of seconds since the Epoch, ie, since 1970-01-01 00:00:00 UTC</dd>
* <dt>%S</dt> <dd>second as a decimal number</dd>
* <dt>%t</dt> <dd>tab character</dd>
* <dt>%T</dt> <dd>current time, equal to %H:%M:%S</dd>
* <dt>%u</dt> <dd>weekday as a decimal number [1,7], with 1 representing Monday</dd>
* <dt>%U</dt> <dd>week number of the current year as a decimal number, starting with the
* first Sunday as the first day of the first week</dd>
* <dt>%V</dt> <dd>The ISO 8601:1988 week number of the current year as a decimal number,
* range 01 to 53, where week 1 is the first week that has at least 4 days
* in the current year, and with Monday as the first day of the week.</dd>
* <dt>%w</dt> <dd>day of the week as a decimal, Sunday being 0</dd>
* <dt>%W</dt> <dd>week number of the current year as a decimal number, starting with the
* first Monday as the first day of the first week</dd>
* <dt>%x</dt> <dd>preferred date representation for the current locale without the time</dd>
* <dt>%X</dt> <dd>preferred time representation for the current locale without the date</dd>
* <dt>%y</dt> <dd>year as a decimal number without a century (range 00 to 99)</dd>
* <dt>%Y</dt> <dd>year as a decimal number including the century</dd>
* <dt>%z</dt> <dd>numerical time zone representation</dd>
* <dt>%Z</dt> <dd>time zone name or abbreviation</dd>
* <dt>%%</dt> <dd>a literal "%" character</dd>
* </dl>
* </dd>
* </dl>
* @return {HTML} Formatted date for display.
*/
format : function (oDate, oConfig) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "format", 243);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 244);
oConfig = oConfig || {};
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 246);
if(!Y.Lang.isDate(oDate)) {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 247);
return Y.Lang.isValue(oDate) ? oDate : "";
}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 250);
var format, resources, compatMode, sLocale, LOCALE;
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 252);
format = oConfig.format || "%Y-%m-%d";
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 254);
resources = Y.Intl.get('datatype-date-format');
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 256);
var replace_aggs = function (m0, m1) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "replace_aggs", 256);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 257);
if (compatMode && m1 === "r") {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 258);
return resources[m1];
}
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 260);
var f = Dt.aggregates[m1];
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 261);
return (f === "locale" ? resources[m1] : f);
};
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 264);
var replace_formats = function (m0, m1) {
_yuitest_coverfunc("build/datatype-date-format/datatype-date-format.js", "replace_formats", 264);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 265);
var f = Dt.formats[m1];
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 266);
switch(Y.Lang.type(f)) {
case "string": // string => built in date function
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 268);
return oDate[f]();
case "function": // function => our own function
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 270);
return f.call(oDate, oDate, resources);
case "array": // built in function with padding
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 272);
if(Y.Lang.type(f[0]) === "string") {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 273);
return xPad(oDate[f[0]](), f[1]);
} // no break; (fall through to default:)
default:
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 276);
return m1;
}
};
// First replace aggregates (run in a loop because an agg may be made up of other aggs)
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 281);
while(format.match(/%[cDFhnrRtTxX]/)) {
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 282);
format = format.replace(/%([cDFhnrRtTxX])/g, replace_aggs);
}
// Now replace formats (do not run in a loop otherwise %%a will be replace with the value of %a)
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 286);
var str = format.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g, replace_formats);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 288);
replace_aggs = replace_formats = undefined;
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 290);
return str;
}
};
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 294);
Y.mix(Y.namespace("Date"), Dt);
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 297);
Y.namespace("DataType");
_yuitest_coverline("build/datatype-date-format/datatype-date-format.js", 298);
Y.DataType.Date = Y.Date;
}, '@VERSION@', {"lang": ["ar", "ar-JO", "ca", "ca-ES", "da", "da-DK", "de", "de-AT", "de-DE", "el", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-IE", "en-IN", "en-JO", "en-MY", "en-NZ", "en-PH", "en-SG", "en-US", "es", "es-AR", "es-BO", "es-CL", "es-CO", "es-EC", "es-ES", "es-MX", "es-PE", "es-PY", "es-US", "es-UY", "es-VE", "fi", "fi-FI", "fr", "fr-BE", "fr-CA", "fr-FR", "hi", "hi-IN", "id", "id-ID", "it", "it-IT", "ja", "ja-JP", "ko", "ko-KR", "ms", "ms-MY", "nb", "nb-NO", "nl", "nl-BE", "nl-NL", "pl", "pl-PL", "pt", "pt-BR", "ro", "ro-RO", "ru", "ru-RU", "sv", "sv-SE", "th", "th-TH", "tr", "tr-TR", "vi", "vi-VN", "zh-Hans", "zh-Hans-CN", "zh-Hant", "zh-Hant-HK", "zh-Hant-TW"]});
| neveldo/cdnjs | ajax/libs/yui/3.7.0/datatype-date-format/datatype-date-format-coverage.js | JavaScript | mit | 35,534 |
if (typeof _yuitest_coverage == "undefined"){
_yuitest_coverage = {};
_yuitest_coverline = function(src, line){
var coverage = _yuitest_coverage[src];
if (!coverage.lines[line]){
coverage.calledLines++;
}
coverage.lines[line]++;
};
_yuitest_coverfunc = function(src, name, line){
var coverage = _yuitest_coverage[src],
funcId = name + ":" + line;
if (!coverage.functions[funcId]){
coverage.calledFunctions++;
}
coverage.functions[funcId]++;
};
}
_yuitest_coverage["build/anim-scroll/anim-scroll.js"] = {
lines: {},
functions: {},
coveredLines: 0,
calledLines: 0,
coveredFunctions: 0,
calledFunctions: 0,
path: "build/anim-scroll/anim-scroll.js",
code: []
};
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].code=["YUI.add('anim-scroll', function (Y, NAME) {","","/**"," * Adds support for the <code>scroll</code> property in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-scroll"," */","","var NUM = Number;","","//TODO: deprecate for scrollTop/Left properties?","Y.Anim.behaviors.scroll = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," var"," node = anim._node, "," val = (["," fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),"," fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)"," ]);",""," if (val[0]) {"," node.set('scrollLeft', val[0]);"," }",""," if (val[1]) {"," node.set('scrollTop', val[1]);"," }"," },"," get: function(anim) {"," var node = anim._node;"," return [node.get('scrollLeft'), node.get('scrollTop')];"," }","};","","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].lines = {"1":0,"10":0,"13":0,"15":0,"22":0,"23":0,"26":0,"27":0,"31":0,"32":0};
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].functions = {"set:14":0,"get:30":0,"(anonymous 1):1":0};
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].coveredLines = 10;
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].coveredFunctions = 3;
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 1);
YUI.add('anim-scroll', function (Y, NAME) {
/**
* Adds support for the <code>scroll</code> property in <code>to</code>
* and <code>from</code> attributes.
* @module anim
* @submodule anim-scroll
*/
_yuitest_coverfunc("build/anim-scroll/anim-scroll.js", "(anonymous 1)", 1);
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 10);
var NUM = Number;
//TODO: deprecate for scrollTop/Left properties?
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 13);
Y.Anim.behaviors.scroll = {
set: function(anim, att, from, to, elapsed, duration, fn) {
_yuitest_coverfunc("build/anim-scroll/anim-scroll.js", "set", 14);
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 15);
var
node = anim._node,
val = ([
fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
]);
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 22);
if (val[0]) {
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 23);
node.set('scrollLeft', val[0]);
}
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 26);
if (val[1]) {
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 27);
node.set('scrollTop', val[1]);
}
},
get: function(anim) {
_yuitest_coverfunc("build/anim-scroll/anim-scroll.js", "get", 30);
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 31);
var node = anim._node;
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 32);
return [node.get('scrollLeft'), node.get('scrollTop')];
}
};
}, '@VERSION@', {"requires": ["anim-base"]});
| thisispiers/cdnjs | ajax/libs/yui/3.7.0/anim-scroll/anim-scroll-coverage.js | JavaScript | mit | 4,019 |
var isTag = require("domelementtype").isTag;
module.exports = {
filter: filter,
find: find,
findOneChild: findOneChild,
findOne: findOne,
existsOne: existsOne,
findAll: findAll
};
function filter(test, element, recurse, limit){
if(!Array.isArray(element)) element = [element];
if(typeof limit !== "number" || !isFinite(limit)){
limit = Infinity;
}
return find(test, element, recurse !== false, limit);
}
function find(test, elems, recurse, limit){
var result = [], childs;
for(var i = 0, j = elems.length; i < j; i++){
if(test(elems[i])){
result.push(elems[i]);
if(--limit <= 0) break;
}
childs = elems[i].children;
if(recurse && childs && childs.length > 0){
childs = find(test, childs, recurse, limit);
result = result.concat(childs);
limit -= childs.length;
if(limit <= 0) break;
}
}
return result;
}
function findOneChild(test, elems){
for(var i = 0, l = elems.length; i < l; i++){
if(test(elems[i])) return elems[i];
}
return null;
}
function findOne(test, elems){
var elem = null;
for(var i = 0, l = elems.length; i < l && !elem; i++){
if(!isTag(elems[i])){
continue;
} else if(test(elems[i])){
elem = elems[i];
} else if(elems[i].children.length > 0){
elem = findOne(test, elems[i].children);
}
}
return elem;
}
function existsOne(test, elems){
for(var i = 0, l = elems.length; i < l; i++){
if(
isTag(elems[i]) && (
test(elems[i]) || (
elems[i].children.length > 0 &&
existsOne(test, elems[i].children)
)
)
){
return true;
}
}
return false;
}
function findAll(test, elems){
var result = [];
for(var i = 0, j = elems.length; i < j; i++){
if(!isTag(elems[i])) continue;
if(test(elems[i])) result.push(elems[i]);
if(elems[i].children.length > 0){
result = result.concat(findAll(test, elems[i].children));
}
}
return result;
}
| CKiilu/scurrae | node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domutils/lib/querying.js | JavaScript | mit | 1,867 |
webshims.register("mediaelement-native-fix",function(a,b,c,d){var e=b.support,f=function(){if(e.videoBuffered)return a.noop;var c=function(a){var c=b.data(a,"mediaelementBuffered");return c||(c={buffered:{start:function(a){return a>=c.buffered.length?void b.error("buffered index size error"):0},end:function(a){return a>=c.buffered.length?void b.error("buffered index size error"):c.loaded},length:0},loaded:0},b.data(a,"mediaelementBuffered",c)),c},d=function(d){if(d=d.originalEvent,d&&"lengthComputable"in d){var e=b.data(d.target,"mediaelement");if((!e||"html5"==e.isActive)&&d.lengthComputable&&"loaded"in d){var f=d.target.duration,g=c(d.target);g.loaded=f?d.loaded/d.total*f:0,g.loaded&&(g.buffered.length=1),"load"==d.type&&a(d.target).triggerHandler("progress")}}},f=function(a){var b=c(a.target);b.buffered.length=0,b.loaded=0};return["audio","video"].forEach(function(a){var d=b.defineNodeNameProperty(a,"buffered",{prop:{get:function(){var a=b.data(this,"mediaelement");return a&&"flash"==a.isActive&&d.prop._supget?void d.prop._supget.apply(this):c(this).buffered}}})}),function(){a(this).off("load progress",d).off("emptied",f).on("load progress",d).on("emptied",f)}}();!function(){var a=d.createElement("video");if(!("preload"in a)&&"autobuffer"in a){var c={metadata:1,none:1};b.onNodeNamesPropertyModify(["audio","video"],["preload"],{set:function(a,d,e){c[a]||"removeAttr"==e?this.autobuffer=!1:"html5"==!(b.data(this,"mediaelement")||{}).isActive&&(this.autobuffer=!0)},initAttr:!0})}}();var g=function(){return e.mediaDefaultMuted?a.noop:function(){if(!a.data(this,"fixedMediaProgress")){var d,e,f=this,g=function(){var b=a.prop(f,"buffered");if(b){for(var c="",d=0,e=b.length;e>d;d++)c+=b.end(d);return c}},h=function(){var c=g();c!=e&&(e=c,b.error("needed to trigger progress manually"),a(f).triggerHandler("progress"))};a(this).data("fixedMediaProgress",!0).on({"play loadstart progress":function(a){"progress"==a.type&&(e=g(this)),clearTimeout(d),d=setTimeout(h,800)},"emptied stalled mediaerror abort suspend":function(a){"emptied"==a.type&&(e=!1),clearTimeout(d)}}),"ActiveXObject"in c&&a.prop(this,"paused")&&!a.prop(this,"readyState")&&a(this).is('audio[preload="none"][controls]:not([autoplay],.nonnative-api-active)')&&a(this).prop("preload","metadata").mediaLoad()}}}();b.addReady(function(b,c){a("video, audio",b).add(c.filter("video, audio")).each(f).each(g)})}); | hare1039/cdnjs | ajax/libs/webshim/1.14.4-RC2/minified/shims/mediaelement-native-fix.js | JavaScript | mit | 2,396 |
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer;
var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator;
exports['test that we can instantiate with a string or an object'] = function (assert, util) {
assert.doesNotThrow(function () {
var map = new SourceMapConsumer(util.testMap);
});
assert.doesNotThrow(function () {
var map = new SourceMapConsumer(JSON.stringify(util.testMap));
});
};
exports['test that the `sources` field has the original sources'] = function (assert, util) {
var map;
var sources;
map = new SourceMapConsumer(util.testMap);
sources = map.sources;
assert.equal(sources[0], '/the/root/one.js');
assert.equal(sources[1], '/the/root/two.js');
assert.equal(sources.length, 2);
map = new SourceMapConsumer(util.testMapNoSourceRoot);
sources = map.sources;
assert.equal(sources[0], 'one.js');
assert.equal(sources[1], 'two.js');
assert.equal(sources.length, 2);
map = new SourceMapConsumer(util.testMapEmptySourceRoot);
sources = map.sources;
assert.equal(sources[0], 'one.js');
assert.equal(sources[1], 'two.js');
assert.equal(sources.length, 2);
};
exports['test that the source root is reflected in a mapping\'s source field'] = function (assert, util) {
var map;
var mapping;
map = new SourceMapConsumer(util.testMap);
mapping = map.originalPositionFor({
line: 2,
column: 1
});
assert.equal(mapping.source, '/the/root/two.js');
mapping = map.originalPositionFor({
line: 1,
column: 1
});
assert.equal(mapping.source, '/the/root/one.js');
map = new SourceMapConsumer(util.testMapNoSourceRoot);
mapping = map.originalPositionFor({
line: 2,
column: 1
});
assert.equal(mapping.source, 'two.js');
mapping = map.originalPositionFor({
line: 1,
column: 1
});
assert.equal(mapping.source, 'one.js');
map = new SourceMapConsumer(util.testMapEmptySourceRoot);
mapping = map.originalPositionFor({
line: 2,
column: 1
});
assert.equal(mapping.source, 'two.js');
mapping = map.originalPositionFor({
line: 1,
column: 1
});
assert.equal(mapping.source, 'one.js');
};
exports['test mapping tokens back exactly'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMap);
util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert);
util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert);
util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert);
util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert);
util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert);
util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert);
util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert);
util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert);
util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert);
util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert);
util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert);
util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert);
util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert);
};
exports['test mapping tokens fuzzy'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMap);
// Finding original positions
util.assertMapping(1, 20, '/the/root/one.js', 1, 21, 'bar', map, assert, true);
util.assertMapping(1, 30, '/the/root/one.js', 2, 10, 'baz', map, assert, true);
util.assertMapping(2, 12, '/the/root/two.js', 1, 11, null, map, assert, true);
// Finding generated positions
util.assertMapping(1, 18, '/the/root/one.js', 1, 22, 'bar', map, assert, null, true);
util.assertMapping(1, 28, '/the/root/one.js', 2, 13, 'baz', map, assert, null, true);
util.assertMapping(2, 9, '/the/root/two.js', 1, 16, null, map, assert, null, true);
};
exports['test mappings and end of lines'] = function (assert, util) {
var smg = new SourceMapGenerator({
file: 'foo.js'
});
smg.addMapping({
original: { line: 1, column: 1 },
generated: { line: 1, column: 1 },
source: 'bar.js'
});
smg.addMapping({
original: { line: 2, column: 2 },
generated: { line: 2, column: 2 },
source: 'bar.js'
});
var map = SourceMapConsumer.fromSourceMap(smg);
// When finding original positions, mappings end at the end of the line.
util.assertMapping(2, 1, null, null, null, null, map, assert, true)
// When finding generated positions, mappings do not end at the end of the line.
util.assertMapping(1, 1, 'bar.js', 2, 1, null, map, assert, null, true);
};
exports['test creating source map consumers with )]}\' prefix'] = function (assert, util) {
assert.doesNotThrow(function () {
var map = new SourceMapConsumer(")]}'" + JSON.stringify(util.testMap));
});
};
exports['test eachMapping'] = function (assert, util) {
var map;
map = new SourceMapConsumer(util.testMap);
var previousLine = -Infinity;
var previousColumn = -Infinity;
map.eachMapping(function (mapping) {
assert.ok(mapping.generatedLine >= previousLine);
assert.ok(mapping.source === '/the/root/one.js' || mapping.source === '/the/root/two.js');
if (mapping.generatedLine === previousLine) {
assert.ok(mapping.generatedColumn >= previousColumn);
previousColumn = mapping.generatedColumn;
}
else {
previousLine = mapping.generatedLine;
previousColumn = -Infinity;
}
});
map = new SourceMapConsumer(util.testMapNoSourceRoot);
map.eachMapping(function (mapping) {
assert.ok(mapping.source === 'one.js' || mapping.source === 'two.js');
});
map = new SourceMapConsumer(util.testMapEmptySourceRoot);
map.eachMapping(function (mapping) {
assert.ok(mapping.source === 'one.js' || mapping.source === 'two.js');
});
};
exports['test iterating over mappings in a different order'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMap);
var previousLine = -Infinity;
var previousColumn = -Infinity;
var previousSource = "";
map.eachMapping(function (mapping) {
assert.ok(mapping.source >= previousSource);
if (mapping.source === previousSource) {
assert.ok(mapping.originalLine >= previousLine);
if (mapping.originalLine === previousLine) {
assert.ok(mapping.originalColumn >= previousColumn);
previousColumn = mapping.originalColumn;
}
else {
previousLine = mapping.originalLine;
previousColumn = -Infinity;
}
}
else {
previousSource = mapping.source;
previousLine = -Infinity;
previousColumn = -Infinity;
}
}, null, SourceMapConsumer.ORIGINAL_ORDER);
};
exports['test that we can set the context for `this` in eachMapping'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMap);
var context = {};
map.eachMapping(function () {
assert.equal(this, context);
}, context);
};
exports['test that the `sourcesContent` field has the original sources'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMapWithSourcesContent);
var sourcesContent = map.sourcesContent;
assert.equal(sourcesContent[0], ' ONE.foo = function (bar) {\n return baz(bar);\n };');
assert.equal(sourcesContent[1], ' TWO.inc = function (n) {\n return n + 1;\n };');
assert.equal(sourcesContent.length, 2);
};
exports['test that we can get the original sources for the sources'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMapWithSourcesContent);
var sources = map.sources;
assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };');
assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };');
assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };');
assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };');
assert.throws(function () {
map.sourceContentFor("");
}, Error);
assert.throws(function () {
map.sourceContentFor("/the/root/three.js");
}, Error);
assert.throws(function () {
map.sourceContentFor("three.js");
}, Error);
};
exports['test that we can get the original source content with relative source paths'] = function (assert, util) {
var map = new SourceMapConsumer(util.testMapRelativeSources);
var sources = map.sources;
assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };');
assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };');
assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };');
assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };');
assert.throws(function () {
map.sourceContentFor("");
}, Error);
assert.throws(function () {
map.sourceContentFor("/the/root/three.js");
}, Error);
assert.throws(function () {
map.sourceContentFor("three.js");
}, Error);
};
exports['test sourceRoot + generatedPositionFor'] = function (assert, util) {
var map = new SourceMapGenerator({
sourceRoot: 'foo/bar',
file: 'baz.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'bang.coffee'
});
map.addMapping({
original: { line: 5, column: 5 },
generated: { line: 6, column: 6 },
source: 'bang.coffee'
});
map = new SourceMapConsumer(map.toString());
// Should handle without sourceRoot.
var pos = map.generatedPositionFor({
line: 1,
column: 1,
source: 'bang.coffee'
});
assert.equal(pos.line, 2);
assert.equal(pos.column, 2);
// Should handle with sourceRoot.
var pos = map.generatedPositionFor({
line: 1,
column: 1,
source: 'foo/bar/bang.coffee'
});
assert.equal(pos.line, 2);
assert.equal(pos.column, 2);
};
exports['test allGeneratedPositionsFor'] = function (assert, util) {
var map = new SourceMapGenerator({
file: 'generated.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'bar.coffee'
});
map.addMapping({
original: { line: 2, column: 1 },
generated: { line: 3, column: 2 },
source: 'bar.coffee'
});
map.addMapping({
original: { line: 2, column: 2 },
generated: { line: 3, column: 3 },
source: 'bar.coffee'
});
map.addMapping({
original: { line: 3, column: 1 },
generated: { line: 4, column: 2 },
source: 'bar.coffee'
});
map = new SourceMapConsumer(map.toString());
var mappings = map.allGeneratedPositionsFor({
line: 2,
source: 'bar.coffee'
});
assert.equal(mappings.length, 2);
assert.equal(mappings[0].line, 3);
assert.equal(mappings[0].column, 2);
assert.equal(mappings[1].line, 3);
assert.equal(mappings[1].column, 3);
};
exports['test allGeneratedPositionsFor for line with no mappings'] = function (assert, util) {
var map = new SourceMapGenerator({
file: 'generated.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'bar.coffee'
});
map.addMapping({
original: { line: 3, column: 1 },
generated: { line: 4, column: 2 },
source: 'bar.coffee'
});
map = new SourceMapConsumer(map.toString());
var mappings = map.allGeneratedPositionsFor({
line: 2,
source: 'bar.coffee'
});
assert.equal(mappings.length, 0);
};
exports['test allGeneratedPositionsFor source map with no mappings'] = function (assert, util) {
var map = new SourceMapGenerator({
file: 'generated.js'
});
map = new SourceMapConsumer(map.toString());
var mappings = map.allGeneratedPositionsFor({
line: 2,
source: 'bar.coffee'
});
assert.equal(mappings.length, 0);
};
exports['test computeColumnSpans'] = function (assert, util) {
var map = new SourceMapGenerator({
file: 'generated.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 1, column: 1 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 2, column: 1 },
generated: { line: 2, column: 1 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 2, column: 2 },
generated: { line: 2, column: 10 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 2, column: 3 },
generated: { line: 2, column: 20 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 3, column: 1 },
generated: { line: 3, column: 1 },
source: 'foo.coffee'
});
map.addMapping({
original: { line: 3, column: 2 },
generated: { line: 3, column: 2 },
source: 'foo.coffee'
});
map = new SourceMapConsumer(map.toString());
map.computeColumnSpans();
var mappings = map.allGeneratedPositionsFor({
line: 1,
source: 'foo.coffee'
});
assert.equal(mappings.length, 1);
assert.equal(mappings[0].lastColumn, Infinity);
var mappings = map.allGeneratedPositionsFor({
line: 2,
source: 'foo.coffee'
});
assert.equal(mappings.length, 3);
assert.equal(mappings[0].lastColumn, 9);
assert.equal(mappings[1].lastColumn, 19);
assert.equal(mappings[2].lastColumn, Infinity);
var mappings = map.allGeneratedPositionsFor({
line: 3,
source: 'foo.coffee'
});
assert.equal(mappings.length, 2);
assert.equal(mappings[0].lastColumn, 1);
assert.equal(mappings[1].lastColumn, Infinity);
};
exports['test sourceRoot + originalPositionFor'] = function (assert, util) {
var map = new SourceMapGenerator({
sourceRoot: 'foo/bar',
file: 'baz.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'bang.coffee'
});
map = new SourceMapConsumer(map.toString());
var pos = map.originalPositionFor({
line: 2,
column: 2,
});
// Should always have the prepended source root
assert.equal(pos.source, 'foo/bar/bang.coffee');
assert.equal(pos.line, 1);
assert.equal(pos.column, 1);
};
exports['test github issue #56'] = function (assert, util) {
var map = new SourceMapGenerator({
sourceRoot: 'http://',
file: 'www.example.com/foo.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'www.example.com/original.js'
});
map = new SourceMapConsumer(map.toString());
var sources = map.sources;
assert.equal(sources.length, 1);
assert.equal(sources[0], 'http://www.example.com/original.js');
};
exports['test github issue #43'] = function (assert, util) {
var map = new SourceMapGenerator({
sourceRoot: 'http://example.com',
file: 'foo.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'http://cdn.example.com/original.js'
});
map = new SourceMapConsumer(map.toString());
var sources = map.sources;
assert.equal(sources.length, 1,
'Should only be one source.');
assert.equal(sources[0], 'http://cdn.example.com/original.js',
'Should not be joined with the sourceRoot.');
};
exports['test absolute path, but same host sources'] = function (assert, util) {
var map = new SourceMapGenerator({
sourceRoot: 'http://example.com/foo/bar',
file: 'foo.js'
});
map.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: '/original.js'
});
map = new SourceMapConsumer(map.toString());
var sources = map.sources;
assert.equal(sources.length, 1,
'Should only be one source.');
assert.equal(sources[0], 'http://example.com/original.js',
'Source should be relative the host of the source root.');
};
exports['test github issue #64'] = function (assert, util) {
var map = new SourceMapConsumer({
"version": 3,
"file": "foo.js",
"sourceRoot": "http://example.com/",
"sources": ["/a"],
"names": [],
"mappings": "AACA",
"sourcesContent": ["foo"]
});
assert.equal(map.sourceContentFor("a"), "foo");
assert.equal(map.sourceContentFor("/a"), "foo");
};
exports['test bug 885597'] = function (assert, util) {
var map = new SourceMapConsumer({
"version": 3,
"file": "foo.js",
"sourceRoot": "file:///Users/AlGore/Invented/The/Internet/",
"sources": ["/a"],
"names": [],
"mappings": "AACA",
"sourcesContent": ["foo"]
});
var s = map.sources[0];
assert.equal(map.sourceContentFor(s), "foo");
};
exports['test github issue #72, duplicate sources'] = function (assert, util) {
var map = new SourceMapConsumer({
"version": 3,
"file": "foo.js",
"sources": ["source1.js", "source1.js", "source3.js"],
"names": [],
"mappings": ";EAAC;;IAEE;;MEEE",
"sourceRoot": "http://example.com"
});
var pos = map.originalPositionFor({
line: 2,
column: 2
});
assert.equal(pos.source, 'http://example.com/source1.js');
assert.equal(pos.line, 1);
assert.equal(pos.column, 1);
var pos = map.originalPositionFor({
line: 4,
column: 4
});
assert.equal(pos.source, 'http://example.com/source1.js');
assert.equal(pos.line, 3);
assert.equal(pos.column, 3);
var pos = map.originalPositionFor({
line: 6,
column: 6
});
assert.equal(pos.source, 'http://example.com/source3.js');
assert.equal(pos.line, 5);
assert.equal(pos.column, 5);
};
exports['test github issue #72, duplicate names'] = function (assert, util) {
var map = new SourceMapConsumer({
"version": 3,
"file": "foo.js",
"sources": ["source.js"],
"names": ["name1", "name1", "name3"],
"mappings": ";EAACA;;IAEEA;;MAEEE",
"sourceRoot": "http://example.com"
});
var pos = map.originalPositionFor({
line: 2,
column: 2
});
assert.equal(pos.name, 'name1');
assert.equal(pos.line, 1);
assert.equal(pos.column, 1);
var pos = map.originalPositionFor({
line: 4,
column: 4
});
assert.equal(pos.name, 'name1');
assert.equal(pos.line, 3);
assert.equal(pos.column, 3);
var pos = map.originalPositionFor({
line: 6,
column: 6
});
assert.equal(pos.name, 'name3');
assert.equal(pos.line, 5);
assert.equal(pos.column, 5);
};
exports['test SourceMapConsumer.fromSourceMap'] = function (assert, util) {
var smg = new SourceMapGenerator({
sourceRoot: 'http://example.com/',
file: 'foo.js'
});
smg.addMapping({
original: { line: 1, column: 1 },
generated: { line: 2, column: 2 },
source: 'bar.js'
});
smg.addMapping({
original: { line: 2, column: 2 },
generated: { line: 4, column: 4 },
source: 'baz.js',
name: 'dirtMcGirt'
});
smg.setSourceContent('baz.js', 'baz.js content');
var smc = SourceMapConsumer.fromSourceMap(smg);
assert.equal(smc.file, 'foo.js');
assert.equal(smc.sourceRoot, 'http://example.com/');
assert.equal(smc.sources.length, 2);
assert.equal(smc.sources[0], 'http://example.com/bar.js');
assert.equal(smc.sources[1], 'http://example.com/baz.js');
assert.equal(smc.sourceContentFor('baz.js'), 'baz.js content');
var pos = smc.originalPositionFor({
line: 2,
column: 2
});
assert.equal(pos.line, 1);
assert.equal(pos.column, 1);
assert.equal(pos.source, 'http://example.com/bar.js');
assert.equal(pos.name, null);
pos = smc.generatedPositionFor({
line: 1,
column: 1,
source: 'http://example.com/bar.js'
});
assert.equal(pos.line, 2);
assert.equal(pos.column, 2);
pos = smc.originalPositionFor({
line: 4,
column: 4
});
assert.equal(pos.line, 2);
assert.equal(pos.column, 2);
assert.equal(pos.source, 'http://example.com/baz.js');
assert.equal(pos.name, 'dirtMcGirt');
pos = smc.generatedPositionFor({
line: 2,
column: 2,
source: 'http://example.com/baz.js'
});
assert.equal(pos.line, 4);
assert.equal(pos.column, 4);
};
});
| kalpak44/liferay_clean_thema | node_modules/liferay-theme-tasks/node_modules/source-map/test/source-map/test-source-map-consumer.js | JavaScript | mit | 21,897 |
"use strict";
exports["default"] = (function() {
/*
* Generated by PEG.js 0.8.0.
*
* http://pegjs.majda.cz/
*/
function peg$subclass(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor();
}
function SyntaxError(message, expected, found, offset, line, column) {
this.message = message;
this.expected = expected;
this.found = found;
this.offset = offset;
this.line = line;
this.column = column;
this.name = "SyntaxError";
}
peg$subclass(SyntaxError, Error);
function parse(input) {
var options = arguments.length > 1 ? arguments[1] : {},
peg$FAILED = {},
peg$startRuleFunctions = { start: peg$parsestart },
peg$startRuleFunction = peg$parsestart,
peg$c0 = [],
peg$c1 = function(elements) {
return {
type : 'messageFormatPattern',
elements: elements
};
},
peg$c2 = peg$FAILED,
peg$c3 = function(text) {
var string = '',
i, j, outerLen, inner, innerLen;
for (i = 0, outerLen = text.length; i < outerLen; i += 1) {
inner = text[i];
for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {
string += inner[j];
}
}
return string;
},
peg$c4 = function(messageText) {
return {
type : 'messageTextElement',
value: messageText
};
},
peg$c5 = /^[^ \t\n\r,.+={}#]/,
peg$c6 = { type: "class", value: "[^ \\t\\n\\r,.+={}#]", description: "[^ \\t\\n\\r,.+={}#]" },
peg$c7 = "{",
peg$c8 = { type: "literal", value: "{", description: "\"{\"" },
peg$c9 = null,
peg$c10 = ",",
peg$c11 = { type: "literal", value: ",", description: "\",\"" },
peg$c12 = "}",
peg$c13 = { type: "literal", value: "}", description: "\"}\"" },
peg$c14 = function(id, format) {
return {
type : 'argumentElement',
id : id,
format: format && format[2]
};
},
peg$c15 = "number",
peg$c16 = { type: "literal", value: "number", description: "\"number\"" },
peg$c17 = "date",
peg$c18 = { type: "literal", value: "date", description: "\"date\"" },
peg$c19 = "time",
peg$c20 = { type: "literal", value: "time", description: "\"time\"" },
peg$c21 = function(type, style) {
return {
type : type + 'Format',
style: style && style[2]
};
},
peg$c22 = "plural",
peg$c23 = { type: "literal", value: "plural", description: "\"plural\"" },
peg$c24 = function(pluralStyle) {
return {
type : pluralStyle.type,
ordinal: false,
offset : pluralStyle.offset || 0,
options: pluralStyle.options
};
},
peg$c25 = "selectordinal",
peg$c26 = { type: "literal", value: "selectordinal", description: "\"selectordinal\"" },
peg$c27 = function(pluralStyle) {
return {
type : pluralStyle.type,
ordinal: true,
offset : pluralStyle.offset || 0,
options: pluralStyle.options
}
},
peg$c28 = "select",
peg$c29 = { type: "literal", value: "select", description: "\"select\"" },
peg$c30 = function(options) {
return {
type : 'selectFormat',
options: options
};
},
peg$c31 = "=",
peg$c32 = { type: "literal", value: "=", description: "\"=\"" },
peg$c33 = function(selector, pattern) {
return {
type : 'optionalFormatPattern',
selector: selector,
value : pattern
};
},
peg$c34 = "offset:",
peg$c35 = { type: "literal", value: "offset:", description: "\"offset:\"" },
peg$c36 = function(number) {
return number;
},
peg$c37 = function(offset, options) {
return {
type : 'pluralFormat',
offset : offset,
options: options
};
},
peg$c38 = { type: "other", description: "whitespace" },
peg$c39 = /^[ \t\n\r]/,
peg$c40 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" },
peg$c41 = { type: "other", description: "optionalWhitespace" },
peg$c42 = /^[0-9]/,
peg$c43 = { type: "class", value: "[0-9]", description: "[0-9]" },
peg$c44 = /^[0-9a-f]/i,
peg$c45 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" },
peg$c46 = "0",
peg$c47 = { type: "literal", value: "0", description: "\"0\"" },
peg$c48 = /^[1-9]/,
peg$c49 = { type: "class", value: "[1-9]", description: "[1-9]" },
peg$c50 = function(digits) {
return parseInt(digits, 10);
},
peg$c51 = /^[^{}\\\0-\x1F \t\n\r]/,
peg$c52 = { type: "class", value: "[^{}\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}\\\\\\0-\\x1F \\t\\n\\r]" },
peg$c53 = "\\#",
peg$c54 = { type: "literal", value: "\\#", description: "\"\\\\#\"" },
peg$c55 = function() { return '\\#'; },
peg$c56 = "\\{",
peg$c57 = { type: "literal", value: "\\{", description: "\"\\\\{\"" },
peg$c58 = function() { return '\u007B'; },
peg$c59 = "\\}",
peg$c60 = { type: "literal", value: "\\}", description: "\"\\\\}\"" },
peg$c61 = function() { return '\u007D'; },
peg$c62 = "\\u",
peg$c63 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
peg$c64 = function(digits) {
return String.fromCharCode(parseInt(digits, 16));
},
peg$c65 = function(chars) { return chars.join(''); },
peg$currPos = 0,
peg$reportedPos = 0,
peg$cachedPos = 0,
peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },
peg$maxFailPos = 0,
peg$maxFailExpected = [],
peg$silentFails = 0,
peg$result;
if ("startRule" in options) {
if (!(options.startRule in peg$startRuleFunctions)) {
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
}
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
}
function text() {
return input.substring(peg$reportedPos, peg$currPos);
}
function offset() {
return peg$reportedPos;
}
function line() {
return peg$computePosDetails(peg$reportedPos).line;
}
function column() {
return peg$computePosDetails(peg$reportedPos).column;
}
function expected(description) {
throw peg$buildException(
null,
[{ type: "other", description: description }],
peg$reportedPos
);
}
function error(message) {
throw peg$buildException(message, null, peg$reportedPos);
}
function peg$computePosDetails(pos) {
function advance(details, startPos, endPos) {
var p, ch;
for (p = startPos; p < endPos; p++) {
ch = input.charAt(p);
if (ch === "\n") {
if (!details.seenCR) { details.line++; }
details.column = 1;
details.seenCR = false;
} else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
details.line++;
details.column = 1;
details.seenCR = true;
} else {
details.column++;
details.seenCR = false;
}
}
}
if (peg$cachedPos !== pos) {
if (peg$cachedPos > pos) {
peg$cachedPos = 0;
peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };
}
advance(peg$cachedPosDetails, peg$cachedPos, pos);
peg$cachedPos = pos;
}
return peg$cachedPosDetails;
}
function peg$fail(expected) {
if (peg$currPos < peg$maxFailPos) { return; }
if (peg$currPos > peg$maxFailPos) {
peg$maxFailPos = peg$currPos;
peg$maxFailExpected = [];
}
peg$maxFailExpected.push(expected);
}
function peg$buildException(message, expected, pos) {
function cleanupExpected(expected) {
var i = 1;
expected.sort(function(a, b) {
if (a.description < b.description) {
return -1;
} else if (a.description > b.description) {
return 1;
} else {
return 0;
}
});
while (i < expected.length) {
if (expected[i - 1] === expected[i]) {
expected.splice(i, 1);
} else {
i++;
}
}
}
function buildMessage(expected, found) {
function stringEscape(s) {
function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }
return s
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"')
.replace(/\x08/g, '\\b')
.replace(/\t/g, '\\t')
.replace(/\n/g, '\\n')
.replace(/\f/g, '\\f')
.replace(/\r/g, '\\r')
.replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
.replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); })
.replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); })
.replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); });
}
var expectedDescs = new Array(expected.length),
expectedDesc, foundDesc, i;
for (i = 0; i < expected.length; i++) {
expectedDescs[i] = expected[i].description;
}
expectedDesc = expected.length > 1
? expectedDescs.slice(0, -1).join(", ")
+ " or "
+ expectedDescs[expected.length - 1]
: expectedDescs[0];
foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";
return "Expected " + expectedDesc + " but " + foundDesc + " found.";
}
var posDetails = peg$computePosDetails(pos),
found = pos < input.length ? input.charAt(pos) : null;
if (expected !== null) {
cleanupExpected(expected);
}
return new SyntaxError(
message !== null ? message : buildMessage(expected, found),
expected,
found,
pos,
posDetails.line,
posDetails.column
);
}
function peg$parsestart() {
var s0;
s0 = peg$parsemessageFormatPattern();
return s0;
}
function peg$parsemessageFormatPattern() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsemessageFormatElement();
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsemessageFormatElement();
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c1(s1);
}
s0 = s1;
return s0;
}
function peg$parsemessageFormatElement() {
var s0;
s0 = peg$parsemessageTextElement();
if (s0 === peg$FAILED) {
s0 = peg$parseargumentElement();
}
return s0;
}
function peg$parsemessageText() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
s1 = [];
s2 = peg$currPos;
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
s4 = peg$parsechars();
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s3 = [s3, s4, s5];
s2 = s3;
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$currPos;
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
s4 = peg$parsechars();
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s3 = [s3, s4, s5];
s2 = s3;
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
}
} else {
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c3(s1);
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = peg$parsews();
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
}
return s0;
}
function peg$parsemessageTextElement() {
var s0, s1;
s0 = peg$currPos;
s1 = peg$parsemessageText();
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c4(s1);
}
s0 = s1;
return s0;
}
function peg$parseargument() {
var s0, s1, s2;
s0 = peg$parsenumber();
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = [];
if (peg$c5.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c6); }
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
if (peg$c5.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c6); }
}
}
} else {
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
}
return s0;
}
function peg$parseargumentElement() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c7;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c8); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargument();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 44) {
s6 = peg$c10;
peg$currPos++;
} else {
s6 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s6 !== peg$FAILED) {
s7 = peg$parse_();
if (s7 !== peg$FAILED) {
s8 = peg$parseelementFormat();
if (s8 !== peg$FAILED) {
s6 = [s6, s7, s8];
s5 = s6;
} else {
peg$currPos = s5;
s5 = peg$c2;
}
} else {
peg$currPos = s5;
s5 = peg$c2;
}
} else {
peg$currPos = s5;
s5 = peg$c2;
}
if (s5 === peg$FAILED) {
s5 = peg$c9;
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s7 = peg$c12;
peg$currPos++;
} else {
s7 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c13); }
}
if (s7 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c14(s3, s5);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseelementFormat() {
var s0;
s0 = peg$parsesimpleFormat();
if (s0 === peg$FAILED) {
s0 = peg$parsepluralFormat();
if (s0 === peg$FAILED) {
s0 = peg$parseselectOrdinalFormat();
if (s0 === peg$FAILED) {
s0 = peg$parseselectFormat();
}
}
}
return s0;
}
function peg$parsesimpleFormat() {
var s0, s1, s2, s3, s4, s5, s6;
s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c15) {
s1 = peg$c15;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c16); }
}
if (s1 === peg$FAILED) {
if (input.substr(peg$currPos, 4) === peg$c17) {
s1 = peg$c17;
peg$currPos += 4;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c18); }
}
if (s1 === peg$FAILED) {
if (input.substr(peg$currPos, 4) === peg$c19) {
s1 = peg$c19;
peg$currPos += 4;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c20); }
}
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 44) {
s4 = peg$c10;
peg$currPos++;
} else {
s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s6 = peg$parsechars();
if (s6 !== peg$FAILED) {
s4 = [s4, s5, s6];
s3 = s4;
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
if (s3 === peg$FAILED) {
s3 = peg$c9;
}
if (s3 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c21(s1, s3);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parsepluralFormat() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c22) {
s1 = peg$c22;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c23); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s3 = peg$c10;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = peg$parsepluralStyle();
if (s5 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c24(s5);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseselectOrdinalFormat() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
if (input.substr(peg$currPos, 13) === peg$c25) {
s1 = peg$c25;
peg$currPos += 13;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c26); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s3 = peg$c10;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = peg$parsepluralStyle();
if (s5 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c27(s5);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseselectFormat() {
var s0, s1, s2, s3, s4, s5, s6;
s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c28) {
s1 = peg$c28;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c29); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s3 = peg$c10;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = [];
s6 = peg$parseoptionalFormatPattern();
if (s6 !== peg$FAILED) {
while (s6 !== peg$FAILED) {
s5.push(s6);
s6 = peg$parseoptionalFormatPattern();
}
} else {
s5 = peg$c2;
}
if (s5 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c30(s5);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseselector() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 61) {
s2 = peg$c31;
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c32); }
}
if (s2 !== peg$FAILED) {
s3 = peg$parsenumber();
if (s3 !== peg$FAILED) {
s2 = [s2, s3];
s1 = s2;
} else {
peg$currPos = s1;
s1 = peg$c2;
}
} else {
peg$currPos = s1;
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$parsechars();
}
return s0;
}
function peg$parseoptionalFormatPattern() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
s0 = peg$currPos;
s1 = peg$parse_();
if (s1 !== peg$FAILED) {
s2 = peg$parseselector();
if (s2 !== peg$FAILED) {
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 123) {
s4 = peg$c7;
peg$currPos++;
} else {
s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c8); }
}
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s6 = peg$parsemessageFormatPattern();
if (s6 !== peg$FAILED) {
s7 = peg$parse_();
if (s7 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s8 = peg$c12;
peg$currPos++;
} else {
s8 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c13); }
}
if (s8 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c33(s2, s6);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseoffset() {
var s0, s1, s2, s3;
s0 = peg$currPos;
if (input.substr(peg$currPos, 7) === peg$c34) {
s1 = peg$c34;
peg$currPos += 7;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c35); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parsenumber();
if (s3 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c36(s3);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parsepluralStyle() {
var s0, s1, s2, s3, s4;
s0 = peg$currPos;
s1 = peg$parseoffset();
if (s1 === peg$FAILED) {
s1 = peg$c9;
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = [];
s4 = peg$parseoptionalFormatPattern();
if (s4 !== peg$FAILED) {
while (s4 !== peg$FAILED) {
s3.push(s4);
s4 = peg$parseoptionalFormatPattern();
}
} else {
s3 = peg$c2;
}
if (s3 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c37(s1, s3);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parsews() {
var s0, s1;
peg$silentFails++;
s0 = [];
if (peg$c39.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c40); }
}
if (s1 !== peg$FAILED) {
while (s1 !== peg$FAILED) {
s0.push(s1);
if (peg$c39.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c40); }
}
}
} else {
s0 = peg$c2;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c38); }
}
return s0;
}
function peg$parse_() {
var s0, s1, s2;
peg$silentFails++;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsews();
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsews();
}
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c41); }
}
return s0;
}
function peg$parsedigit() {
var s0;
if (peg$c42.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c43); }
}
return s0;
}
function peg$parsehexDigit() {
var s0;
if (peg$c44.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c45); }
}
return s0;
}
function peg$parsenumber() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 48) {
s1 = peg$c46;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c47); }
}
if (s1 === peg$FAILED) {
s1 = peg$currPos;
s2 = peg$currPos;
if (peg$c48.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c49); }
}
if (s3 !== peg$FAILED) {
s4 = [];
s5 = peg$parsedigit();
while (s5 !== peg$FAILED) {
s4.push(s5);
s5 = peg$parsedigit();
}
if (s4 !== peg$FAILED) {
s3 = [s3, s4];
s2 = s3;
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
if (s2 !== peg$FAILED) {
s2 = input.substring(s1, peg$currPos);
}
s1 = s2;
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c50(s1);
}
s0 = s1;
return s0;
}
function peg$parsechar() {
var s0, s1, s2, s3, s4, s5, s6, s7;
if (peg$c51.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c52); }
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c53) {
s1 = peg$c53;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c54); }
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c55();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c56) {
s1 = peg$c56;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c57); }
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c58();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c59) {
s1 = peg$c59;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c60); }
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c61();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c62) {
s1 = peg$c62;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c63); }
}
if (s1 !== peg$FAILED) {
s2 = peg$currPos;
s3 = peg$currPos;
s4 = peg$parsehexDigit();
if (s4 !== peg$FAILED) {
s5 = peg$parsehexDigit();
if (s5 !== peg$FAILED) {
s6 = peg$parsehexDigit();
if (s6 !== peg$FAILED) {
s7 = peg$parsehexDigit();
if (s7 !== peg$FAILED) {
s4 = [s4, s5, s6, s7];
s3 = s4;
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
if (s3 !== peg$FAILED) {
s3 = input.substring(s2, peg$currPos);
}
s2 = s3;
if (s2 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c64(s2);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
}
}
}
}
return s0;
}
function peg$parsechars() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsechar();
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsechar();
}
} else {
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c65(s1);
}
s0 = s1;
return s0;
}
peg$result = peg$startRuleFunction();
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
return peg$result;
} else {
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
peg$fail({ type: "end", description: "end of input" });
}
throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
}
}
return {
SyntaxError: SyntaxError,
parse: parse
};
})();
//# sourceMappingURL=parser.js.map | sam17/blog | node_modules/intl-messageformat/node_modules/intl-messageformat-parser/lib/parser.js | JavaScript | mit | 36,839 |
#!/bin/bash
echo "Starting Spark Setup"
ISMASTER="-1"
MASTERIP="10.0.0.4"
STORAGEACCOUNTKEY=""
STORAGEACCOUNTNAME=""
while getopts :m:i:k:a:d:s:h optname; do
echo "Option $optname set with value ${OPTARG}"
case $optname in
m) #Master 1 Slave 0
ISMASTER=${OPTARG}
;;
i)
MASTERIP=${OPTARG}
;;
k)
STORAGEACCOUNTKEY=${OPTARG}
;;
a)
STORAGEACCOUNTNAME=${OPTARG}
;;
esac
done
show_info()
{
echo "Is a Master: $ISMASTER"
echo "Using WASB account name: $STORAGEACCOUNTNAME"
echo "Using WASB Key: $STORAGEACCOUNTKEY"
echo "Using $MASTERIP as master ip"
}
download_extra_libraries()
{
wget -O /tmp/azure-storage-2.0.0.jar https://valueamplifypublic.blob.core.windows.net/public/azure-storage-2.0.0.jar
wget -O /tmp/hadoop-azure-2.7.2.jar https://valueamplifypublic.blob.core.windows.net/public/hadoop-azure-2.7.2.jar
mv /tmp/*.jar /srv/spark/lib
}
install_prerequisites()
{
echo "Working as user $USER"
echo "Updating Suse"
JAVAC=$(which javac)
if [[ -z $JAVAC ]]; then
echo "Installing OpenJDK"
sudo zypper install -y java-1_8_0-openjdk java-1_8_0-openjdk-devel
fi
echo "Downloading external libraries"
download_extra_libraries
}
setup_spark_env_and_defaults()
{
echo "Setting up spark-env.sh and spark-defaults.sh"
cd /usr/local/spark/conf/
cp -p spark-env.sh.template spark-env.sh
touch spark-env.sh
# Main Parameters
echo "export SPARK_MASTER_IP=\"$MASTERIP\"" >> spark-env.sh
echo "export SPARK_MASTER_PORT=7077" >> spark-env.sh
echo "export SPARK_PUBLIC_DNS=\"$MASTERIP\"" >> spark-env.sh
#echo "export SPARK_EXECUTOR_INSTANCES=\"1\"" >> spark-env.sh
# Other Paramters
echo 'export SPARK_WORKER_MEMORY="1g"' >> spark-env.sh
echo 'export SPARK_DRIVER_MEMORY="1g"' >> spark-env.sh
echo 'export SPARK_REPL_MEM="2g"' >> spark-env.sh
echo 'export SPARK_WORKER_PORT=9000' >> spark-env.sh
echo 'export SPARK_CONF_DIR="/usr/local/spark/conf"' >> spark-env.sh
echo 'export SPARK_TMP_DIR="/srv/spark/tmp"' >> spark-env.sh
echo 'export SPARK_PID_DIR="/srv/spark/pids"' >> spark-env.sh
echo 'export SPARK_LOG_DIR="/srv/spark/logs"' >> spark-env.sh
echo 'export SPARK_WORKER_DIR="/srv/spark/work"' >> spark-env.sh
echo 'export SPARK_LOCAL_DIRS="/srv/spark/tmp"' >> spark-env.sh
echo 'export SPARK_COMMON_OPTS="$SPARK_COMMON_OPTS -Dspark.kryoserializer.buffer.mb=32 "' >> spark-env.sh
echo 'LOG4J="-Dlog4j.configuration=file://$SPARK_CONF_DIR/log4j.properties"' >> spark-env.sh
echo 'export SPARK_MASTER_OPTS=" $LOG4J -Dspark.log.file=/srv/spark/logs/master.log "' >> spark-env.sh
echo 'export SPARK_WORKER_OPTS=" $LOG4J -Dspark.log.file=/srv/spark/logs/worker.log "' >> spark-env.sh
echo 'export SPARK_EXECUTOR_OPTS=" $LOG4J -Djava.io.tmpdir=/srv/spark/tmp/executor "' >> spark-env.sh
echo 'export SPARK_REPL_OPTS=" -Djava.io.tmpdir=/srv/spark/tmp/repl/\$USER "' >> spark-env.sh
echo 'export SPARK_APP_OPTS=" -Djava.io.tmpdir=/srv/spark/tmp/app/\$USER "' >> spark-env.sh
echo 'export PYSPARK_PYTHON="/usr/bin/python"' >> spark-env.sh
# Hadoop Related Configs
echo 'export HADOOP_CONF_DIR="/usr/local/spark/conf"' >> spark-env.sh
## Cnofigure Azure Blob storage / Wasb access
touch core-site.xml
echo '<?xml version="1.0" encoding="UTF-8"?>' >> core-site.xml
echo '<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>' >> core-site.xml
echo '<configuration>' >> core-site.xml
echo '<property>' >> core-site.xml
echo "<name>fs.azure.account.key.$STORAGEACCOUNTNAME.blob.core.windows.net</name>" >> core-site.xml
echo "<value>$STORAGEACCOUNTKEY</value>" >> core-site.xml
echo '</property>' >> core-site.xml
echo '</configuration>' >> core-site.xml
# Spark DEFAULTS
cp -p spark-defaults.conf.template spark-defaults.conf
touch spark-defaults.conf
echo "spark.master spark://$MASTERIP:7077" >> spark-defaults.conf
echo 'spark.serializer org.apache.spark.serializer.KryoSerializer' >> spark-defaults.conf
echo 'spark.driver.extraClassPath /srv/spark/lib/*' >> spark-defaults.conf
echo 'spark.executor.extraClassPath /srv/spark/lib/*' >> spark-defaults.conf
cd ~
}
install_spark()
{
cd ~
mkdir /usr/local/sparkforsuse
cd /usr/local/sparkforsuse
wget http://mirrors.advancedhosters.com/apache/spark/spark-2.0.1/spark-2.0.1-bin-hadoop2.7.tgz
tar xvzf spark-2.0.1-bin-hadoop2.7.tgz > /tmp/spark_unzip.log
rm spark-2.0.1-bin-hadoop2.7.tgz
mv spark-2.0.1-bin-hadoop2.7 ../
cd ..
cd /usr/local/
rm -rf sparkforsuse
sudo ln -s spark-2.0.1-bin-hadoop2.7 spark
# Adding "spark" user for launching master and slave processes
sudo groupadd spark
sudo useradd -g spark spark
#sudo adduser spark sudo
sudo mkdir /home/spark
sudo chown spark:spark /home/spark
echo "spark ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/90-cloud-init-users
sudo chown -R spark:spark /usr/local/spark/
rm -f ~/.ssh/id_rsa
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
sudo mkdir -p /srv/spark/{logs,work,tmp,pids,lib}
sudo chown -R spark:spark /srv/spark
sudo chmod 4755 /srv/spark/tmp
download_extra_libraries
setup_spark_env_and_defaults
sudo su spark
rm -f ~/.ssh/id_rsa
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
}
launch_spark()
{
sudo su spark
# need to say yes to every question
ssh localhost
cd /usr/local/spark
if [ ${ISMASTER} -eq "1" ];
then
./sbin/start-master.sh
else
./sbin/start-slave.sh spark://$MASTERIP:7077
fi
}
setup_environment_for_all_users()
{
echo "Configuring SPARK_HOME, JAVA_HOME and PATH"
echo 'export SPARK_HOME="/usr/local/spark"' >> /etc/profile
echo 'export SPARK_HOME="/usr/local/spark"' >> /etc/profile.local
echo 'export JAVA_HOME=/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre' >> /etc/profile.local
echo 'export JAVA_HOME=/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre' >> /etc/profile
echo 'export PATH=$PATH:$JAVA_HOME/bin:$SPARK_HOME/bin' >> /etc/profile.local
echo 'export PATH=$PATH:$JAVA_HOME/bin:$SPARK_HOME/bin' >> /etc/profile
}
show_info > /tmp/install_info.log
install_prerequisites > /tmp/install_prerequisites.log
install_spark > /tmp/install_spark.log
setup_environment_for_all_users > /tmp/setup_environment_for_all_users.log
launch_spark > /tmp/launch_spark.log
| tibor19/azure-quickstart-templates | spark-2.0-on-suse/scripts/install_spark_environment.sh | Shell | mit | 6,319 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
using System.Xml.Schema;
using System.Xml.Xsl.Qil;
using System.Xml.Xsl.Runtime;
namespace System.Xml.Xsl.XPath
{
using T = XmlQueryTypeFactory;
internal class XPathQilFactory : QilPatternFactory
{
public XPathQilFactory(QilFactory f, bool debug) : base(f, debug)
{
}
// Helper methods used in addition to QilPatternFactory's ones
public QilNode Error(string res, QilNode args)
{
return Error(InvokeFormatMessage(String(res), args));
}
public QilNode Error(ISourceLineInfo lineInfo, string res, params string[] args)
{
return Error(String(XslLoadException.CreateMessage(lineInfo, res, args)));
}
public QilIterator FirstNode(QilNode n)
{
CheckNodeSet(n);
QilIterator i = For(DocOrderDistinct(n));
return For(Filter(i, Eq(PositionOf(i), Int32(1))));
}
public bool IsAnyType(QilNode n)
{
XmlQueryType xt = n.XmlType;
bool result = !(xt.IsStrict || xt.IsNode);
Debug.Assert(result == (xt.TypeCode == XmlTypeCode.Item || xt.TypeCode == XmlTypeCode.AnyAtomicType), "What else can it be?");
return result;
}
[Conditional("DEBUG")]
public void CheckNode(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsSingleton && n.XmlType.IsNode, "Must be a singleton node");
}
[Conditional("DEBUG")]
public void CheckNodeSet(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsNode, "Must be a node-set");
}
[Conditional("DEBUG")]
public void CheckNodeNotRtf(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsSingleton && n.XmlType.IsNode && n.XmlType.IsNotRtf, "Must be a singleton node and not an Rtf");
}
[Conditional("DEBUG")]
public void CheckString(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.StringX), "Must be a singleton string");
}
[Conditional("DEBUG")]
public void CheckStringS(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.StringXS), "Must be a sequence of strings");
}
[Conditional("DEBUG")]
public void CheckDouble(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.DoubleX), "Must be a singleton Double");
}
[Conditional("DEBUG")]
public void CheckBool(QilNode n)
{
Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.BooleanX), "Must be a singleton Bool");
}
// Return true if inferred type of the given expression is never a subtype of T.NodeS
public bool CannotBeNodeSet(QilNode n)
{
XmlQueryType xt = n.XmlType;
// Do not report compile error if n is a VarPar, whose inferred type forbids nodes (SQLBUDT 339398)
return xt.IsAtomicValue && !xt.IsEmpty && !(n is QilIterator);
}
public QilNode SafeDocOrderDistinct(QilNode n)
{
XmlQueryType xt = n.XmlType;
if (xt.MaybeMany)
{
if (xt.IsNode && xt.IsNotRtf)
{
// node-set
return DocOrderDistinct(n);
}
else if (!xt.IsAtomicValue)
{
QilIterator i;
return Loop(i = Let(n),
Conditional(Gt(Length(i), Int32(1)),
DocOrderDistinct(TypeAssert(i, T.NodeNotRtfS)),
i
)
);
}
}
return n;
}
public QilNode InvokeFormatMessage(QilNode res, QilNode args)
{
CheckString(res);
CheckStringS(args);
return XsltInvokeEarlyBound(QName("format-message"),
XsltMethods.FormatMessage, T.StringX, new QilNode[] { res, args }
);
}
#region Comparisons
public QilNode InvokeEqualityOperator(QilNodeType op, QilNode left, QilNode right)
{
Debug.Assert(op == QilNodeType.Eq || op == QilNodeType.Ne);
double opCode;
left = TypeAssert(left, T.ItemS);
right = TypeAssert(right, T.ItemS);
switch (op)
{
case QilNodeType.Eq: opCode = (double)XsltLibrary.ComparisonOperator.Eq; break;
default: opCode = (double)XsltLibrary.ComparisonOperator.Ne; break;
}
return XsltInvokeEarlyBound(QName("EqualityOperator"),
XsltMethods.EqualityOperator, T.BooleanX, new QilNode[] { Double(opCode), left, right }
);
}
public QilNode InvokeRelationalOperator(QilNodeType op, QilNode left, QilNode right)
{
Debug.Assert(op == QilNodeType.Lt || op == QilNodeType.Le || op == QilNodeType.Gt || op == QilNodeType.Ge);
double opCode;
left = TypeAssert(left, T.ItemS);
right = TypeAssert(right, T.ItemS);
switch (op)
{
case QilNodeType.Lt: opCode = (double)XsltLibrary.ComparisonOperator.Lt; break;
case QilNodeType.Le: opCode = (double)XsltLibrary.ComparisonOperator.Le; break;
case QilNodeType.Gt: opCode = (double)XsltLibrary.ComparisonOperator.Gt; break;
default: opCode = (double)XsltLibrary.ComparisonOperator.Ge; break;
}
return XsltInvokeEarlyBound(QName("RelationalOperator"),
XsltMethods.RelationalOperator, T.BooleanX, new QilNode[] { Double(opCode), left, right }
);
}
#endregion
#region Type Conversions
[Conditional("DEBUG")]
private void ExpectAny(QilNode n)
{
Debug.Assert(IsAnyType(n), "Unexpected expression type: " + n.XmlType.ToString());
}
public QilNode ConvertToType(XmlTypeCode requiredType, QilNode n)
{
switch (requiredType)
{
case XmlTypeCode.String: return ConvertToString(n);
case XmlTypeCode.Double: return ConvertToNumber(n);
case XmlTypeCode.Boolean: return ConvertToBoolean(n);
case XmlTypeCode.Node: return EnsureNodeSet(n);
case XmlTypeCode.Item: return n;
default: Debug.Fail("Unexpected XmlTypeCode: " + requiredType); return null;
}
}
// XPath spec $4.2, string()
public QilNode ConvertToString(QilNode n)
{
switch (n.XmlType.TypeCode)
{
case XmlTypeCode.Boolean:
return (
n.NodeType == QilNodeType.True ? (QilNode)String("true") :
n.NodeType == QilNodeType.False ? (QilNode)String("false") :
/*default: */ (QilNode)Conditional(n, String("true"), String("false"))
);
case XmlTypeCode.Double:
return (n.NodeType == QilNodeType.LiteralDouble
? (QilNode)String(XPathConvert.DoubleToString((double)(QilLiteral)n))
: (QilNode)XsltConvert(n, T.StringX)
);
case XmlTypeCode.String:
return n;
default:
if (n.XmlType.IsNode)
{
return XPathNodeValue(SafeDocOrderDistinct(n));
}
ExpectAny(n);
return XsltConvert(n, T.StringX);
}
}
// XPath spec $4.3, boolean()
public QilNode ConvertToBoolean(QilNode n)
{
switch (n.XmlType.TypeCode)
{
case XmlTypeCode.Boolean:
return n;
case XmlTypeCode.Double:
// (x < 0 || 0 < x) == (x != 0) && !Double.IsNaN(x)
QilIterator i;
return (n.NodeType == QilNodeType.LiteralDouble
? Boolean((double)(QilLiteral)n < 0 || 0 < (double)(QilLiteral)n)
: Loop(i = Let(n), Or(Lt(i, Double(0)), Lt(Double(0), i)))
);
case XmlTypeCode.String:
return (n.NodeType == QilNodeType.LiteralString
? Boolean(((string)(QilLiteral)n).Length != 0)
: Ne(StrLength(n), Int32(0))
);
default:
if (n.XmlType.IsNode)
{
return Not(IsEmpty(n));
}
ExpectAny(n);
return XsltConvert(n, T.BooleanX);
}
}
// XPath spec $4.4, number()
public QilNode ConvertToNumber(QilNode n)
{
switch (n.XmlType.TypeCode)
{
case XmlTypeCode.Boolean:
return (
n.NodeType == QilNodeType.True ? (QilNode)Double(1) :
n.NodeType == QilNodeType.False ? (QilNode)Double(0) :
/*default: */ (QilNode)Conditional(n, Double(1), Double(0))
);
case XmlTypeCode.Double:
return n;
case XmlTypeCode.String:
return XsltConvert(n, T.DoubleX);
default:
if (n.XmlType.IsNode)
{
return XsltConvert(XPathNodeValue(SafeDocOrderDistinct(n)), T.DoubleX);
}
ExpectAny(n);
return XsltConvert(n, T.DoubleX);
}
}
public QilNode ConvertToNode(QilNode n)
{
if (n.XmlType.IsNode && n.XmlType.IsNotRtf && n.XmlType.IsSingleton)
{
return n;
}
return XsltConvert(n, T.NodeNotRtf);
}
public QilNode ConvertToNodeSet(QilNode n)
{
if (n.XmlType.IsNode && n.XmlType.IsNotRtf)
{
return n;
}
return XsltConvert(n, T.NodeNotRtfS);
}
// Returns null if the given expression is never a node-set
public QilNode TryEnsureNodeSet(QilNode n)
{
if (n.XmlType.IsNode && n.XmlType.IsNotRtf)
{
return n;
}
if (CannotBeNodeSet(n))
{
return null;
}
// Ensure it is not an Rtf at runtime
return InvokeEnsureNodeSet(n);
}
// Throws an exception if the given expression is never a node-set
public QilNode EnsureNodeSet(QilNode n)
{
QilNode result = TryEnsureNodeSet(n);
if (result == null)
{
throw new XPathCompileException(SR.XPath_NodeSetExpected);
}
return result;
}
public QilNode InvokeEnsureNodeSet(QilNode n)
{
return XsltInvokeEarlyBound(QName("ensure-node-set"),
XsltMethods.EnsureNodeSet, T.NodeSDod, new QilNode[] { n }
);
}
#endregion
#region Other XPath Functions
public QilNode Id(QilNode context, QilNode id)
{
CheckNodeNotRtf(context);
if (id.XmlType.IsSingleton)
{
return Deref(context, ConvertToString(id));
}
QilIterator i;
return Loop(i = For(id), Deref(context, ConvertToString(i)));
}
public QilNode InvokeStartsWith(QilNode str1, QilNode str2)
{
CheckString(str1);
CheckString(str2);
return XsltInvokeEarlyBound(QName("starts-with"),
XsltMethods.StartsWith, T.BooleanX, new QilNode[] { str1, str2 }
);
}
public QilNode InvokeContains(QilNode str1, QilNode str2)
{
CheckString(str1);
CheckString(str2);
return XsltInvokeEarlyBound(QName("contains"),
XsltMethods.Contains, T.BooleanX, new QilNode[] { str1, str2 }
);
}
public QilNode InvokeSubstringBefore(QilNode str1, QilNode str2)
{
CheckString(str1);
CheckString(str2);
return XsltInvokeEarlyBound(QName("substring-before"),
XsltMethods.SubstringBefore, T.StringX, new QilNode[] { str1, str2 }
);
}
public QilNode InvokeSubstringAfter(QilNode str1, QilNode str2)
{
CheckString(str1);
CheckString(str2);
return XsltInvokeEarlyBound(QName("substring-after"),
XsltMethods.SubstringAfter, T.StringX, new QilNode[] { str1, str2 }
);
}
public QilNode InvokeSubstring(QilNode str, QilNode start)
{
CheckString(str);
CheckDouble(start);
return XsltInvokeEarlyBound(QName("substring"),
XsltMethods.Substring2, T.StringX, new QilNode[] { str, start }
);
}
public QilNode InvokeSubstring(QilNode str, QilNode start, QilNode length)
{
CheckString(str);
CheckDouble(start);
CheckDouble(length);
return XsltInvokeEarlyBound(QName("substring"),
XsltMethods.Substring3, T.StringX, new QilNode[] { str, start, length }
);
}
public QilNode InvokeNormalizeSpace(QilNode str)
{
CheckString(str);
return XsltInvokeEarlyBound(QName("normalize-space"),
XsltMethods.NormalizeSpace, T.StringX, new QilNode[] { str }
);
}
public QilNode InvokeTranslate(QilNode str1, QilNode str2, QilNode str3)
{
CheckString(str1);
CheckString(str2);
CheckString(str3);
return XsltInvokeEarlyBound(QName("translate"),
XsltMethods.Translate, T.StringX, new QilNode[] { str1, str2, str3 }
);
}
public QilNode InvokeLang(QilNode lang, QilNode context)
{
CheckString(lang);
CheckNodeNotRtf(context);
return XsltInvokeEarlyBound(QName(nameof(lang)),
XsltMethods.Lang, T.BooleanX, new QilNode[] { lang, context }
);
}
public QilNode InvokeFloor(QilNode value)
{
CheckDouble(value);
return XsltInvokeEarlyBound(QName("floor"),
XsltMethods.Floor, T.DoubleX, new QilNode[] { value }
);
}
public QilNode InvokeCeiling(QilNode value)
{
CheckDouble(value);
return XsltInvokeEarlyBound(QName("ceiling"),
XsltMethods.Ceiling, T.DoubleX, new QilNode[] { value }
);
}
public QilNode InvokeRound(QilNode value)
{
CheckDouble(value);
return XsltInvokeEarlyBound(QName("round"),
XsltMethods.Round, T.DoubleX, new QilNode[] { value }
);
}
#endregion
}
}
| rjxby/corefx | src/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathQilFactory.cs | C# | mit | 15,747 |
/**
* @license Highcharts JS v6.0.1 (2017-10-05)
* StaticScale
*
* (c) 2016 Torstein Honsi, Lars A. V. Cabrera
*
* --- WORK IN PROGRESS ---
*
* License: www.highcharts.com/license
*/
'use strict';
(function(factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else {
factory(Highcharts);
}
}(function(Highcharts) {
(function(H) {
/**
* (c) 2017 Torstein Honsi, Lars Cabrera
*
* License: www.highcharts.com/license
*/
var Chart = H.Chart,
each = H.each,
pick = H.pick;
Chart.prototype.adjustHeight = function() {
each(this.axes, function(axis) {
var chart = axis.chart,
animate = !!chart.initiatedScale && chart.options.animation,
staticScale = axis.options.staticScale,
height,
diff;
if (
H.isNumber(staticScale) &&
!axis.horiz &&
H.defined(axis.min)
) {
height = pick(
axis.unitLength,
axis.max + axis.tickInterval - axis.min
) * staticScale;
// Minimum height is 1 x staticScale.
height = Math.max(height, staticScale);
diff = height - chart.plotHeight;
if (Math.abs(diff) >= 1) {
chart.plotHeight = height;
chart.setSize(null, chart.chartHeight + diff, animate);
}
}
});
this.initiatedScale = true;
};
H.addEvent(Chart.prototype, 'render', Chart.prototype.adjustHeight);
}(Highcharts));
}));
| froala/cdnjs | ajax/libs/highcharts/6.0.1/js/modules/static-scale.src.js | JavaScript | mit | 1,861 |
exports.setUp = function(callback) {
callback();
}
exports.tearDown = function(callback) {
callback();
}
exports['Initialize a security Buffer Descriptor'] = function(test) {
var SecurityBufferDescriptor = require('../../lib/sspi.js').SecurityBufferDescriptor
SecurityBuffer = require('../../lib/sspi.js').SecurityBuffer;
// Create descriptor with single Buffer
var securityDescriptor = new SecurityBufferDescriptor(100);
try {
// Fail to work due to no valid Security Buffer
securityDescriptor = new SecurityBufferDescriptor(["hello"]);
test.ok(false);
} catch(err){}
// Should Correctly construct SecurityBuffer
var buffer = new SecurityBuffer(SecurityBuffer.DATA, 100);
securityDescriptor = new SecurityBufferDescriptor([buffer]);
// Should correctly return a buffer
var result = securityDescriptor.toBuffer();
test.equal(100, result.length);
// Should Correctly construct SecurityBuffer
var buffer = new SecurityBuffer(SecurityBuffer.DATA, new Buffer("hello world"));
securityDescriptor = new SecurityBufferDescriptor([buffer]);
var result = securityDescriptor.toBuffer();
test.equal("hello world", result.toString());
// Test passing in more than one Buffer
var buffer = new SecurityBuffer(SecurityBuffer.DATA, new Buffer("hello world"));
var buffer2 = new SecurityBuffer(SecurityBuffer.STREAM, new Buffer("adam and eve"));
securityDescriptor = new SecurityBufferDescriptor([buffer, buffer2]);
var result = securityDescriptor.toBuffer();
test.equal("hello worldadam and eve", result.toString());
test.done();
} | fmchao/myCloset | node_modules/mongoose/node_modules/mquery/node_modules/mongodb/node_modules/kerberos/test/win32/security_buffer_descriptor_tests.js | JavaScript | mit | 1,627 |
/*
http-host.c - thread-safe host lookup
Copyright (C) 2008 siliconforks.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <config.h>
#include "http-server.h"
#include "util.h"
int xgethostbyname(const char * host, struct in_addr * a) {
#if defined(__CYGWIN__) || defined(__MINGW32__)
/* gethostbyname is thread-safe */
struct hostent * p = gethostbyname(host);
if (p == NULL || p->h_addrtype != AF_INET) {
return -1;
}
*a = *((struct in_addr *) p->h_addr);
return 0;
#elif HAVE_GETADDRINFO
struct addrinfo hints;
hints.ai_flags = 0;
hints.ai_family = PF_INET;
hints.ai_socktype = 0;
hints.ai_protocol = 0;
hints.ai_addrlen = 0;
hints.ai_addr = NULL;
hints.ai_canonname = NULL;
hints.ai_next = NULL;
struct addrinfo * p;
int result = getaddrinfo(host, NULL, &hints, &p);
if (result != 0 || p == NULL) {
return -1;
}
if (p->ai_family != PF_INET) {
freeaddrinfo(p);
return -1;
}
struct sockaddr_in * address_and_port = (struct sockaddr_in *) p->ai_addr;
*a = address_and_port->sin_addr;
freeaddrinfo(p);
return 0;
#elif HAVE_GETHOSTBYNAME_R
struct hostent h;
struct hostent * p;
char * buffer;
size_t buffer_size;
int error;
int result;
buffer_size = 1024;
buffer = xmalloc(buffer_size);
while ((result = gethostbyname_r(host, &h, buffer, buffer_size, &p, &error)) == ERANGE) {
buffer_size = mulst(buffer_size, 2);
buffer = xrealloc(buffer, buffer_size);
}
if (result != 0 || p == NULL || p->h_addrtype != AF_INET) {
free(buffer);
return -1;
}
*a = *((struct in_addr *) p->h_addr);
free(buffer);
return 0;
#else
#error "No thread-safe host lookup available"
#endif
}
#ifndef HAVE_INET_ATON
int inet_aton(const char * name, struct in_addr * a) {
unsigned long result = inet_addr(name);
if (result == INADDR_NONE) {
return 0;
}
else {
a->s_addr = result;
return 1;
}
}
#endif
| ExtPoint/extnodeunit | deps/ejs/node_modules/expresso/deps/jscoverage/http-host.c | C | mit | 2,611 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>ColVis example - Two tables with individual controls</title>
<link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="../css/dataTables.colVis.css">
<link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="../js/dataTables.colVis.js"></script>
<script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
<script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
$('table.display').DataTable( {
dom: 'C<"clear">lfrtip',
displayLength: 5
} );
} );
</script>
</head>
<body class="dt-example">
<div class="container">
<section>
<h1>ColVis example <span>Two tables with individual controls</span></h1>
<div class="info">
<p>It can be useful to have DataTables initialise more than one table with a single call can for them
to each have individual ColVis controllers. All this requires is a suitable jQuery selector to be used,
and DataTables and ColVis will take care of the rest - as shown in this example.</p>
</div>
<table id="" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>$320,800</td>
</tr>
<tr>
<td>Cedric Kelly</td>
<td>Senior Javascript Developer</td>
<td>Edinburgh</td>
<td>22</td>
<td>$433,060</td>
</tr>
<tr>
<td>Sonya Frost</td>
<td>Software Engineer</td>
<td>Edinburgh</td>
<td>23</td>
<td>$103,600</td>
</tr>
<tr>
<td>Quinn Flynn</td>
<td>Support Lead</td>
<td>Edinburgh</td>
<td>22</td>
<td>$342,000</td>
</tr>
<tr>
<td>Dai Rios</td>
<td>Personnel Lead</td>
<td>Edinburgh</td>
<td>35</td>
<td>$217,500</td>
</tr>
<tr>
<td>Gavin Joyce</td>
<td>Developer</td>
<td>Edinburgh</td>
<td>42</td>
<td>$92,575</td>
</tr>
<tr>
<td>Martena Mccray</td>
<td>Post-Sales support</td>
<td>Edinburgh</td>
<td>46</td>
<td>$324,050</td>
</tr>
<tr>
<td>Jennifer Acosta</td>
<td>Junior Javascript Developer</td>
<td>Edinburgh</td>
<td>43</td>
<td>$75,650</td>
</tr>
<tr>
<td>Shad Decker</td>
<td>Regional Director</td>
<td>Edinburgh</td>
<td>51</td>
<td>$183,000</td>
</tr>
</tbody>
</table>
<table id="" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Jena Gaines</td>
<td>Office Manager</td>
<td>London</td>
<td>30</td>
<td>$90,560</td>
</tr>
<tr>
<td>Haley Kennedy</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>43</td>
<td>$313,500</td>
</tr>
<tr>
<td>Tatyana Fitzpatrick</td>
<td>Regional Director</td>
<td>London</td>
<td>19</td>
<td>$385,750</td>
</tr>
<tr>
<td>Michael Silva</td>
<td>Marketing Designer</td>
<td>London</td>
<td>66</td>
<td>$198,500</td>
</tr>
<tr>
<td>Bradley Greer</td>
<td>Software Engineer</td>
<td>London</td>
<td>41</td>
<td>$132,000</td>
</tr>
<tr>
<td>Angelica Ramos</td>
<td>Chief Executive Officer (CEO)</td>
<td>London</td>
<td>47</td>
<td>$1,200,000</td>
</tr>
<tr>
<td>Suki Burks</td>
<td>Developer</td>
<td>London</td>
<td>53</td>
<td>$114,500</td>
</tr>
<tr>
<td>Prescott Bartlett</td>
<td>Technical Author</td>
<td>London</td>
<td>27</td>
<td>$145,000</td>
</tr>
<tr>
<td>Timothy Mooney</td>
<td>Office Manager</td>
<td>London</td>
<td>37</td>
<td>$136,200</td>
</tr>
<tr>
<td>Bruno Nash</td>
<td>Software Engineer</td>
<td>London</td>
<td>38</td>
<td>$163,500</td>
</tr>
<tr>
<td>Hermione Butler</td>
<td>Regional Director</td>
<td>London</td>
<td>47</td>
<td>$356,250</td>
</tr>
<tr>
<td>Lael Greer</td>
<td>Systems Administrator</td>
<td>London</td>
<td>21</td>
<td>$103,500</td>
</tr>
</tbody>
</table>
<ul class="tabs">
<li class="active">Javascript</li>
<li>HTML</li>
<li>CSS</li>
<li>Ajax</li>
<li>Server-side script</li>
</ul>
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
$('table.display').DataTable( {
dom: 'C<"clear">lfrtip',
displayLength: 5
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<ul>
<li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
<li><a href=
"../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
<li><a href="../js/dataTables.colVis.js">../js/dataTables.colVis.js</a></li>
</ul>
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<ul>
<li><a href=
"../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
<li><a href="../css/dataTables.colVis.css">../css/dataTables.colVis.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
</div>
</div>
</section>
</div>
<section>
<div class="footer">
<div class="gradient"></div>
<div class="liner">
<h2>Other examples</h2>
<div class="toc">
<div class="toc-group">
<h3><a href="./index.html">Examples</a></h3>
<ul class="toc active">
<li><a href="./simple.html">Basic initialisation</a></li>
<li><a href="./new_init.html">`new` initialisation</a></li>
<li><a href="./text.html">Custom button text</a></li>
<li><a href="./exclude_columns.html">Exclude columns from list</a></li>
<li><a href="./title_callback.html">Column button callback</a></li>
<li><a href="./button_order.html">Button ordering</a></li>
<li><a href="./mouseover.html">Mouseover activation</a></li>
<li><a href="./group_columns.html">Group columns</a></li>
<li class="active"><a href="./two_tables.html">Two tables with individual controls</a></li>
<li><a href="./two_tables_identical.html">Two tables with shared controls</a></li>
<li><a href="./restore.html">Restore / show all</a></li>
<li><a href="./jqueryui.html">jQuery UI styling</a></li>
</ul>
</div>
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2014<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>
</div>
</section>
</body>
</html> | 3773nortiz/seatplan-management-system | public/assets/vendor/jquery-datatables/extras/ColVis/examples/two_tables.html | HTML | mit | 10,021 |
(function($) {
/**
* The Dutch language package
* Translated by @jvanderheide
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Voer een geldige Base64 geëncodeerde tekst in'
},
between: {
'default': 'Voer een waarde in van %s tot en met %s',
notInclusive: 'Voer een waarde die tussen %s en %s ligt'
},
callback: {
'default': 'Voer een geldige waarde in'
},
choice: {
'default': 'Voer een geldige waarde in',
less: 'Kies minimaal %s optie(s)',
more: 'Kies maximaal %s opties',
between: 'Kies tussen de %s - %s opties'
},
creditCard: {
'default': 'Voer een geldig creditcardnummer in'
},
cusip: {
'default': 'Voer een geldig CUSIP-nummer in'
},
cvv: {
'default': 'Voer een geldig CVV-nummer in'
},
date: {
'default': 'Voer een geldige datum in'
},
different: {
'default': 'Voer een andere waarde in'
},
digits: {
'default': 'Voer enkel cijfers in'
},
ean: {
'default': 'Voer een geldige EAN-code in'
},
emailAddress: {
'default': 'Voer een geldig e-mailadres in'
},
file: {
'default': 'Kies een geldig bestand'
},
greaterThan: {
'default': 'Voer een waarde in die gelijk is aan of groter is dan %s',
notInclusive: 'Voer een waarde in die is groter dan %s'
},
grid: {
'default': 'Voer een geldig GRId-nummer in'
},
hex: {
'default': 'Voer een geldig hexadecimaal nummer in'
},
hexColor: {
'default': 'Voer een geldige hexadecimale kleurcode in'
},
iban: {
'default': 'Voer een geldig IBAN nummer in',
countryNotSupported: 'De land code %s wordt niet ondersteund',
country: 'Voer een geldig IBAN nummer in uit %s',
countries: {
AD: 'Andorra',
AE: 'de Verenigde Arabische Emiraten',
AL: 'Albania',
AO: 'Angola',
AT: 'Oostenrijk',
AZ: 'Azerbeidzjan',
BA: 'Bosnië-Herzegovina',
BE: 'België',
BF: 'Burkina Faso',
BG: 'Bulgarije"',
BH: 'Bahrein',
BI: 'Burundi',
BJ: 'Benin',
BR: 'Brazilië',
CH: 'Zwitserland',
CI: 'Ivoorkust',
CM: 'Kameroen',
CR: 'Costa Rica',
CV: 'Cape Verde',
CY: 'Cyprus',
CZ: 'Tsjechië',
DE: 'Duitsland',
DK: 'Denemarken',
DO: 'de Dominicaanse Republiek',
DZ: 'Algerije',
EE: 'Estland',
ES: 'Spanje',
FI: 'Finland',
FO: 'de Faeröer',
FR: 'Frankrijk',
GB: 'het Verenigd Koninkrijk',
GE: 'Georgia',
GI: 'Gibraltar',
GL: 'Groenland',
GR: 'Griekenland',
GT: 'Guatemala',
HR: 'Kroatië',
HU: 'Hongarije',
IE: 'Ierland',
IL: 'Israël',
IR: 'Iran',
IS: 'IJsland',
IT: 'Italië',
JO: 'Jordan',
KW: 'Koeweit',
KZ: 'Kazachstan',
LB: 'Libanon',
LI: 'Liechtenstein',
LT: 'Litouwen',
LU: 'Luxemburg',
LV: 'Letland',
MC: 'Monaco',
MD: 'Moldavië',
ME: 'Montenegro',
MG: 'Madagascar',
MK: 'Macedonië',
ML: 'Mali',
MR: 'Mauretanië',
MT: 'Malta',
MU: 'Mauritius',
MZ: 'Mozambique',
NL: 'Nederland',
NO: 'Noorwegen',
PK: 'Pakistan',
PL: 'Polen',
PS: 'Palestina',
PT: 'Portugal',
QA: 'Qatar',
RO: 'Roemenië',
RS: 'Servië',
SA: 'Saudi-Arabië',
SE: 'Zweden',
SI: 'Slovenië',
SK: 'Slowakije',
SM: 'San Marino',
SN: 'Senegal',
TN: 'Tunesië',
TR: 'Turkije',
VG: 'de Britse Maagdeneilanden'
}
},
id: {
'default': 'Voer een geldig identificatie nummer in',
countryNotSupported: 'De land code %s wordt niet ondersteund',
country: 'Voer een geldig %s identificatie nummer in',
countries: {
BA: 'Bosnisch',
BG: 'Bulgaars',
BR: 'Braziliaans',
CH: 'Zwitsers',
CL: 'Chileens',
CZ: 'Tsjechisch',
DK: 'Deens',
EE: 'Estisch',
ES: 'Spaans',
FI: 'Fins',
HR: 'Kroatisch',
IE: 'Iers',
IS: 'IJslands',
LT: 'Litouws',
LV: 'Lets',
ME: 'Montenegrijns',
MK: 'Macedonisch',
NL: 'Nederlands',
RO: 'Roemeens',
RS: 'Servisch',
SE: 'Zweeds',
SI: 'Sloveens',
SK: 'Slowaaks',
SM: 'San Marinees',
ZA: 'Zuid-Afrikaans'
}
},
identical: {
'default': 'Voer dezelfde waarde in'
},
imei: {
'default': 'Voer een geldig IMEI-nummer in'
},
imo: {
'default': 'Voer een geldig IMO-nummer in'
},
integer: {
'default': 'Voer een geldig getal in'
},
ip: {
'default': 'Voer een geldig IP adres in',
ipv4: 'Voer een geldig IPv4 adres in',
ipv6: 'Voer een geldig IPv6 adres in'
},
isbn: {
'default': 'Voer een geldig ISBN-nummer in'
},
isin: {
'default': 'Voer een geldig ISIN-nummer in'
},
ismn: {
'default': 'Voer een geldig ISMN-nummer in'
},
issn: {
'default': 'Voer een geldig ISSN-nummer in'
},
lessThan: {
'default': 'Voer een waarde in gelijk aan of kleiner dan %s',
notInclusive: 'Voer een waarde in kleiner dan %s'
},
mac: {
'default': 'Voer een geldig MAC adres in'
},
meid: {
'default': 'Voer een geldig MEID-nummer in'
},
notEmpty: {
'default': 'Voer een waarde in'
},
numeric: {
'default': 'Voer een geldig kommagetal in'
},
phone: {
'default': 'Voer een geldig telefoonnummer in',
countryNotSupported: 'De land code %s wordt niet ondersteund',
country: 'Voer een geldig telefoonnummer in uit %s',
countries: {
BR: 'Brazilië',
ES: 'Spanje',
FR: 'Frankrijk',
GB: 'het Verenigd Koninkrijk',
MA: 'Marokko',
PK: 'Pakistan',
US: 'de Verenigde Staten'
}
},
regexp: {
'default': 'Voer een waarde in die overeenkomt met het patroon'
},
remote: {
'default': 'Voer een geldige waarde in'
},
rtn: {
'default': 'Voer een geldig RTN-nummer in'
},
sedol: {
'default': 'Voer een geldig SEDOL-nummer in'
},
siren: {
'default': 'Voer een geldig SIREN-nummer in'
},
siret: {
'default': 'Voer een geldig SIRET-nummer in'
},
step: {
'default': 'Voer een meervoud van %s in'
},
stringCase: {
'default': 'Voer enkel kleine letters in',
upper: 'Voer enkel hoofdletters in'
},
stringLength: {
'default': 'Voer een waarde met de juiste lengte in',
less: 'Voer minder dan %s karakters in',
more: 'Voer meer dan %s karakters in',
between: 'Voer tussen tussen %s en %s karakters in'
},
uri: {
'default': 'Voer een geldige link in'
},
uuid: {
'default': 'Voer een geldige UUID in',
version: 'Voer een geldige UUID (versie %s) in'
},
vat: {
'default': 'Voer een geldig BTW-nummer in',
countryNotSupported: 'De land code %s wordt niet ondersteund',
country: 'Voer een geldig %s BTW-nummer in',
countries: {
AT: 'Oostenrijks',
BE: 'Belgisch',
BG: 'Bulgaars',
BR: 'Braziliaans',
CH: 'Zwitsers',
CY: 'Cypriotisch',
CZ: 'Tsjechisch',
DE: 'Duits',
DK: 'Deens',
EE: 'Estisch',
ES: 'Spaans',
FI: 'Fins',
FR: 'Frans',
GB: 'Engels',
GR: 'Grieks',
EL: 'Grieks',
HU: 'Hongaars',
HR: 'Kroatisch',
IE: 'Iers',
IS: 'IJslanda',
IT: 'Italiaans',
LT: 'Litouws',
LU: 'Luxemburgs',
LV: 'Lets',
MT: 'Maltees',
NL: 'Nederlands',
NO: 'Noors',
PL: 'Pools',
PT: 'Portugees',
RO: 'Roemeens',
RU: 'Russisch',
RS: 'Servisch',
SE: 'Zweeds',
SI: 'Sloveens',
SK: 'Slovaaks',
ZA: 'Zuid-Afrikaans'
}
},
vin: {
'default': 'Voer een geldig VIN-nummer in'
},
zipCode: {
'default': 'Voer een geldige postcode in',
countryNotSupported: 'De land code %s wordt niet ondersteund',
country: 'Voer een geldige %s in',
countries: {
BR: 'Braziliaanse postcode',
CA: 'Canadese postcode',
DK: 'Deense postcode',
GB: 'Engelse postcode',
IT: 'Italiaanse postcode',
MA: 'Marokkaanse postcode',
NL: 'Nederlandse postcode',
SE: 'Zwitserse postcode',
SG: 'Singaporese postcode',
US: 'Amerikaanse postcode'
}
}
});
}(window.jQuery));
| tjbp/cdnjs | ajax/libs/bootstrap-validator/0.5.1/js/language/nl_NL.js | JavaScript | mit | 11,155 |
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-05-16 14:36:50 (f9be68accb407158ba2b1be2c226a6ce1f649314)
*/
/**
* @docauthor Jason Johnston <jason@sencha.com>
*
* This mixin provides a common interface for the logical behavior and state of form fields, including:
*
* - Getter and setter methods for field values
* - Events and methods for tracking value and validity changes
* - Methods for triggering validation
*
* **NOTE**: When implementing custom fields, it is most likely that you will want to extend the {@link Ext.form.field.Base}
* component class rather than using this mixin directly, as BaseField contains additional logic for generating an
* actual DOM complete with {@link Ext.form.Labelable label and error message} display and a form input field,
* plus methods that bind the Field value getters and setters to the input field's value.
*
* If you do want to implement this mixin directly and don't want to extend {@link Ext.form.field.Base}, then
* you will most likely want to override the following methods with custom implementations: {@link #getValue},
* {@link #setValue}, and {@link #getErrors}. Other methods may be overridden as needed but their base
* implementations should be sufficient for common cases. You will also need to make sure that {@link #initField}
* is called during the component's initialization.
*/
Ext.define('Ext.form.field.Field', {
/**
* @property {Boolean} isFormField
* Flag denoting that this component is a Field. Always true.
*/
isFormField : true,
/**
* @cfg {Object} value
* A value to initialize this field with.
*/
/**
* @cfg {String} name
* The name of the field. By default this is used as the parameter name when including the
* {@link #getSubmitData field value} in a {@link Ext.form.Basic#submit form submit()}. To prevent the field from
* being included in the form submit, set {@link #submitValue} to false.
*/
/**
* @cfg {Boolean} disabled
* True to disable the field. Disabled Fields will not be {@link Ext.form.Basic#submit submitted}.
*/
disabled : false,
/**
* @cfg {Boolean} submitValue
* Setting this to false will prevent the field from being {@link Ext.form.Basic#submit submitted} even when it is
* not disabled.
*/
submitValue: true,
/**
* @cfg {Boolean} validateOnChange
* Specifies whether this field should be validated immediately whenever a change in its value is detected.
* If the validation results in a change in the field's validity, a {@link #validitychange} event will be
* fired. This allows the field to show feedback about the validity of its contents immediately as the user is
* typing.
*
* When set to false, feedback will not be immediate. However the form will still be validated before submitting if
* the clientValidation option to {@link Ext.form.Basic#doAction} is enabled, or if the field or form are validated
* manually.
*
* See also {@link Ext.form.field.Base#checkChangeEvents} for controlling how changes to the field's value are
* detected.
*/
validateOnChange: true,
/**
* @private
*/
suspendCheckChange: 0,
/**
* Initializes this Field mixin on the current instance. Components using this mixin should call this method during
* their own initialization process.
*/
initField: function() {
this.addEvents(
/**
* @event change
* Fires when the value of a field is changed via the {@link #setValue} method.
* @param {Ext.form.field.Field} this
* @param {Object} newValue The new value
* @param {Object} oldValue The original value
*/
'change',
/**
* @event validitychange
* Fires when a change in the field's validity is detected.
* @param {Ext.form.field.Field} this
* @param {Boolean} isValid Whether or not the field is now valid
*/
'validitychange',
/**
* @event dirtychange
* Fires when a change in the field's {@link #isDirty} state is detected.
* @param {Ext.form.field.Field} this
* @param {Boolean} isDirty Whether or not the field is now dirty
*/
'dirtychange'
);
this.initValue();
//<debug>
var badNames = [
'tagName',
'nodeName',
'children',
'childNodes'
], name = this.name;
if (name && Ext.Array.indexOf(badNames, name) > -1) {
Ext.log.warn(
['It is recommended to not use "', name, '" as a field name, because it ',
'can cause naming collisions during form submission.'].join('')
);
}
//</debug>
},
/**
* Initializes the field's value based on the initial config.
*/
initValue: function() {
var me = this;
me.value = me.transformOriginalValue(me.value);
/**
* @property {Object} originalValue
* The original value of the field as configured in the {@link #value} configuration, or as loaded by the last
* form load operation if the form's {@link Ext.form.Basic#trackResetOnLoad trackResetOnLoad} setting is `true`.
*/
me.originalValue = me.lastValue = me.value;
// Set the initial value - prevent validation on initial set
me.suspendCheckChange++;
me.setValue(me.value);
me.suspendCheckChange--;
},
/**
* Allows for any necessary modifications before the original
* value is set
* @protected
* @param {Object} value The initial value
* @return {Object} The modified initial value
*/
transformOriginalValue: Ext.identityFn,
/**
* Returns the {@link Ext.form.field.Field#name name} attribute of the field. This is used as the parameter name
* when including the field value in a {@link Ext.form.Basic#submit form submit()}.
* @return {String} name The field {@link Ext.form.field.Field#name name}
*/
getName: function() {
return this.name;
},
/**
* Returns the current data value of the field. The type of value returned is particular to the type of the
* particular field (e.g. a Date object for {@link Ext.form.field.Date}).
* @return {Object} value The field value
*/
getValue: function() {
return this.value;
},
/**
* Sets a data value into the field and runs the change detection and validation.
* @param {Object} value The value to set
* @return {Ext.form.field.Field} this
*/
setValue: function(value) {
var me = this;
me.value = value;
me.checkChange();
return me;
},
/**
* Returns whether two field {@link #getValue values} are logically equal. Field implementations may override this
* to provide custom comparison logic appropriate for the particular field's data type.
* @param {Object} value1 The first value to compare
* @param {Object} value2 The second value to compare
* @return {Boolean} True if the values are equal, false if inequal.
*/
isEqual: function(value1, value2) {
return String(value1) === String(value2);
},
/**
* Returns whether two values are logically equal.
* Similar to {@link #isEqual}, however null or undefined values will be treated as empty strings.
* @private
* @param {Object} value1 The first value to compare
* @param {Object} value2 The second value to compare
* @return {Boolean} True if the values are equal, false if inequal.
*/
isEqualAsString: function(value1, value2){
return String(Ext.value(value1, '')) === String(Ext.value(value2, ''));
},
/**
* Returns the parameter(s) that would be included in a standard form submit for this field. Typically this will be
* an object with a single name-value pair, the name being this field's {@link #getName name} and the value being
* its current stringified value. More advanced field implementations may return more than one name-value pair.
*
* Note that the values returned from this method are not guaranteed to have been successfully {@link #validate
* validated}.
*
* @return {Object} A mapping of submit parameter names to values; each value should be a string, or an array of
* strings if that particular name has multiple values. It can also return null if there are no parameters to be
* submitted.
*/
getSubmitData: function() {
var me = this,
data = null;
if (!me.disabled && me.submitValue && !me.isFileUpload()) {
data = {};
data[me.getName()] = '' + me.getValue();
}
return data;
},
/**
* Returns the value(s) that should be saved to the {@link Ext.data.Model} instance for this field, when {@link
* Ext.form.Basic#updateRecord} is called. Typically this will be an object with a single name-value pair, the name
* being this field's {@link #getName name} and the value being its current data value. More advanced field
* implementations may return more than one name-value pair. The returned values will be saved to the corresponding
* field names in the Model.
*
* Note that the values returned from this method are not guaranteed to have been successfully {@link #validate
* validated}.
*
* @return {Object} A mapping of submit parameter names to values; each value should be a string, or an array of
* strings if that particular name has multiple values. It can also return null if there are no parameters to be
* submitted.
*/
getModelData: function() {
var me = this,
data = null;
if (!me.disabled && !me.isFileUpload()) {
data = {};
data[me.getName()] = me.getValue();
}
return data;
},
/**
* Resets the current field value to the originally loaded value and clears any validation messages. See {@link
* Ext.form.Basic}.{@link Ext.form.Basic#trackResetOnLoad trackResetOnLoad}
*/
reset : function(){
var me = this;
me.beforeReset();
me.setValue(me.originalValue);
me.clearInvalid();
// delete here so we reset back to the original state
delete me.wasValid;
},
/**
* Template method before a field is reset.
* @protected
*/
beforeReset: Ext.emptyFn,
/**
* Resets the field's {@link #originalValue} property so it matches the current {@link #getValue value}. This is
* called by {@link Ext.form.Basic}.{@link Ext.form.Basic#setValues setValues} if the form's
* {@link Ext.form.Basic#trackResetOnLoad trackResetOnLoad} property is set to true.
*/
resetOriginalValue: function() {
this.originalValue = this.getValue();
this.checkDirty();
},
/**
* Checks whether the value of the field has changed since the last time it was checked.
* If the value has changed, it:
*
* 1. Fires the {@link #change change event},
* 2. Performs validation if the {@link #validateOnChange} config is enabled, firing the
* {@link #validitychange validitychange event} if the validity has changed, and
* 3. Checks the {@link #isDirty dirty state} of the field and fires the {@link #dirtychange dirtychange event}
* if it has changed.
*/
checkChange: function() {
if (!this.suspendCheckChange) {
var me = this,
newVal = me.getValue(),
oldVal = me.lastValue;
if (!me.isEqual(newVal, oldVal) && !me.isDestroyed) {
me.lastValue = newVal;
me.fireEvent('change', me, newVal, oldVal);
me.onChange(newVal, oldVal);
}
}
},
/**
* @private
* Called when the field's value changes. Performs validation if the {@link #validateOnChange}
* config is enabled, and invokes the dirty check.
*/
onChange: function(newVal, oldVal) {
if (this.validateOnChange) {
this.validate();
}
this.checkDirty();
},
/**
* Returns true if the value of this Field has been changed from its {@link #originalValue}.
* Will always return false if the field is disabled.
*
* Note that if the owning {@link Ext.form.Basic form} was configured with
* {@link Ext.form.Basic#trackResetOnLoad trackResetOnLoad} then the {@link #originalValue} is updated when
* the values are loaded by {@link Ext.form.Basic}.{@link Ext.form.Basic#setValues setValues}.
* @return {Boolean} True if this field has been changed from its original value (and is not disabled),
* false otherwise.
*/
isDirty : function() {
var me = this;
return !me.disabled && !me.isEqual(me.getValue(), me.originalValue);
},
/**
* Checks the {@link #isDirty} state of the field and if it has changed since the last time it was checked,
* fires the {@link #dirtychange} event.
*/
checkDirty: function() {
var me = this,
isDirty = me.isDirty();
if (isDirty !== me.wasDirty) {
me.fireEvent('dirtychange', me, isDirty);
me.onDirtyChange(isDirty);
me.wasDirty = isDirty;
}
},
/**
* @private Called when the field's dirty state changes.
* @param {Boolean} isDirty
*/
onDirtyChange: Ext.emptyFn,
/**
* Runs this field's validators and returns an array of error messages for any validation failures. This is called
* internally during validation and would not usually need to be used manually.
*
* Each subclass should override or augment the return value to provide their own errors.
*
* @param {Object} value The value to get errors for (defaults to the current field value)
* @return {String[]} All error messages for this field; an empty Array if none.
*/
getErrors: function(value) {
return [];
},
/**
* Returns whether or not the field value is currently valid by {@link #getErrors validating} the field's current
* value. The {@link #validitychange} event will not be fired; use {@link #validate} instead if you want the event
* to fire. **Note**: {@link #disabled} fields are always treated as valid.
*
* Implementations are encouraged to ensure that this method does not have side-effects such as triggering error
* message display.
*
* @return {Boolean} True if the value is valid, else false
*/
isValid : function() {
var me = this;
return me.disabled || Ext.isEmpty(me.getErrors());
},
/**
* Returns whether or not the field value is currently valid by {@link #getErrors validating} the field's current
* value, and fires the {@link #validitychange} event if the field's validity has changed since the last validation.
* **Note**: {@link #disabled} fields are always treated as valid.
*
* Custom implementations of this method are allowed to have side-effects such as triggering error message display.
* To validate without side-effects, use {@link #isValid}.
*
* @return {Boolean} True if the value is valid, else false
*/
validate : function() {
var me = this,
isValid = me.isValid();
if (isValid !== me.wasValid) {
me.wasValid = isValid;
me.fireEvent('validitychange', me, isValid);
}
return isValid;
},
/**
* A utility for grouping a set of modifications which may trigger value changes into a single transaction, to
* prevent excessive firing of {@link #change} events. This is useful for instance if the field has sub-fields which
* are being updated as a group; you don't want the container field to check its own changed state for each subfield
* change.
* @param {Object} fn A function containing the transaction code
*/
batchChanges: function(fn) {
try {
this.suspendCheckChange++;
fn();
} catch(e){
throw e;
} finally {
this.suspendCheckChange--;
}
this.checkChange();
},
/**
* Returns whether this Field is a file upload field; if it returns true, forms will use special techniques for
* {@link Ext.form.Basic#submit submitting the form} via AJAX. See {@link Ext.form.Basic#hasUpload} for details. If
* this returns true, the {@link #extractFileInput} method must also be implemented to return the corresponding file
* input element.
* @return {Boolean}
*/
isFileUpload: function() {
return false;
},
/**
* Only relevant if the instance's {@link #isFileUpload} method returns true. Returns a reference to the file input
* DOM element holding the user's selected file. The input will be appended into the submission form and will not be
* returned, so this method should also create a replacement.
* @return {HTMLElement}
*/
extractFileInput: function() {
return null;
},
/**
* @method markInvalid
* Associate one or more error messages with this field. Components using this mixin should implement this method to
* update the component's rendering to display the messages.
*
* **Note**: this method does not cause the Field's {@link #validate} or {@link #isValid} methods to return `false`
* if the value does _pass_ validation. So simply marking a Field as invalid will not prevent submission of forms
* submitted with the {@link Ext.form.action.Submit#clientValidation} option set.
*
* @param {String/String[]} errors The error message(s) for the field.
*/
markInvalid: Ext.emptyFn,
/**
* @method clearInvalid
* Clear any invalid styles/messages for this field. Components using this mixin should implement this method to
* update the components rendering to clear any existing messages.
*
* **Note**: this method does not cause the Field's {@link #validate} or {@link #isValid} methods to return `true`
* if the value does not _pass_ validation. So simply clearing a field's errors will not necessarily allow
* submission of forms submitted with the {@link Ext.form.action.Submit#clientValidation} option set.
*/
clearInvalid: Ext.emptyFn
});
| humbletim/cdnjs | ajax/libs/extjs/4.2.1/src/form/field/Field.js | JavaScript | mit | 19,364 |
/* Magnific Popup CSS */
.mfp-bg {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 502;
overflow: hidden;
position: fixed;
background: #0b0b0b;
opacity: 0.8;
filter: alpha(opacity=80); }
.mfp-wrap {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 503;
position: fixed;
outline: none !important;
-webkit-backface-visibility: hidden; }
.mfp-container {
text-align: center;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
padding: 0 8px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.mfp-container:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle; }
.mfp-align-top .mfp-container:before {
display: none; }
.mfp-content {
position: relative;
display: inline-block;
vertical-align: middle;
margin: 0 auto;
text-align: left;
z-index: 505; }
.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
width: 100%;
cursor: auto; }
.mfp-ajax-cur {
cursor: progress; }
.mfp-zoom-out-cur,
.mfp-zoom-out-cur .mfp-image-holder .mfp-close {
cursor: -moz-zoom-out;
cursor: -webkit-zoom-out;
cursor: zoom-out; }
.mfp-zoom {
cursor: pointer;
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.mfp-auto-cursor .mfp-content {
cursor: auto; }
.mfp-close,
.mfp-arrow,
.mfp-preloader,
.mfp-counter {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.mfp-loading.mfp-figure {
display: none; }
.mfp-hide {
display: none !important; }
.mfp-preloader {
color: #cccccc;
position: absolute;
top: 50%;
width: auto;
text-align: center;
margin-top: -0.8em;
left: 8px;
right: 8px;
z-index: 504; }
.mfp-preloader a {
color: #cccccc; }
.mfp-preloader a:hover {
color: white; }
.mfp-s-ready .mfp-preloader {
display: none; }
.mfp-s-error .mfp-content {
display: none; }
button.mfp-close,
button.mfp-arrow {
overflow: visible;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
display: block;
padding: 0;
z-index: 506; }
button::-moz-focus-inner {
padding: 0;
border: 0; }
.mfp-close {
width: 44px;
height: 44px;
line-height: 44px;
position: absolute;
right: 0;
top: 0;
text-decoration: none;
text-align: center;
opacity: 0.65;
padding: 0 0 18px 10px;
color: white;
font-style: normal;
font-size: 28px;
font-family: Arial, Baskerville, monospace; }
.mfp-close:hover, .mfp-close:focus {
opacity: 1; }
.mfp-close:active {
top: 1px; }
.mfp-close-btn-in .mfp-close {
color: #333333; }
.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
color: white;
right: -6px;
text-align: right;
padding-right: 6px;
width: 100%; }
.mfp-counter {
position: absolute;
top: 0;
right: 0;
color: #cccccc;
font-size: 12px;
line-height: 18px; }
.mfp-arrow {
position: absolute;
opacity: 0.65;
margin: 0;
top: 50%;
margin-top: -55px;
padding: 0;
width: 90px;
height: 110px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
.mfp-arrow:active {
margin-top: -54px; }
.mfp-arrow:hover,
.mfp-arrow:focus {
opacity: 1; }
.mfp-arrow:before, .mfp-arrow:after,
.mfp-arrow .mfp-b,
.mfp-arrow .mfp-a {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: 0;
top: 0;
margin-top: 35px;
margin-left: 35px;
border: solid transparent; }
.mfp-arrow:after,
.mfp-arrow .mfp-a {
border-top-width: 13px;
border-bottom-width: 13px;
top: 8px; }
.mfp-arrow:before,
.mfp-arrow .mfp-b {
border-top-width: 21px;
border-bottom-width: 21px; }
.mfp-arrow-left {
left: 0; }
.mfp-arrow-left:after,
.mfp-arrow-left .mfp-a {
border-right: 17px solid white;
margin-left: 31px; }
.mfp-arrow-left:before,
.mfp-arrow-left .mfp-b {
margin-left: 25px;
border-right: 27px solid #3f3f3f; }
.mfp-arrow-right {
right: 0; }
.mfp-arrow-right:after,
.mfp-arrow-right .mfp-a {
border-left: 17px solid white;
margin-left: 39px; }
.mfp-arrow-right:before,
.mfp-arrow-right .mfp-b {
border-left: 27px solid #3f3f3f; }
.mfp-iframe-holder {
padding-top: 40px;
padding-bottom: 40px; }
.mfp-iframe-holder .mfp-content {
line-height: 0;
width: 100%;
max-width: 900px; }
.mfp-iframe-scaler {
width: 100%;
height: 0;
overflow: hidden;
padding-top: 56.25%; }
.mfp-iframe-scaler iframe {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: black; }
.mfp-iframe-holder .mfp-close {
top: -40px; }
/* Main image in popup */
img.mfp-img {
width: auto;
max-width: 100%;
height: auto;
display: block;
line-height: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 40px 0 40px;
margin: 0 auto; }
/* The shadow behind the image */
.mfp-figure:after {
content: '';
position: absolute;
left: 0;
top: 40px;
bottom: 40px;
display: block;
right: 0;
width: auto;
height: auto;
z-index: -1;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #444444; }
.mfp-figure {
line-height: 0; }
.mfp-bottom-bar {
margin-top: -36px;
position: absolute;
top: 100%;
left: 0;
width: 100%;
cursor: auto; }
.mfp-title {
text-align: left;
line-height: 18px;
color: #f3f3f3;
word-break: break-word;
padding-right: 36px; }
.mfp-figure small {
color: #bdbdbd;
display: block;
font-size: 12px;
line-height: 14px; }
.mfp-image-holder .mfp-content {
max-width: 100%; }
.mfp-gallery .mfp-image-holder .mfp-figure {
cursor: pointer; }
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
/**
* Remove all paddings around the image on small screen
*/
.mfp-img-mobile .mfp-image-holder {
padding-left: 0;
padding-right: 0; }
.mfp-img-mobile img.mfp-img {
padding: 0; }
/* The shadow behind the image */
.mfp-img-mobile .mfp-figure:after {
top: 0;
bottom: 0; }
.mfp-img-mobile .mfp-bottom-bar {
background: rgba(0, 0, 0, 0.6);
bottom: 0;
margin: 0;
top: auto;
padding: 3px 5px;
position: fixed;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.mfp-img-mobile .mfp-bottom-bar:empty {
padding: 0; }
.mfp-img-mobile .mfp-counter {
right: 5px;
top: 3px; }
.mfp-img-mobile .mfp-close {
top: 0;
right: 0;
width: 35px;
height: 35px;
line-height: 35px;
background: rgba(0, 0, 0, 0.6);
position: fixed;
text-align: center;
padding: 0; }
.mfp-img-mobile .mfp-figure small {
display: inline;
margin-left: 5px; } }
@media all and (max-width: 900px) {
.mfp-arrow {
-webkit-transform: scale(0.75);
transform: scale(0.75); }
.mfp-arrow-left {
-webkit-transform-origin: 0;
transform-origin: 0; }
.mfp-arrow-right {
-webkit-transform-origin: 100%;
transform-origin: 100%; }
.mfp-container {
padding-left: 6px;
padding-right: 6px; } }
.mfp-ie7 .mfp-img {
padding: 0; }
.mfp-ie7 .mfp-bottom-bar {
width: 600px;
left: 50%;
margin-left: -300px;
margin-top: 5px;
padding-bottom: 5px; }
.mfp-ie7 .mfp-container {
padding: 0; }
.mfp-ie7 .mfp-content {
padding-top: 44px; }
.mfp-ie7 .mfp-close {
top: 0;
right: 0;
padding-top: 0; }
| rteasdale/cdnjs | ajax/libs/magnific-popup.js/0.9.1/magnific-popup.css | CSS | mit | 7,455 |
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-05-16 14:36:50 (f9be68accb407158ba2b1be2c226a6ce1f649314)
*/
/**
* An updateable progress bar component. The progress bar supports two different modes: manual and automatic.
*
* In manual mode, you are responsible for showing, updating (via {@link #updateProgress}) and clearing the progress bar
* as needed from your own code. This method is most appropriate when you want to show progress throughout an operation
* that has predictable points of interest at which you can update the control.
*
* In automatic mode, you simply call {@link #wait} and let the progress bar run indefinitely, only clearing it once the
* operation is complete. You can optionally have the progress bar wait for a specific amount of time and then clear
* itself. Automatic mode is most appropriate for timed operations or asynchronous operations in which you have no need
* for indicating intermediate progress.
*
* @example
* var p = Ext.create('Ext.ProgressBar', {
* renderTo: Ext.getBody(),
* width: 300
* });
*
* // Wait for 5 seconds, then update the status el (progress bar will auto-reset)
* p.wait({
* interval: 500, //bar will move fast!
* duration: 50000,
* increment: 15,
* text: 'Updating...',
* scope: this,
* fn: function(){
* p.updateText('Done!');
* }
* });
*/
Ext.define('Ext.ProgressBar', {
extend: 'Ext.Component',
alias: 'widget.progressbar',
requires: [
'Ext.Template',
'Ext.CompositeElement',
'Ext.TaskManager',
'Ext.layout.component.ProgressBar'
],
uses: ['Ext.fx.Anim'],
/**
* @cfg {Number} [value=0]
* A floating point value between 0 and 1 (e.g., .5)
*/
/**
* @cfg {String/HTMLElement/Ext.Element} textEl
* The element to render the progress text to (defaults to the progress bar's internal text element)
*/
/**
* @cfg {String} id
* The progress bar element's id (defaults to an auto-generated id)
*/
/**
* @cfg {String} [baseCls='x-progress']
* The base CSS class to apply to the progress bar's wrapper element.
*/
baseCls: Ext.baseCSSPrefix + 'progress',
/**
* @cfg {Boolean/Object} animate
* True to animate the progress bar during transitions, or an animation configuration
* (see the {@link #method-animate} method for details).
*/
animate: false,
/**
* @cfg {String} text
* The text shown in the progress bar.
*/
text: '',
// private
waitTimer: null,
childEls: [
'bar'
],
renderTpl: [
'<tpl if="internalText">',
'<div class="{baseCls}-text {baseCls}-text-back">{text}</div>',
'</tpl>',
'<div id="{id}-bar" class="{baseCls}-bar {baseCls}-bar-{ui}" style="width:{percentage}%">',
'<tpl if="internalText">',
'<div class="{baseCls}-text">',
'<div>{text}</div>',
'</div>',
'</tpl>',
'</div>'
],
componentLayout: 'progressbar',
// private
initComponent: function() {
this.callParent();
this.addEvents(
/**
* @event update
* Fires after each update interval
* @param {Ext.ProgressBar} this
* @param {Number} value The current progress value
* @param {String} text The current progress text
*/
"update"
);
},
initRenderData: function() {
var me = this;
return Ext.apply(me.callParent(), {
internalText : !me.hasOwnProperty('textEl'),
text : me.text || ' ',
percentage : me.value ? me.value * 100 : 0
});
},
onRender : function() {
var me = this;
me.callParent(arguments);
// External text display
if (me.textEl) {
me.textEl = Ext.get(me.textEl);
me.updateText(me.text);
}
// Inline text display
else {
// This produces a composite w/2 el's (which is why we cannot use childEls or
// renderSelectors):
me.textEl = me.el.select('.' + me.baseCls + '-text');
}
},
/**
* Updates the progress bar value, and optionally its text. If the text argument is not specified, any existing text
* value will be unchanged. To blank out existing text, pass ''. Note that even if the progress bar value exceeds 1,
* it will never automatically reset -- you are responsible for determining when the progress is complete and
* calling {@link #reset} to clear and/or hide the control.
* @param {Number} [value=0] A floating point value between 0 and 1 (e.g., .5)
* @param {String} [text=''] The string to display in the progress text element
* @param {Boolean} [animate=false] Whether to animate the transition of the progress bar. If this value is not
* specified, the default for the class is used
* @return {Ext.ProgressBar} this
*/
updateProgress: function(value, text, animate) {
var me = this,
oldValue = me.value;
me.value = value || 0;
if (text) {
me.updateText(text);
}
if (me.rendered && !me.isDestroyed) {
if (animate === true || (animate !== false && me.animate)) {
me.bar.stopAnimation();
me.bar.animate(Ext.apply({
from: {
width: (oldValue * 100) + '%'
},
to: {
width: (me.value * 100) + '%'
}
}, me.animate));
} else {
me.bar.setStyle('width', (me.value * 100) + '%');
}
}
me.fireEvent('update', me, me.value, text);
return me;
},
/**
* Updates the progress bar text. If specified, textEl will be updated, otherwise the progress bar itself will
* display the updated text.
* @param {String} [text=''] The string to display in the progress text element
* @return {Ext.ProgressBar} this
*/
updateText: function(text) {
var me = this;
me.text = text;
if (me.rendered) {
me.textEl.update(me.text);
}
return me;
},
applyText : function(text) {
this.updateText(text);
},
getText: function(){
return this.text;
},
/**
* Initiates an auto-updating progress bar. A duration can be specified, in which case the progress bar will
* automatically reset after a fixed amount of time and optionally call a callback function if specified. If no
* duration is passed in, then the progress bar will run indefinitely and must be manually cleared by calling
* {@link #reset}.
*
* Example usage:
*
* var p = new Ext.ProgressBar({
* renderTo: 'my-el'
* });
*
* //Wait for 5 seconds, then update the status el (progress bar will auto-reset)
* var p = Ext.create('Ext.ProgressBar', {
* renderTo: Ext.getBody(),
* width: 300
* });
*
* //Wait for 5 seconds, then update the status el (progress bar will auto-reset)
* p.wait({
* interval: 500, //bar will move fast!
* duration: 50000,
* increment: 15,
* text: 'Updating...',
* scope: this,
* fn: function(){
* p.updateText('Done!');
* }
* });
*
* //Or update indefinitely until some async action completes, then reset manually
* p.wait();
* myAction.on('complete', function(){
* p.reset();
* p.updateText('Done!');
* });
*
* @param {Object} config (optional) Configuration options
* @param {Number} config.duration The length of time in milliseconds that the progress bar should
* run before resetting itself (defaults to undefined, in which case it will run indefinitely
* until reset is called)
* @param {Number} config.interval The length of time in milliseconds between each progress update
* (defaults to 1000 ms)
* @param {Boolean} config.animate Whether to animate the transition of the progress bar. If this
* value is not specified, the default for the class is used.
* @param {Number} config.increment The number of progress update segments to display within the
* progress bar (defaults to 10). If the bar reaches the end and is still updating, it will
* automatically wrap back to the beginning.
* @param {String} config.text Optional text to display in the progress bar element (defaults to '').
* @param {Function} config.fn A callback function to execute after the progress bar finishes auto-
* updating. The function will be called with no arguments. This function will be ignored if
* duration is not specified since in that case the progress bar can only be stopped programmatically,
* so any required function should be called by the same code after it resets the progress bar.
* @param {Object} config.scope The scope that is passed to the callback function (only applies when
* duration and fn are both passed).
* @return {Ext.ProgressBar} this
*/
wait: function(o) {
var me = this, scope;
if (!me.waitTimer) {
scope = me;
o = o || {};
me.updateText(o.text);
me.waitTimer = Ext.TaskManager.start({
run: function(i){
var inc = o.increment || 10;
i -= 1;
me.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate);
},
interval: o.interval || 1000,
duration: o.duration,
onStop: function(){
if (o.fn) {
o.fn.apply(o.scope || me);
}
me.reset();
},
scope: scope
});
}
return me;
},
/**
* Returns true if the progress bar is currently in a {@link #wait} operation
* @return {Boolean} True if waiting, else false
*/
isWaiting: function(){
return this.waitTimer !== null;
},
/**
* Resets the progress bar value to 0 and text to empty string. If hide = true, the progress bar will also be hidden
* (using the {@link #hideMode} property internally).
* @param {Boolean} [hide=false] True to hide the progress bar.
* @return {Ext.ProgressBar} this
*/
reset: function(hide){
var me = this;
me.updateProgress(0);
me.clearTimer();
if (hide === true) {
me.hide();
}
return me;
},
// private
clearTimer: function(){
var me = this;
if (me.waitTimer) {
me.waitTimer.onStop = null; //prevent recursion
Ext.TaskManager.stop(me.waitTimer);
me.waitTimer = null;
}
},
onDestroy: function(){
var me = this,
bar = me.bar;
me.clearTimer();
if (me.rendered) {
if (me.textEl.isComposite) {
me.textEl.clear();
}
Ext.destroyMembers(me, 'textEl', 'progressBar');
if (bar && me.animate) {
bar.stopAnimation();
}
}
me.callParent();
}
});
| SanaNasar/cdnjs | ajax/libs/extjs/4.2.1/src/ProgressBar.js | JavaScript | mit | 12,353 |
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2017, 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 - 2017, 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 ODBC 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_odbc_driver extends CI_DB_pdo_driver {
/**
* Sub-driver
*
* @var string
*/
public $subdriver = 'odbc';
/**
* Database schema
*
* @var string
*/
public $schema = 'public';
// --------------------------------------------------------------------
/**
* Identifier escape character
*
* Must be empty for ODBC.
*
* @var string
*/
protected $_escape_char = '';
/**
* ESCAPE statement string
*
* @var string
*/
protected $_like_escape_str = " {escape '%s'} ";
/**
* ORDER BY random keyword
*
* @var array
*/
protected $_random_keyword = array('RND()', 'RND(%d)');
// --------------------------------------------------------------------
/**
* 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 = 'odbc:';
// Pre-defined DSN
if (empty($this->hostname) && empty($this->HOSTNAME) && empty($this->port) && empty($this->PORT))
{
if (isset($this->DSN))
{
$this->dsn .= 'DSN='.$this->DSN;
}
elseif ( ! empty($this->database))
{
$this->dsn .= 'DSN='.$this->database;
}
return;
}
// If the DSN is not pre-configured - try to build an IBM DB2 connection string
$this->dsn .= 'DRIVER='.(isset($this->DRIVER) ? '{'.$this->DRIVER.'}' : '{IBM DB2 ODBC DRIVER}').';';
if (isset($this->DATABASE))
{
$this->dsn .= 'DATABASE='.$this->DATABASE.';';
}
elseif ( ! empty($this->database))
{
$this->dsn .= 'DATABASE='.$this->database.';';
}
if (isset($this->HOSTNAME))
{
$this->dsn .= 'HOSTNAME='.$this->HOSTNAME.';';
}
else
{
$this->dsn .= 'HOSTNAME='.(empty($this->hostname) ? '127.0.0.1;' : $this->hostname.';');
}
if (isset($this->PORT))
{
$this->dsn .= 'PORT='.$this->port.';';
}
elseif ( ! empty($this->port))
{
$this->dsn .= ';PORT='.$this->port.';';
}
$this->dsn .= 'PROTOCOL='.(isset($this->PROTOCOL) ? $this->PROTOCOL.';' : 'TCPIP;');
}
}
// --------------------------------------------------------------------
/**
* Platform-dependant string escape
*
* @param string
* @return string
*/
protected function _escape_str($str)
{
$this->db->display_error('db_unsupported_feature');
}
// --------------------------------------------------------------------
/**
* Determines if a query is a "write" type.
*
* @param string An SQL query string
* @return bool
*/
public function is_write_type($sql)
{
if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql))
{
return FALSE;
}
return parent::is_write_type($sql);
}
// --------------------------------------------------------------------
/**
* 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 table_name FROM information_schema.tables WHERE table_schema = '".$this->schema."'";
if ($prefix_limit !== FALSE && $this->dbprefix !== '')
{
return $sql." AND 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 column_name FROM information_schema.columns WHERE table_name = '.$this->escape($table);
}
}
| cosinLu/dapeng | system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php | PHP | mit | 5,890 |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"Tesiran",
"Teipa"
],
"DAY": [
"Mderot ee are",
"Mderot ee kuni",
"Mderot ee ong'wan",
"Mderot ee inet",
"Mderot ee ile",
"Mderot ee sapa",
"Mderot ee kwe"
],
"MONTH": [
"Lapa le obo",
"Lapa le waare",
"Lapa le okuni",
"Lapa le ong'wan",
"Lapa le imet",
"Lapa le ile",
"Lapa le sapa",
"Lapa le isiet",
"Lapa le saal",
"Lapa le tomon",
"Lapa le tomon obo",
"Lapa le tomon waare"
],
"SHORTDAY": [
"Are",
"Kun",
"Ong",
"Ine",
"Ile",
"Sap",
"Kwe"
],
"SHORTMONTH": [
"Obo",
"Waa",
"Oku",
"Ong",
"Ime",
"Ile",
"Sap",
"Isi",
"Saa",
"Tom",
"Tob",
"Tow"
],
"fullDate": "EEEE, d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y h:mm:ss a",
"mediumDate": "d MMM y",
"mediumTime": "h:mm:ss a",
"short": "dd/MM/y h:mm a",
"shortDate": "dd/MM/y",
"shortTime": "h:mm a"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "Ksh",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4-",
"negSuf": "",
"posPre": "\u00a4",
"posSuf": ""
}
]
},
"id": "saq",
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
| honestree/cdnjs | ajax/libs/angular-i18n/1.3.1/angular-locale_saq.js | JavaScript | mit | 2,422 |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"yakshanba",
"dushanba",
"seshanba",
"chorshanba",
"payshanba",
"juma",
"shanba"
],
"MONTH": [
"Yanvar",
"Fevral",
"Mart",
"Aprel",
"May",
"Iyun",
"Iyul",
"Avgust",
"Sentyabr",
"Oktyabr",
"Noyabr",
"Dekabr"
],
"SHORTDAY": [
"Yaksh",
"Dush",
"Sesh",
"Chor",
"Pay",
"Jum",
"Shan"
],
"SHORTMONTH": [
"Yanv",
"Fev",
"Mar",
"Apr",
"May",
"Iyun",
"Iyul",
"Avg",
"Sen",
"Okt",
"Noya",
"Dek"
],
"fullDate": "EEEE, y MMMM dd",
"longDate": "y MMMM d",
"medium": "y MMM d HH:mm:ss",
"mediumDate": "y MMM d",
"mediumTime": "HH:mm:ss",
"short": "yy/MM/dd HH:mm",
"shortDate": "yy/MM/dd",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "so\u02bcm",
"DECIMAL_SEP": ",",
"GROUP_SEP": "\u00a0",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4\u00a0-",
"negSuf": "",
"posPre": "\u00a4\u00a0",
"posSuf": ""
}
]
},
"id": "uz",
"pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
| quba/cdnjs | ajax/libs/angular-i18n/1.3.3/angular-locale_uz.js | JavaScript | mit | 1,910 |
<?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>.
*/
/**
* Conversion Exception is thrown when the database to PHP conversion fails.
*
* @link www.doctrine-project.org
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
namespace Doctrine\DBAL\Types;
class ConversionException extends \Doctrine\DBAL\DBALException
{
/**
* Thrown when a Database to Doctrine Type Conversion fails.
*
* @param string $value
* @param string $toType
*
* @return \Doctrine\DBAL\Types\ConversionException
*/
static public function conversionFailed($value, $toType)
{
$value = (strlen($value) > 32) ? substr($value, 0, 20) . "..." : $value;
return new self('Could not convert database value "' . $value . '" to Doctrine Type ' . $toType);
}
/**
* Thrown when a Database to Doctrine Type Conversion fails and we can make a statement
* about the expected format.
*
* @param string $value
* @param string $toType
* @param string $expectedFormat
*
* @return \Doctrine\DBAL\Types\ConversionException
*/
static public function conversionFailedFormat($value, $toType, $expectedFormat)
{
$value = (strlen($value) > 32) ? substr($value, 0, 20) . "..." : $value;
return new self(
'Could not convert database value "' . $value . '" to Doctrine Type ' .
$toType . '. Expected format: ' . $expectedFormat
);
}
}
| ericpauwawe/gestCont | vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php | PHP | mit | 2,567 |
// A cross-browser javascript shim for html5 audio
(function(audiojs, audiojsInstance, container) {
// Use the path to the audio.js file to create relative paths to the swf and player graphics
// Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
var path = (function() {
var re = new RegExp('audio(\.min)?\.js.*'),
scripts = document.getElementsByTagName('script');
for (var i = 0, ii = scripts.length; i < ii; i++) {
var path = scripts[i].getAttribute('src');
if(re.test(path))
{
var f = path.split ( '/' );
f.pop ();
return f.join ( '/' ) + '/';
}
}
// when no script found, an empty string causes the least confusion.
return '';
})();
// ##The audiojs interface
// This is the global object which provides an interface for creating new `audiojs` instances.
// It also stores all of the construction helper methods and variables.
container[audiojs] = {
instanceCount: 0,
instances: {},
// The markup for the swf. It is injected into the page if there is not support for the `<audio>` element. The `$n`s are placeholders.
// `$1` The name of the flash movie
// `$2` The path to the swf
// `$3` Cache invalidation
flashSource: '\
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="$1" width="1" height="1" name="$1" style="position: absolute; left: -1px;"> \
<param name="movie" value="$2?playerInstance='+audiojs+'.instances[\'$1\']&datetime=$3"> \
<param name="allowscriptaccess" value="always"> \
<embed name="$1" src="$2?playerInstance='+audiojs+'.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess="always"> \
</object>',
// ### The main settings object
// Where all the default settings are stored. Each of these variables and methods can be overwritten by the user-provided `options` object.
settings: {
autoplay: false,
loop: false,
preload: true,
imageLocation: path + 'player-graphics.gif',
retinaImageLocation: path + 'player-graphics@2x.gif',
swfLocation: path + 'audiojs.swf',
useFlash: (function() {
var a = document.createElement('audio');
return !(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
})(),
hasFlash: (function() {
if (navigator.plugins && navigator.plugins.length && navigator.plugins['Shockwave Flash']) {
return true;
} else if (navigator.mimeTypes && navigator.mimeTypes.length) {
var mimeType = navigator.mimeTypes['application/x-shockwave-flash'];
return mimeType && mimeType.enabledPlugin;
} else {
try {
var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
return true;
} catch (e) {}
}
return false;
})(),
// The default markup and classes for creating the player:
createPlayer: {
markup: '\
<div class="play-pause"> \
<p class="play"></p> \
<p class="pause"></p> \
<p class="loading"></p> \
<p class="error"></p> \
</div> \
<div class="scrubber"> \
<div class="progress"></div> \
<div class="loaded"></div> \
</div> \
<div class="time"> \
<em class="played">00:00</em>/<strong class="duration">00:00</strong> \
</div> \
<div class="error-message"></div>',
playPauseClass: 'play-pause',
scrubberClass: 'scrubber',
progressClass: 'progress',
loaderClass: 'loaded',
timeClass: 'time',
durationClass: 'duration',
playedClass: 'played',
errorMessageClass: 'error-message',
playingClass: 'playing',
loadingClass: 'loading',
errorClass: 'error'
},
// The css used by the default player. This is is dynamically injected into a `<style>` tag in the top of the head.
css: '\
.audiojs audio { position: absolute; left: -1px; } \
.audiojs { width: 460px; height: 36px; background: #404040; overflow: hidden; font-family: monospace; font-size: 12px; \
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #444), color-stop(0.5, #555), color-stop(0.51, #444), color-stop(1, #444)); \
background-image: -moz-linear-gradient(center top, #444 0%, #555 50%, #444 51%, #444 100%); \
-webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -moz-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); \
-o-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); } \
.audiojs .play-pause { width: 25px; height: 40px; padding: 4px 6px; margin: 0px; float: left; overflow: hidden; border-right: 1px solid #000; } \
.audiojs p { display: none; width: 25px; height: 40px; margin: 0px; cursor: pointer; } \
.audiojs .play { display: block; } \
.audiojs .scrubber { position: relative; float: left; width: 280px; background: #5a5a5a; height: 14px; margin: 10px; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; } \
.audiojs .progress { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #ccc; z-index: 1; \
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ccc), color-stop(0.5, #ddd), color-stop(0.51, #ccc), color-stop(1, #ccc)); \
background-image: -moz-linear-gradient(center top, #ccc 0%, #ddd 50%, #ccc 51%, #ccc 100%); } \
.audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000; \
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #333), color-stop(0.51, #222), color-stop(1, #222)); \
background-image: -moz-linear-gradient(center top, #222 0%, #333 50%, #222 51%, #222 100%); } \
.audiojs .time { float: left; height: 36px; line-height: 36px; margin: 0px 0px 0px 6px; padding: 0px 6px 0px 12px; border-left: 1px solid #000; color: #ddd; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5); } \
.audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; } \
.audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; } \
.audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff; \
text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; } \
.audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; } \
\
.audiojs .play { background: url("$1") -2px -1px no-repeat; } \
.audiojs .loading { background: url("$1") -2px -31px no-repeat; } \
.audiojs .error { background: url("$1") -2px -61px no-repeat; } \
.audiojs .pause { background: url("$1") -2px -91px no-repeat; } \
\
@media only screen and (-webkit-min-device-pixel-ratio: 2), \
only screen and (min--moz-device-pixel-ratio: 2), \
only screen and (min-moz-device-pixel-ratio: 2), \
only screen and (-o-min-device-pixel-ratio: 2/1), \
only screen and (min-device-pixel-ratio: 2) { \
.audiojs .play, .audiojs .loading, .audiojs .error, .audiojs .pause { \
background-image: url("$2"); \
-webkit-background-size: 30px 120px; \
-moz-background-size: 30px 120px; \
-o-background-size: 30px 120px; \
background-size: 30px 120px; \
} \
} \
\
.playing .play, .playing .loading, .playing .error { display: none; } \
.playing .pause { display: block; } \
\
.loading .play, .loading .pause, .loading .error { display: none; } \
.loading .loading { display: block; } \
\
.error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; } \
.error .error { display: block; } \
.error .play-pause p { cursor: auto; } \
.error .error-message { display: block; }',
// The default event callbacks:
trackEnded: function(e) {},
flashError: function() {
var player = this.settings.createPlayer,
errorMessage = getByClass(player.errorMessageClass, this.wrapper),
html = 'Missing <a href="http://get.adobe.com/flashplayer/">flash player</a> plugin.';
if (this.mp3) html += ' <a href="'+this.mp3+'">Download audio file</a>.';
container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
container[audiojs].helpers.addClass(this.wrapper, player.errorClass);
errorMessage.innerHTML = html;
},
loadError: function(e) {
var player = this.settings.createPlayer,
errorMessage = getByClass(player.errorMessageClass, this.wrapper);
container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
container[audiojs].helpers.addClass(this.wrapper, player.errorClass);
errorMessage.innerHTML = 'Error loading: "'+this.mp3+'"';
},
init: function() {
var player = this.settings.createPlayer;
container[audiojs].helpers.addClass(this.wrapper, player.loadingClass);
},
loadStarted: function() {
var player = this.settings.createPlayer,
duration = getByClass(player.durationClass, this.wrapper),
m = Math.floor(this.duration / 60),
s = Math.floor(this.duration % 60);
container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
duration.innerHTML = ((m<10?'0':'')+m+':'+(s<10?'0':'')+s);
},
loadProgress: function(percent) {
var player = this.settings.createPlayer,
loaded = getByClass(player.loaderClass, this.wrapper);
loaded.style.width = (100 * percent) + '%';
},
playPause: function() {
if (this.playing) this.settings.play();
else this.settings.pause();
},
play: function() {
var player = this.settings.createPlayer;
container[audiojs].helpers.removeClass(this.wrapper, player.errorClass);
container[audiojs].helpers.addClass(this.wrapper, player.playingClass);
},
pause: function() {
var player = this.settings.createPlayer;
container[audiojs].helpers.removeClass(this.wrapper, player.playingClass);
},
updatePlayhead: function(percent) {
var player = this.settings.createPlayer,
progress = getByClass(player.progressClass, this.wrapper);
progress.style.width = (100 * percent) + '%';
var played = getByClass(player.playedClass, this.wrapper),
p = this.duration * percent,
m = Math.floor(p / 60),
s = Math.floor(p % 60);
played.innerHTML = ((m<10?'0':'')+m+':'+(s<10?'0':'')+s);
}
},
// ### Contructor functions
// `create()`
// Used to create a single `audiojs` instance.
// If an array is passed then it calls back to `createAll()`.
// Otherwise, it creates a single instance and returns it.
create: function(element, options) {
var options = options || {}
if (element.length) {
return this.createAll(options, element);
} else {
return this.newInstance(element, options);
}
},
// `createAll()`
// Creates multiple `audiojs` instances.
// If `elements` is `null`, then automatically find any `<audio>` tags on the page and create `audiojs` instances for them.
createAll: function(options, elements) {
var audioElements = elements || document.getElementsByTagName('audio'),
instances = []
options = options || {};
for (var i = 0, ii = audioElements.length; i < ii; i++) {
if ((" " + audioElements[i].parentNode.className + " ").replace(/[\n\t]/g, " ").indexOf(" audiojs ") > -1)
continue;
instances.push(this.newInstance(audioElements[i], options));
}
return instances;
},
// ### Creating and returning a new instance
// This goes through all the steps required to build out a usable `audiojs` instance.
newInstance: function(element, options) {
var element = element,
s = this.helpers.clone(this.settings),
id = 'audiojs'+this.instanceCount,
wrapperId = 'audiojs_wrapper'+this.instanceCount,
instanceCount = this.instanceCount++;
// Check for `autoplay`, `loop` and `preload` attributes and write them into the settings.
if (element.getAttribute('autoplay') != null) s.autoplay = true;
if (element.getAttribute('loop') != null) s.loop = true;
if (element.getAttribute('preload') == 'none') s.preload = false;
// Merge the default settings with the user-defined `options`.
if (options) this.helpers.merge(s, options);
// Inject the player html if required.
if (s.createPlayer.markup) element = this.createPlayer(element, s.createPlayer, wrapperId);
else element.parentNode.setAttribute('id', wrapperId);
// Return a new `audiojs` instance.
var audio = new container[audiojsInstance](element, s);
// If css has been passed in, dynamically inject it into the `<head>`.
if (s.css) this.helpers.injectCss(audio, s.css);
// If `<audio>` or mp3 playback isn't supported, insert the swf & attach the required events for it.
if (s.useFlash && s.hasFlash) {
this.injectFlash(audio, id);
this.attachFlashEvents(audio.wrapper, audio);
} else if (s.useFlash && !s.hasFlash) {
s.flashError.apply(audio);
}
// Attach event callbacks to the new audiojs instance.
if (!s.useFlash || (s.useFlash && s.hasFlash)) this.attachEvents(audio.wrapper, audio);
// Store the newly-created `audiojs` instance.
this.instances[id] = audio;
return audio;
},
// ### Helper methods for constructing a working player
// Inject a wrapping div and the markup for the html player.
createPlayer: function(element, player, id) {
var wrapper = document.createElement('div'),
newElement = element.cloneNode(true);
wrapper.setAttribute('class', 'audiojs');
wrapper.setAttribute('className', 'audiojs');
wrapper.setAttribute('id', id);
// Fix IE's broken implementation of `innerHTML` & `cloneNode` for HTML5 elements.
if (newElement.outerHTML && !document.createElement('audio').canPlayType) {
newElement = this.helpers.cloneHtml5Node(element);
wrapper.innerHTML = player.markup;
wrapper.appendChild(newElement);
element.outerHTML = wrapper.outerHTML;
wrapper = document.getElementById(id);
} else {
wrapper.appendChild(newElement);
wrapper.innerHTML = wrapper.innerHTML + player.markup;
element.parentNode.replaceChild(wrapper, element);
}
return wrapper.getElementsByTagName('audio')[0];
},
// Attaches useful event callbacks to an `audiojs` instance.
attachEvents: function(wrapper, audio) {
if (!audio.settings.createPlayer) return;
var player = audio.settings.createPlayer,
playPause = getByClass(player.playPauseClass, wrapper),
scrubber = getByClass(player.scrubberClass, wrapper),
leftPos = function(elem) {
var curleft = 0;
if (elem.offsetParent) {
do { curleft += elem.offsetLeft; } while (elem = elem.offsetParent);
}
return curleft;
};
container[audiojs].events.addListener(playPause, 'click', function(e) {
audio.playPause.apply(audio);
});
container[audiojs].events.addListener(scrubber, 'click', function(e) {
var relativeLeft = e.clientX - leftPos(this);
audio.skipTo(relativeLeft / scrubber.offsetWidth);
});
// _If flash is being used, then the following handlers don't need to be registered._
if (audio.settings.useFlash) return;
// Start tracking the load progress of the track.
container[audiojs].events.trackLoadProgress(audio);
container[audiojs].events.addListener(audio.element, 'timeupdate', function(e) {
audio.updatePlayhead.apply(audio);
});
container[audiojs].events.addListener(audio.element, 'ended', function(e) {
audio.trackEnded.apply(audio);
});
container[audiojs].events.addListener(audio.source, 'error', function(e) {
// on error, cancel any load timers that are running.
clearInterval(audio.readyTimer);
clearInterval(audio.loadTimer);
audio.settings.loadError.apply(audio);
});
},
// Flash requires a slightly different API to the `<audio>` element, so this method is used to overwrite the standard event handlers.
attachFlashEvents: function(element, audio) {
audio['swfReady'] = false;
audio['load'] = function(mp3) {
// If the swf isn't ready yet then just set `audio.mp3`. `init()` will load it in once the swf is ready.
audio.mp3 = mp3;
if (audio.swfReady) audio.element.load(mp3);
}
audio['loadProgress'] = function(percent, duration) {
audio.loadedPercent = percent;
audio.duration = duration;
audio.settings.loadStarted.apply(audio);
audio.settings.loadProgress.apply(audio, [percent]);
}
audio['skipTo'] = function(percent) {
if (percent > audio.loadedPercent) return;
audio.updatePlayhead.call(audio, [percent])
audio.element.skipTo(percent);
}
audio['updatePlayhead'] = function(percent) {
audio.settings.updatePlayhead.apply(audio, [percent]);
}
audio['play'] = function() {
// If the audio hasn't started preloading, then start it now.
// Then set `preload` to `true`, so that any tracks loaded in subsequently are loaded straight away.
if (!audio.settings.preload) {
audio.settings.preload = true;
audio.element.init(audio.mp3);
}
audio.playing = true;
// IE doesn't allow a method named `play()` to be exposed through `ExternalInterface`, so lets go with `pplay()`.
// <http://dev.nuclearrooster.com/2008/07/27/externalinterfaceaddcallback-can-cause-ie-js-errors-with-certain-keyworkds/>
audio.element.pplay();
audio.settings.play.apply(audio);
}
audio['pause'] = function() {
audio.playing = false;
// Use `ppause()` for consistency with `pplay()`, even though it isn't really required.
audio.element.ppause();
audio.settings.pause.apply(audio);
}
audio['setVolume'] = function(v) {
audio.element.setVolume(v);
}
audio['loadStarted'] = function() {
// Load the mp3 specified by the audio element into the swf.
audio.swfReady = true;
if (audio.settings.preload) audio.element.init(audio.mp3);
if (audio.settings.autoplay) audio.play.apply(audio);
}
},
// ### Injecting an swf from a string
// Build up the swf source by replacing the `$keys` and then inject the markup into the page.
injectFlash: function(audio, id) {
var flashSource = this.flashSource.replace(/\$1/g, id);
flashSource = flashSource.replace(/\$2/g, audio.settings.swfLocation);
// `(+new Date)` ensures the swf is not pulled out of cache. The fixes an issue with Firefox running multiple players on the same page.
flashSource = flashSource.replace(/\$3/g, (+new Date + Math.random()));
// Inject the player markup using a more verbose `innerHTML` insertion technique that works with IE.
var html = audio.wrapper.innerHTML,
div = document.createElement('div');
div.innerHTML = flashSource + html;
audio.wrapper.innerHTML = div.innerHTML;
audio.element = this.helpers.getSwf(id);
},
// ## Helper functions
helpers: {
// **Merge two objects, with `obj2` overwriting `obj1`**
// The merge is shallow, but that's all that is required for our purposes.
merge: function(obj1, obj2) {
for (attr in obj2) {
if (obj1.hasOwnProperty(attr) || obj2.hasOwnProperty(attr)) {
obj1[attr] = obj2[attr];
}
}
},
// **Clone a javascript object (recursively)**
clone: function(obj){
if (obj == null || typeof(obj) !== 'object') return obj;
var temp = new obj.constructor();
for (var key in obj) temp[key] = arguments.callee(obj[key]);
return temp;
},
// **Adding/removing classnames from elements**
addClass: function(element, className) {
var re = new RegExp('(\\s|^)'+className+'(\\s|$)');
if (re.test(element.className)) return;
element.className += ' ' + className;
},
removeClass: function(element, className) {
var re = new RegExp('(\\s|^)'+className+'(\\s|$)');
element.className = element.className.replace(re,' ');
},
// **Dynamic CSS injection**
// Takes a string of css, inserts it into a `<style>`, then injects it in at the very top of the `<head>`. This ensures any user-defined styles will take precedence.
injectCss: function(audio, string) {
// If an `audiojs` `<style>` tag already exists, then append to it rather than creating a whole new `<style>`.
var prepend = '',
styles = document.getElementsByTagName('style'),
css = string.replace(/\$1/g, audio.settings.imageLocation);
css = css.replace(/\$2/g, audio.settings.retinaImageLocation);
for (var i = 0, ii = styles.length; i < ii; i++) {
var title = styles[i].getAttribute('title');
if (title && ~title.indexOf('audiojs')) {
style = styles[i];
if (style.innerHTML === css) return;
prepend = style.innerHTML;
break;
}
};
var head = document.getElementsByTagName('head')[0],
firstchild = head.firstChild,
style = document.createElement('style');
if (!head) return;
style.setAttribute('type', 'text/css');
style.setAttribute('title', 'audiojs');
if (style.styleSheet) style.styleSheet.cssText = prepend + css;
else style.appendChild(document.createTextNode(prepend + css));
if (firstchild) head.insertBefore(style, firstchild);
else head.appendChild(style);
},
// **Handle all the IE6+7 requirements for cloning `<audio>` nodes**
// Create a html5-safe document fragment by injecting an `<audio>` element into the document fragment.
cloneHtml5Node: function(audioTag) {
var fragment = document.createDocumentFragment(),
doc = fragment.createElement ? fragment : document;
doc.createElement('audio');
var div = doc.createElement('div');
fragment.appendChild(div);
div.innerHTML = audioTag.outerHTML;
return div.firstChild;
},
// **Cross-browser `<object>` / `<embed>` element selection**
getSwf: function(name) {
var swf = document[name] || window[name];
return swf.length > 1 ? swf[swf.length - 1] : swf;
}
},
// ## Event-handling
events: {
memoryLeaking: false,
listeners: [],
// **A simple cross-browser event handler abstraction**
addListener: function(element, eventName, func) {
// For modern browsers use the standard DOM-compliant `addEventListener`.
if (element.addEventListener) {
element.addEventListener(eventName, func, false);
// For older versions of Internet Explorer, use `attachEvent`.
// Also provide a fix for scoping `this` to the calling element and register each listener so the containing elements can be purged on page unload.
} else if (element.attachEvent) {
this.listeners.push(element);
if (!this.memoryLeaking) {
window.attachEvent('onunload', function() {
if(this.listeners) {
for (var i = 0, ii = this.listeners.length; i < ii; i++) {
container[audiojs].events.purge(this.listeners[i]);
}
}
});
this.memoryLeaking = true;
}
element.attachEvent('on' + eventName, function() {
func.call(element, window.event);
});
}
},
trackLoadProgress: function(audio) {
// If `preload` has been set to `none`, then we don't want to start loading the track yet.
if (!audio.settings.preload) return;
var readyTimer,
loadTimer,
audio = audio,
ios = (/(ipod|iphone|ipad)/i).test(navigator.userAgent);
// Use timers here rather than the official `progress` event, as Chrome has issues calling `progress` when loading mp3 files from cache.
readyTimer = setInterval(function() {
if (audio.element.readyState > -1) {
// iOS doesn't start preloading the mp3 until the user interacts manually, so this stops the loader being displayed prematurely.
if (!ios) audio.init.apply(audio);
}
if (audio.element.readyState > 1) {
if (audio.settings.autoplay) audio.play.apply(audio);
clearInterval(readyTimer);
// Once we have data, start tracking the load progress.
loadTimer = setInterval(function() {
audio.loadProgress.apply(audio);
if (audio.loadedPercent >= 1) clearInterval(loadTimer);
}, 200);
}
}, 200);
audio.readyTimer = readyTimer;
audio.loadTimer = loadTimer;
},
// **Douglas Crockford's IE6 memory leak fix**
// <http://javascript.crockford.com/memory/leak.html>
// This is used to release the memory leak created by the circular references created when fixing `this` scoping for IE. It is called on page unload.
purge: function(d) {
var a = d.attributes, i;
if (a) {
for (i = 0; i < a.length; i += 1) {
if (typeof d[a[i].name] === 'function') d[a[i].name] = null;
}
}
a = d.childNodes;
if (a) {
for (i = 0; i < a.length; i += 1) purge(d.childNodes[i]);
}
},
// **DOMready function**
// As seen here: <https://github.com/dperini/ContentLoaded/>.
ready: (function() { return function(fn) {
var win = window, done = false, top = true,
doc = win.document, root = doc.documentElement,
add = doc.addEventListener ? 'addEventListener' : 'attachEvent',
rem = doc.addEventListener ? 'removeEventListener' : 'detachEvent',
pre = doc.addEventListener ? '' : 'on',
init = function(e) {
if (e.type == 'readystatechange' && doc.readyState != 'complete') return;
(e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
if (!done && (done = true)) fn.call(win, e.type || e);
},
poll = function() {
try { root.doScroll('left'); } catch(e) { setTimeout(poll, 50); return; }
init('poll');
};
if (doc.readyState == 'complete') fn.call(win, 'lazy');
else {
if (doc.createEventObject && root.doScroll) {
try { top = !win.frameElement; } catch(e) { }
if (top) poll();
}
doc[add](pre + 'DOMContentLoaded', init, false);
doc[add](pre + 'readystatechange', init, false);
win[add](pre + 'load', init, false);
}
}
})()
}
}
// ## The audiojs class
// We create one of these per `<audio>` and then push them into `audiojs['instances']`.
container[audiojsInstance] = function(element, settings) {
// Each audio instance returns an object which contains an API back into the `<audio>` element.
this.element = element;
this.wrapper = element.parentNode;
this.source = element.getElementsByTagName('source')[0] || element;
// First check the `<audio>` element directly for a src and if one is not found, look for a `<source>` element.
this.mp3 = (function(element) {
var source = element.getElementsByTagName('source')[0];
return element.getAttribute('src') || (source ? source.getAttribute('src') : null);
})(element);
this.settings = settings;
this.loadStartedCalled = false;
this.loadedPercent = 0;
this.duration = 1;
this.playing = false;
}
container[audiojsInstance].prototype = {
// API access events:
// Each of these do what they need do and then call the matching methods defined in the settings object.
updatePlayhead: function() {
var percent = this.element.currentTime / this.duration;
this.settings.updatePlayhead.apply(this, [percent]);
},
skipTo: function(percent) {
if (percent > this.loadedPercent) return;
this.element.currentTime = this.duration * percent;
this.updatePlayhead();
},
load: function(mp3) {
this.loadStartedCalled = false;
this.source.setAttribute('src', mp3);
// The now outdated `load()` method is required for Safari 4
this.element.load();
this.mp3 = mp3;
container[audiojs].events.trackLoadProgress(this);
},
loadError: function() {
this.settings.loadError.apply(this);
},
init: function() {
this.settings.init.apply(this);
},
loadStarted: function() {
// Wait until `element.duration` exists before setting up the audio player.
if (!this.element.duration) return false;
this.duration = this.element.duration;
this.updatePlayhead();
this.settings.loadStarted.apply(this);
},
loadProgress: function() {
if (this.element.buffered != null && this.element.buffered.length) {
// Ensure `loadStarted()` is only called once.
if (!this.loadStartedCalled) {
this.loadStartedCalled = this.loadStarted();
}
var durationLoaded = this.element.buffered.end(this.element.buffered.length - 1);
this.loadedPercent = durationLoaded / this.duration;
this.settings.loadProgress.apply(this, [this.loadedPercent]);
}
},
playPause: function() {
if (this.playing) this.pause();
else this.play();
},
play: function() {
var ios = (/(ipod|iphone|ipad)/i).test(navigator.userAgent);
// On iOS this interaction will trigger loading the mp3, so run `init()`.
if (ios && this.element.readyState == 0) this.init.apply(this);
// If the audio hasn't started preloading, then start it now.
// Then set `preload` to `true`, so that any tracks loaded in subsequently are loaded straight away.
if (!this.settings.preload) {
this.settings.preload = true;
this.element.setAttribute('preload', 'auto');
container[audiojs].events.trackLoadProgress(this);
}
this.playing = true;
this.element.play();
this.settings.play.apply(this);
},
pause: function() {
this.playing = false;
this.element.pause();
this.settings.pause.apply(this);
},
setVolume: function(v) {
this.element.volume = v;
},
trackEnded: function(e) {
this.skipTo.apply(this, [0]);
if (!this.settings.loop) this.pause.apply(this);
this.settings.trackEnded.apply(this);
}
}
// **getElementsByClassName**
// Having to rely on `getElementsByTagName` is pretty inflexible internally, so a modified version of Dustin Diaz's `getElementsByClassName` has been included.
// This version cleans things up and prefers the native DOM method if it's available.
var getByClass = function(searchClass, node) {
var matches = [];
node = node || document;
if (node.getElementsByClassName) {
matches = node.getElementsByClassName(searchClass);
} else {
var i, l,
els = node.getElementsByTagName("*"),
pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
for (i = 0, l = els.length; i < l; i++) {
if (pattern.test(els[i].className)) {
matches.push(els[i]);
}
}
}
return matches.length > 1 ? matches : matches[0];
};
// The global variable names are passed in here and can be changed if they conflict with anything else.
})('audiojs', 'audiojsInstance', this);
| x112358/cdnjs | ajax/libs/audiojs/1.0.0/audio.js | JavaScript | mit | 32,910 |
<div id="svg">
<svg width="0" height="0" style="position:absolute"><symbol viewBox="0 0 180 180" id="icon-clock"><path d="M90 30.178c32.983 0 59.822 26.84 59.822 59.822S122.982 149.822 90 149.822 30.178 122.982 30.178 90 57.018 30.178 90 30.178M90 14c-42.053 0-76 33.947-76 76 0 42.054 33.947 76 76 76 42.054 0 76-33.946 76-76 0-42.053-33.946-76-76-76z"/><path d="M119.197 86.268H95.254V58.436c0-4.277-3.5-7.777-7.777-7.777-4.278 0-7.778 3.5-7.778 7.776v35.608c0 4.278 3.5 7.778 7.777 7.778h31.72c4.277 0 7.777-3.5 7.777-7.778 0-4.276-3.5-7.776-7.777-7.776z"/></symbol><symbol viewBox="0 0 180 180" id="icon-dot"><path d="M90 14c-42.053 0-76 33.947-76 76 0 42.054 33.947 76 76 76 42.054 0 76-33.946 76-76 0-42.053-33.946-76-76-76z"/><path fill="#FFF" d="M90 22.365c37.29 0 67.635 30.346 67.635 67.635 0 37.29-30.345 67.635-67.635 67.635S22.365 127.29 22.365 90c0-37.29 30.345-67.635 67.635-67.635"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-00"/><symbol viewBox="0 0 180 180" id="icon-maneuver-01"><path d="M139.183 59.363L88.14 11.69 40.43 62.817a8 8 0 0 0 .39 11.307 7.97 7.97 0 0 0 5.457 2.15 7.98 7.98 0 0 0 5.85-2.54l28.487-30.526V159a8 8 0 0 0 16 0V41.498l31.647 29.56a8 8 0 0 0 10.923-11.695z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-02"><path d="M117.18 42.357a8 8 0 0 0-11.306.39 8 8 0 0 0 .39 11.308l28.522 26.617H25a8 8 0 0 0 0 16h111.508l-27.7 29.662a8 8 0 0 0 .386 11.307 7.97 7.97 0 0 0 5.458 2.154 7.98 7.98 0 0 0 5.85-2.54l45.81-49.05-49.13-45.847z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-03"><path d="M155 80.672H45.213l28.522-26.617A8 8 0 0 0 62.82 42.357L13.69 88.204l45.81 49.05a7.973 7.973 0 0 0 5.85 2.54 8 8 0 0 0 5.845-13.46L43.49 96.674H155a8 8 0 0 0 0-16z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-04"><path d="M90 14c-24.942 0-45.233 21.248-45.233 47.366 0 12.876 5.857 24.85 11.025 35.416.928 1.896 1.834 3.75 2.674 5.545 8.044 17.25 25.822 59.57 26 59.995A6.002 6.002 0 0 0 90 166a6.003 6.003 0 0 0 5.436-3.462c.208-.445 20.873-44.718 28.013-60.235 6.322-13.72 11.784-25.568 11.784-40.937C135.234 35.248 114.94 14 90 14zm0 25.216c7.72 0 14 6.282 14 14.004 0 7.718-6.28 13.997-14 13.997s-14-6.28-14-13.997c0-7.722 6.28-14.004 14-14.004z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-05"><path d="M121.735 14c-24.94 0-45.232 21.25-45.232 47.366 0 12.876 5.857 24.85 11.025 35.416.928 1.897 1.834 3.75 2.674 5.545 8.044 17.25 25.822 59.57 26 59.995A6.003 6.003 0 0 0 121.62 166h.118a6.003 6.003 0 0 0 5.437-3.462c.208-.445 20.873-44.718 28.012-60.235 6.324-13.72 11.785-25.568 11.785-40.937C166.97 35.25 146.677 14 121.735 14zm0 25.216c7.72 0 14 6.282 14 14.004 0 7.718-6.28 13.997-14 13.997s-14-6.28-14-13.997c0-7.722 6.28-14.004 14-14.004z"/><path fill="#010101" d="M50.255 87.21a6 6 0 1 0-8.192 8.77l15.927 14.88H19.032a6 6 0 0 0 0 12h40.342L43.61 139.72a6 6 0 1 0 8.765 8.195l29.307-31.34L50.255 87.21z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-06"><path d="M58.267 14c-24.943 0-45.235 21.25-45.235 47.366 0 15.365 5.46 27.215 11.784 40.933 7.14 15.52 27.807 59.793 28.015 60.238A6 6 0 0 0 58.268 166h.118a6 6 0 0 0 5.415-3.678c.18-.425 17.954-42.745 26-59.992.84-1.8 1.748-3.655 2.676-5.553C97.643 86.214 103.5 74.24 103.5 61.367 103.497 35.248 83.206 14 58.266 14zm0 25.216c7.72 0 14 6.282 14 14.003 0 7.717-6.28 13.996-14 13.996s-14-6.28-14-13.997c0-7.722 6.28-14.004 14-14.004z"/><path fill="#010101" d="M160.97 110.86h-38.96l15.928-14.88a6 6 0 1 0-8.192-8.77l-31.428 29.365 29.308 31.34a5.984 5.984 0 0 0 4.384 1.903 6 6 0 0 0 4.38-10.098l-15.764-16.858h40.343a6 6 0 0 0 0-12z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-07"><path d="M139.183 59.363L88.14 11.69 40.43 62.817a8 8 0 0 0 .39 11.307 7.97 7.97 0 0 0 5.457 2.15 7.98 7.98 0 0 0 5.85-2.54l28.487-30.526V159a8 8 0 0 0 16 0V41.498l31.647 29.56a8 8 0 0 0 10.923-11.695z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-08"><path d="M139.183 59.363L88.14 11.69 40.43 62.817a8 8 0 0 0 .39 11.307 7.97 7.97 0 0 0 5.457 2.15 7.98 7.98 0 0 0 5.85-2.54l28.487-30.526V159a8 8 0 0 0 16 0V41.498l31.647 29.56a8 8 0 0 0 10.923-11.695z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-09"><path d="M95.03 12.27c-4.272-1.14-8.653 1.397-9.793 5.666a8 8 0 0 0 5.665 9.794l31.007 8.28-93.255 50.736V160a8 8 0 0 0 16 0V96.256l86.146-46.87-8.68 32.45a8 8 0 0 0 15.456 4.133l15.566-58.18L95.03 12.27z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-10"><path d="M114.59 14.15a8 8 0 1 0-10.917 11.698l23.344 21.79H24.762V160a8 8 0 0 0 16 0V63.637h87.992l-22.89 24.508a8 8 0 0 0 11.693 10.922l40.99-43.888-43.958-41.03z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-11"><path d="M149.762 52.81c-.45-4.395-4.39-7.592-8.772-7.143a8 8 0 0 0-7.144 8.773l3.547 34.667L42.86 12H24.826v148a8 8 0 0 0 16 0V30.986l84.918 69.265-31.793 3.24a8 8 0 1 0 1.62 15.918l60.378-6.152-6.186-60.445z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-12"><path d="M152.734 62.208a7.997 7.997 0 0 0-11.307.39L119.587 86V12H24.725v148a8 8 0 0 0 16 0V28h62.862v59.76L79 64.796a7.996 7.996 0 0 0-11.307.387 8 8 0 0 0 .386 11.307l43.955 41.052 41.09-44.026a8 8 0 0 0-.39-11.308z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-13"><path d="M60.413 12v74l-21.84-23.4a8 8 0 0 0-11.697 10.915l41.09 44.026 43.954-41.05a8 8 0 0 0 .386-11.307A8 8 0 0 0 101 64.796L76.412 87.76V28h62.862v132a8 8 0 0 0 16 0V12H60.413z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-14"><path d="M137.14 12L42.606 89.106l3.547-34.667a8 8 0 0 0-7.144-8.774c-4.398-.445-8.323 2.75-8.772 7.144l-6.187 60.446 60.378 6.152a8 8 0 0 0 1.62-15.917l-31.792-3.24 84.918-69.264V160a8 8 0 0 0 16 0V12H137.14z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-15"><path d="M52.982 47.637L76.327 25.85A8 8 0 0 0 65.41 14.15L21.453 55.178l40.99 43.888a7.977 7.977 0 0 0 5.848 2.54 8 8 0 0 0 5.845-13.46l-22.89-24.51h87.993V160a8 8 0 0 0 16 0V47.637H52.982z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-16"><path d="M58.09 36.01l31.01-8.28A8 8 0 0 0 84.97 12.27L26.857 27.79 42.424 85.97a7.988 7.988 0 0 0 9.796 5.66 8 8 0 0 0 5.66-9.796L49.2 49.388l86.145 46.868V160a8 8 0 0 0 16 0V86.746L58.09 36.01z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-17"><path d="M139.183 59.363L88.14 11.69 40.43 62.817a8 8 0 0 0 .39 11.307 7.97 7.97 0 0 0 5.457 2.15 7.98 7.98 0 0 0 5.85-2.54l28.487-30.526V159a8 8 0 0 0 16 0V41.498l31.647 29.56a8 8 0 0 0 10.923-11.695z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-18"><path d="M29.377 13h14v141h-14z" opacity=".4"/><path d="M95.308 12.27a7.997 7.997 0 0 0-9.794 5.666 8 8 0 0 0 5.665 9.793l31.007 8.28-93.25 50.736V160a8 8 0 0 0 16 0V96.255l86.143-46.87-8.68 32.448a8 8 0 0 0 5.66 9.795 7.975 7.975 0 0 0 2.072.274 8.005 8.005 0 0 0 7.724-5.935L153.42 27.79 95.308 12.27z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-19"><path d="M136.9 13h14v141h-14z" opacity=".4"/><path d="M58.09 36.01l31.01-8.28a8 8 0 0 0 5.664-9.794 7.997 7.997 0 0 0-9.794-5.665L26.858 27.79l15.565 58.18a8.003 8.003 0 0 0 7.723 5.934c.684 0 1.38-.088 2.072-.274a8 8 0 0 0 5.66-9.795L49.2 49.388l86.144 46.87V160a8 8 0 0 0 16 0V86.746L58.092 36.01z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-20"><path d="M29.377 13h14v141h-14z" opacity=".4"/><path d="M95.308 12.27a7.997 7.997 0 0 0-9.794 5.666 8 8 0 0 0 5.665 9.793l31.007 8.28-93.25 50.736V160a8 8 0 0 0 16 0V96.255l86.143-46.87-8.68 32.448a8 8 0 0 0 5.66 9.795 7.975 7.975 0 0 0 2.072.274 8.005 8.005 0 0 0 7.724-5.935L153.42 27.79 95.308 12.27z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-21"><path d="M136.9 13h14v141h-14z" opacity=".4"/><path d="M58.09 36.01l31.01-8.28a8 8 0 0 0 5.664-9.794 7.997 7.997 0 0 0-9.794-5.665L26.858 27.79l15.565 58.18a8.003 8.003 0 0 0 7.723 5.934c.684 0 1.38-.088 2.072-.274a8 8 0 0 0 5.66-9.795L49.2 49.388l86.144 46.87V160a8 8 0 0 0 16 0V86.746L58.092 36.01z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-22"><path d="M139.183 59.363L88.14 11.69 40.43 62.817a8 8 0 0 0 .39 11.307 7.97 7.97 0 0 0 5.457 2.15 7.98 7.98 0 0 0 5.85-2.54l28.487-30.526V159a8 8 0 0 0 16 0V41.498l31.647 29.56a8 8 0 0 0 10.923-11.695z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-23"><path d="M29.377 13h14v141h-14z" opacity=".4"/><path d="M95.308 12.27a7.997 7.997 0 0 0-9.794 5.666 8 8 0 0 0 5.665 9.793l31.007 8.28-93.25 50.736V160a8 8 0 0 0 16 0V96.255l86.143-46.87-8.68 32.448a8 8 0 0 0 5.66 9.795 7.975 7.975 0 0 0 2.072.274 8.005 8.005 0 0 0 7.724-5.935L153.42 27.79 95.308 12.27z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-24"><path d="M136.9 13h14v141h-14z" opacity=".4"/><path d="M58.09 36.01l31.01-8.28a8 8 0 0 0 5.664-9.794 7.997 7.997 0 0 0-9.794-5.665L26.858 27.79l15.565 58.18a8.003 8.003 0 0 0 7.723 5.934c.684 0 1.38-.088 2.072-.274a8 8 0 0 0 5.66-9.795L49.2 49.388l86.144 46.87V160a8 8 0 0 0 16 0V86.746L58.092 36.01z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-25"><path d="M155.863 151c-30.06 0-54.54-24.52-54.88-54.787.003-.114.017-.226.017-.34V46.656l23.163 24.82a7.978 7.978 0 0 0 5.85 2.543 8 8 0 0 0 5.847-13.458L91.188 12.69 43.4 57.33a8 8 0 1 0 10.92 11.69L79 45.97v49.903c0 .106.013.21.016.314C78.688 126.467 54.202 151 24.136 151a8 8 0 0 0 0 16C53.98 167 79.56 148.314 90 121.953 100.437 148.313 126.017 167 155.862 167a8 8 0 0 0 0-16z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-26"><path opacity=".4" d="M153 64.29a7.002 7.002 0 0 0-8.872-4.392l-21.11 7.135c-5.315-7.015-13.083-12.07-22.018-13.878V27.003a7 7 0 0 0-14 0v26.045c-14.745 2.73-26.432 14.277-29.353 28.955H34a7 7 0 0 0 0 14h23.58a36.476 36.476 0 0 0 3.727 10.55l-17.52 10.114a7 7 0 0 0 7 12.125l19.518-11.268c6.36 5.262 14.516 8.428 23.396 8.428 20.273 0 36.767-16.492 36.767-36.764 0-3.275-.437-6.45-1.244-9.474l19.388-6.553a7 7 0 0 0 4.39-8.87zM93.7 111.95c-12.55 0-22.763-10.212-22.763-22.764S81.15 66.424 93.7 66.424c12.554 0 22.767 10.212 22.767 22.764s-10.213 22.764-22.766 22.764z"/><path d="M150.315 99.885L128.5 64.863l-34.934 21.78a8 8 0 0 0 8.464 13.577l13.258-8.266c-1.262 10.85-9.84 18.998-20.588 18.998a7.995 7.995 0 0 0-7 4.13 7.967 7.967 0 0 0-1.7 4.92v34a8 8 0 0 0 16 0v-27.77c14.143-2.816 25.137-13.71 28.438-27.998l6.298 10.11a7.99 7.99 0 0 0 6.798 3.77 7.997 7.997 0 0 0 6.78-12.23z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-27"><path d="M93 61.003a4 4 0 0 1-4-4v-28a4 4 0 0 1 8 0v28a4 4 0 0 1-4 4zM93 163.003a4 4 0 0 1-4-4v-27a4 4 0 0 1 8 0v27a4 4 0 0 1-4 4z" opacity=".4"/><path opacity=".4" d="M152.795 69.75a6.996 6.996 0 0 0-8.873-4.39l-21.546 7.284c-6.808-9.028-17.62-14.878-29.772-14.878-18.495 0-33.88 13.546-36.772 31.236H34a7 7 0 0 0 0 14h22.202a37.045 37.045 0 0 0 3.615 9.737l-17.912 10.34a7 7 0 0 0 7 12.125l19.918-11.5c6.458 5.366 14.748 8.598 23.78 8.598 20.55 0 37.27-16.718 37.27-37.268 0-3.36-.453-6.613-1.29-9.712l19.823-6.7a6.998 6.998 0 0 0 4.39-8.873zm-60.19 48.554c-6.943 0-13.182-3.06-17.448-7.898-.02-.023-.04-.048-.062-.072-3.58-4.093-5.758-9.443-5.758-15.297 0-12.83 10.438-23.27 23.268-23.27s23.27 10.438 23.27 23.27c0 12.83-10.44 23.267-23.27 23.267z"/><path d="M130.874 95.036c0-18.217-12.8-33.49-29.874-37.33V41.37l10.704 10.01a7.996 7.996 0 0 0 11.307-.378 7.998 7.998 0 0 0-.378-11.307L92.152 11.19 63.595 41.75a8 8 0 0 0 .384 11.306 7.97 7.97 0 0 0 5.46 2.155 7.98 7.98 0 0 0 5.846-2.537L85 42.276v18.727c0 .363.032.718.08 1.067a7.98 7.98 0 0 0-.477 2.696 8 8 0 0 0 8 8c12.28 0 22.27 9.99 22.27 22.27 0 12.007-8.64 21.508-19.91 22.22a7.996 7.996 0 0 0-1.963-.253 8 8 0 0 0-8 8v34a8 8 0 0 0 16 0v-26.427c17.238-3.43 29.874-18.69 29.874-37.54z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-28"><path fill-rule="evenodd" clip-rule="evenodd" d="M107.63 157.76c-2.81 5.415-7.57 8.033-13.646 8.12-6.367.1-11.348-2.518-14.336-8.19-1.46 3.504-4.277 5.65-7.785 7.067-4.225 1.672-8.533 1.643-12.732.03-4.91-1.88-6.923-5.677-7.274-10.4-.05-.652 0-1.33 0-2.173 2.8 3.773 6.973 4.596 11.24 5.067 3.285.37 6.594.132 9.77-.783 2.773-.815 5.348-1.904 6.836-4.597 1.475 2.65 3.984 3.812 6.717 4.545 5.052 1.37 10.14 1.323 15.165-.192 2.883-.876 4.385-1.97 6.05-4.273 2.01 3.29 5.44 4.355 9.04 4.992 4.596.815 9.168.594 13.592-.984 2.174-.775 4.08-1.883 5.238-4.038 2.676 4.02 7.033 4.895 11.49 5.332 4.48.422 8.934.012 12.965-2.104 1.27-.67 2.307-1.72 3.318-2.504.74 5.454-2.273 10.433-7.307 12.18-5.503 1.895-10.747 1.41-15.634-1.678-2.217-1.425-3.105-2.47-4.746-5.398-2.848 5.445-7.73 8.09-13.95 8.112-6.238.012-11.148-2.598-14.01-8.13z" opacity=".4"/><path d="M36.776 80.89a6 6 0 0 1-4.38-10.098L52.81 48.96 30.897 28.483a6 6 0 1 1 8.193-8.767l30.687 28.672-28.618 30.6a5.98 5.98 0 0 1-4.384 1.903z"/><path d="M56.807 54.674H16.61a6 6 0 0 1 0-12h40.196a6 6 0 0 1 0 12z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M164.143 96.956l-10.366-5.14-4.88-24.052a5.507 5.507 0 0 0-3.345-4.012l-8.422-3.375-2.11-19.59a5.5 5.5 0 0 0-4.3-4.785l-7.92-1.72V19.77a5.5 5.5 0 0 0-5.5-5.5H96.31a5.5 5.5 0 0 0-5.5 5.5v14.51L82.89 36a5.503 5.503 0 0 0-4.3 4.785l-2.112 19.59-8.42 3.375a5.5 5.5 0 0 0-3.345 4.012l-4.888 24.093L49.65 96.97a5.5 5.5 0 0 0-2.758 6.62L57.6 136.4a5.5 5.5 0 0 0 .836 1.605c2.725 3.613 5.974 7.164 13.015 7.456.166.007.34.01.524.01 1.098 0 3.197-.147 5.558-1.075 3.426 2.967 8.404 4.633 14.256 4.633 4.634 0 10.594-1.183 15.123-4.245 4.53 3.062 10.49 4.245 15.123 4.245 5.852 0 10.83-1.667 14.256-4.634a15.47 15.47 0 0 0 5.556 1.077c.185 0 .36-.003.532-.01 7.036-.29 10.284-3.843 13.007-7.457a5.503 5.503 0 0 0 .836-1.604l10.708-32.81a5.5 5.5 0 0 0-2.785-6.634zm-55.16-27.347a5.494 5.494 0 0 0-4.914.013L72.322 85.576l2.58-12.717 8.734-3.5a5.502 5.502 0 0 0 3.423-4.517L89.1 45.91l8.378-1.82a5.475 5.475 0 0 0 1.857-.793h14.938a5.492 5.492 0 0 0 1.857.793l8.376 1.82 2.04 18.932a5.505 5.505 0 0 0 3.423 4.517l8.735 3.5 2.59 12.77-32.313-16.02z"/></symbol><symbol viewBox="0 0 180 180" id="icon-maneuver-29"><path fill-rule="evenodd" clip-rule="evenodd" d="M107.63 157.76c-2.81 5.415-7.57 8.033-13.646 8.12-6.367.1-11.348-2.518-14.336-8.19-1.46 3.504-4.277 5.65-7.785 7.067-4.225 1.672-8.533 1.643-12.732.03-4.91-1.88-6.923-5.677-7.274-10.4-.05-.652 0-1.33 0-2.173 2.8 3.773 6.973 4.596 11.24 5.067 3.285.37 6.594.132 9.77-.783 2.773-.815 5.348-1.904 6.836-4.597 1.475 2.65 3.984 3.812 6.717 4.545 5.052 1.37 10.14 1.323 15.165-.192 2.883-.876 4.385-1.97 6.05-4.273 2.01 3.29 5.44 4.355 9.04 4.992 4.596.815 9.168.594 13.592-.984 2.174-.775 4.08-1.883 5.238-4.038 2.676 4.02 7.033 4.895 11.49 5.332 4.48.422 8.934.012 12.965-2.104 1.27-.67 2.307-1.72 3.318-2.504.74 5.454-2.273 10.433-7.307 12.18-5.503 1.895-10.747 1.41-15.634-1.678-2.217-1.425-3.105-2.47-4.746-5.398-2.848 5.445-7.73 8.09-13.95 8.112-6.238.012-11.148-2.598-14.01-8.13z" opacity=".4"/><path d="M41.13 80.89a5.986 5.986 0 0 1-4.383-1.9L8.13 48.388l30.686-28.672a6 6 0 1 1 8.193 8.767L25.094 48.96 45.51 70.792a6 6 0 0 1-4.38 10.1z"/><path d="M61.295 54.674H21.1a6 6 0 0 1 0-12h40.195a6 6 0 0 1 0 12z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M164.143 96.956l-10.366-5.14-4.88-24.052a5.507 5.507 0 0 0-3.345-4.012l-8.422-3.375-2.11-19.59a5.5 5.5 0 0 0-4.3-4.785l-7.92-1.72V19.77a5.5 5.5 0 0 0-5.5-5.5H96.31a5.5 5.5 0 0 0-5.5 5.5v14.51L82.89 36a5.503 5.503 0 0 0-4.3 4.785l-2.112 19.59-8.42 3.375a5.5 5.5 0 0 0-3.345 4.012l-4.888 24.093L49.65 96.97a5.5 5.5 0 0 0-2.758 6.62L57.6 136.4a5.5 5.5 0 0 0 .836 1.605c2.725 3.613 5.974 7.164 13.015 7.456.166.007.34.01.524.01 1.098 0 3.197-.147 5.558-1.075 3.426 2.967 8.404 4.633 14.256 4.633 4.634 0 10.594-1.183 15.123-4.245 4.53 3.062 10.49 4.245 15.123 4.245 5.852 0 10.83-1.667 14.256-4.634a15.47 15.47 0 0 0 5.556 1.077c.185 0 .36-.003.532-.01 7.036-.29 10.284-3.843 13.007-7.457a5.503 5.503 0 0 0 .836-1.604l10.708-32.81a5.5 5.5 0 0 0-2.785-6.634zm-55.16-27.347a5.494 5.494 0 0 0-4.914.013L72.323 85.576l2.58-12.717 8.733-3.5a5.502 5.502 0 0 0 3.423-4.517L89.1 45.91l8.378-1.82a5.475 5.475 0 0 0 1.857-.793h14.938a5.492 5.492 0 0 0 1.857.793l8.376 1.82 2.04 18.932a5.505 5.505 0 0 0 3.423 4.517l8.735 3.5 2.59 12.77-32.313-16.02z"/></symbol><symbol viewBox="0 0 180 180" id="icon-mode-auto"><path d="M156.145 98.56c0-7.87-6.44-14.31-14.308-14.31h-2.766l-6.083-21.066c-3.162-11.48-14.964-20.47-26.874-20.47H71.997c-11.853 0-23.786 8.896-27.17 20.255l-6.644 21.28h-.02c-7.87 0-14.308 6.44-14.308 14.31v31.48H35.41v9.503c0 3.934 3.22 7.152 7.152 7.152h3.335c3.933 0 7.155-3.22 7.155-7.152v-9.503h72.16v9.503c0 3.934 3.22 7.152 7.152 7.152h3.335c3.932 0 7.152-3.22 7.152-7.152v-9.503h13.292V98.56zM56.253 66.372c1.865-6.253 9.22-11.737 15.744-11.737h34.116c6.476 0 13.658 5.474 15.38 11.714l5.212 17.9h-76.08l5.628-17.877zm-10.355 47.013c-5.237-.125-9.15-4.312-9.08-9.646.08-5.008 4.326-9.042 9.465-8.964 5.144.082 9.312 4.317 9.225 9.4-.1 5.206-4.388 9.307-9.61 9.21zm87.676-.017c-5.125.01-9.228-4.06-9.24-9.166-.018-5.388 4.055-9.46 9.395-9.434 5.11 0 9.188 4.125 9.204 9.22.005 5.324-4.05 9.366-9.36 9.38z"/></symbol><symbol viewBox="0 0 180 180" id="icon-mode-bicycle"><path fill-rule="evenodd" clip-rule="evenodd" d="M133.85 90.27a28.15 28.15 0 0 0-9.503 1.645c-3.09-6.378-13.3-27.454-13.527-27.975 1.582-.09 2.944-.06 4.272-.27 3.034-.475 4.896-3.564 3.843-6.448-.61-1.667-1.346-3.32-2.297-4.807-.416-.647-1.244-1.155-2.302-1.155-.887 0-1.64.81-1.95 1.497-.296.643-.052 1.65.217 2.403.43 1.204 1.708 3.73 1.708 3.73s-10.085.034-14.78 0c-1.213-.008-2.115-.652-2.64-1.794-.667-1.447-1.35-2.89-2.066-4.312-.75-1.493-2.02-1.998-3.354-1.39-1.275.582-1.777 2.02-1.132 3.45.733 1.625 1.488 3.237 2.314 4.815 1.212 2.315 3.135 3.754 5.748 4.02 1.908.19 3.846.06 5.76.205.526.042 1.25.448 1.48.894 1.423 2.8 4.348 9.562 4.348 9.562H68.275l-3.184-5.38h2.283c1.622-.008 2.63-1.03 2.63-2.494 0-1.457-1.013-2.422-2.665-2.427H56.536c-1.652.006-2.665.97-2.667 2.428 0 1.464 1.008 2.486 2.63 2.495h2.704l-.03.02 5.92 10.218-7.5 13.495a28.096 28.096 0 0 0-11.445-2.427c-15.583 0-28.215 12.63-28.215 28.212 0 15.582 12.632 28.215 28.214 28.215 14.654 0 26.696-11.175 28.078-25.468h8.17c1.223 3.637 4.654 6.26 8.703 6.26a9.188 9.188 0 0 0 9.19-9.19 9.17 9.17 0 0 0-3.51-7.214L113.94 82.17l5.892 11.833c-8.48 4.866-14.194 14-14.194 24.478 0 15.583 12.632 28.216 28.215 28.216 15.582 0 28.214-12.633 28.214-28.215 0-15.58-12.632-28.21-28.213-28.21zm-51.533 25.326h-8.1c-.866-8.538-5.54-15.95-12.298-20.513l6.213-11.095 16.558 27.73a9.198 9.198 0 0 0-2.373 3.878zm9.875-6.416a9.155 9.155 0 0 0-1.09-.07c-.723 0-1.423.09-2.097.25L71.21 79.3h38.5L92.19 109.18z"/></symbol><symbol viewBox="0 0 180 180" id="icon-mode-multimodal"><path d="M147.162 161.32c-1.307-1.036-2.705-1.986-4.06-2.973-5.02-3.65-10.146-7.2-15.052-10.99 5.99-.655 10.693-5.766 10.693-11.924v-90.75c0-6.6-5.4-12-12-12h-15.98l-4.812-6.9c-1.573-2.254-5.11-4.1-7.86-4.1H81.908c-2.75 0-6.287 1.846-7.86 4.1l-4.813 6.9h-15.98c-6.6 0-12 5.4-12 12v90.75c0 6.158 4.704 11.27 10.696 11.925-4.907 3.788-10.034 7.338-15.052 10.99-1.355.985-2.754 1.936-4.06 2.97-.808.644-1.774 1.6-1.407 2.73.175.543.58.988.993 1.37.738.68 1.275.578 2.25.578h110.652c.975 0 1.512.102 2.25-.578.414-.382.818-.827.992-1.37.37-1.13-.598-2.086-1.405-2.73zm-86.398-25.78c-4.88-.117-8.53-4.018-8.463-8.988.077-4.668 4.034-8.427 8.823-8.354 4.793.076 8.678 4.023 8.596 8.76-.097 4.85-4.09 8.673-8.956 8.58zm24.875-29.927a2 2 0 0 1-2 2H50.433a2 2 0 0 1-2-2V65.07a2 2 0 0 1 2-2H83.64a2 2 0 0 1 2 2v40.543zm-4.57-62.988c.035-4.764 3.982-8.7 8.715-8.714 4.814-.005 8.68 3.94 8.67 8.847-.01 4.716-3.865 8.557-8.604 8.55-4.88 0-8.827-3.9-8.78-8.682zm12.815 62.988V65.07a2 2 0 0 1 2-2h33.195a2 2 0 0 1 2 2v40.543a2 2 0 0 1-2 2H95.885a2 2 0 0 1-2-2zm24.607 29.912c-4.775.01-8.6-3.783-8.61-8.54-.017-5.022 3.778-8.818 8.755-8.792 4.764 0 8.562 3.843 8.578 8.59.006 4.963-3.774 8.73-8.723 8.742z"/></symbol><symbol viewBox="0 0 180 180" id="icon-mode-pedestrian"><path d="M124.684 137.263c-.834-3.486-3.768-5.365-7.61-4.825-.155-.27-.305-.537-.448-.807-1.697-3.174-3.39-6.35-5.083-9.527-4.75-8.913-9.664-18.13-14.586-27.148-1.144-2.1-1.643-4.195-1.617-6.793.045-4.916.053-9.876.05-14.797 3.463 2.63 7.854 5.88 11.8 8.802 2.146 1.59 4.175 3.092 5.876 4.36a5.884 5.884 0 0 0 3.548 1.188c1.584 0 3.125-.62 4.338-1.745 1.42-1.32 2.157-3.05 2.07-4.877-.093-1.96-1.104-3.775-2.848-5.112a6496.53 6496.53 0 0 0-14.802-11.307l-3.688-2.812c-.662-.504-2.227-1.604-3.74-2.67-1.365-.96-2.776-1.954-3.39-2.415l-.206-.154a5.99 5.99 0 0 0-3.248-2.557c-2.67-.896-5.333-.053-7.252 2.293l-5.125 6.285c-3.137 3.85-6.275 7.698-9.42 11.54-1.5 1.83-3.004 3.653-4.51 5.478-2.333 2.826-4.666 5.652-6.976 8.5l-.117.144c-1.095 1.35-2.336 2.88-2.24 5.027.142 3.074 1.73 5.253 4.474 6.132 2.605.836 5.19-.028 7.1-2.363 2.194-2.684 4.383-5.368 6.574-8.054l4.767-5.842a1687.35 1687.35 0 0 1 3.477-4.244l.808-.985c-.013 4.236-.03 8.475-.053 12.71-.01 2.19.096 4.512 1.27 6.777L68.29 117.275c-3.86 4.905-7.718 9.81-11.572 14.72-1.902 2.43-2.094 5.346-.502 7.61a53.64 53.64 0 0 0 4.108 5.15c1.098 1.22 2.736 1.918 4.494 1.918 1.1 0 2.175-.275 3.105-.796 2.536-1.414 3.792-4.298 3.054-7.01-.224-.827-.62-1.58-1-2.31l-.25-.48c.117-.156.242-.32.372-.484l4.147-5.274c5.047-6.418 10.094-12.835 15.122-19.263.366-.47.943-1.555.565-2.382l.552 1.037c.826 1.56 1.652 3.118 2.483 4.675l4.81 8.993c3.502 6.555 7.006 13.11 10.522 19.66 1.246 2.322 3.304 3.654 5.648 3.654.662 0 1.335-.108 2.002-.32a56.476 56.476 0 0 0 5.144-1.95 6.212 6.212 0 0 0 3.588-7.16zM90.66 28.973c-6.333-.03-11.153 4.812-11.127 11.187.023 6.05 4.88 10.854 10.96 10.843 6.284-.012 11.065-4.807 11.06-11.09a10.912 10.912 0 0 0-10.894-10.94z"/></symbol><symbol viewBox="0 0 180 180" id="icon-pin-a"><path fill="#FFF" d="M90 18.115c-23.59 0-42.785 20.097-42.785 44.81 0 12.17 5.543 23.5 10.43 33.492a296.92 296.92 0 0 1 2.53 5.238c7.61 16.32 24.424 56.352 24.592 56.75a5.68 5.68 0 0 0 5.126 3.48h.112a5.68 5.68 0 0 0 5.14-3.267c.195-.43 19.737-42.31 26.492-56.98 5.982-12.978 11.148-24.18 11.148-38.714 0-24.712-19.19-44.81-42.785-44.81z"/><path d="M90.005 166h-.112c-3.938-.07-7.41-2.422-8.917-5.994-2.932-6.97-17.556-41.654-24.53-56.61a302.368 302.368 0 0 0-2.492-5.16C48.864 87.827 43.1 76.045 43.1 62.923 43.1 35.947 64.138 14 90 14s46.9 21.947 46.9 48.924c0 15.437-5.34 27.02-11.526 40.434-5.522 11.995-19.587 42.166-24.648 53.028l-1.84 3.947c-1.622 3.456-5.1 5.667-8.88 5.667zM90 22.23c-21.323 0-38.67 18.256-38.67 40.693 0 11.217 5.318 22.087 10.01 31.68.89 1.81 1.76 3.596 2.563 5.308 7.04 15.098 21.717 49.91 24.59 56.736.31.733.862 1.11 1.473 1.122l.04 4.116v-4.116c.604 0 1.158-.354 1.412-.897.02-.04.708-1.513 1.847-3.962 5.062-10.854 19.115-41.007 24.635-52.99 5.78-12.54 10.77-23.366 10.77-36.994 0-22.438-17.347-40.693-38.67-40.693z"/><g><path d="M102.61 86.973l-3.59-11.78H80.98l-3.584 11.78H66.09L83.553 37.29h12.83l17.527 49.683h-11.3zm-6.093-20.58C93.2 55.726 91.33 49.69 90.917 48.29c-.42-1.398-.72-2.506-.9-3.317-.745 2.89-2.878 10.03-6.394 21.422h12.894z"/></g></symbol><symbol viewBox="0 0 180 180" id="icon-pin-b"><path fill="#FFF" d="M90 18.115c-23.59 0-42.785 20.097-42.785 44.81 0 12.17 5.543 23.5 10.43 33.492a296.92 296.92 0 0 1 2.53 5.238c7.61 16.32 24.424 56.352 24.592 56.75a5.68 5.68 0 0 0 5.126 3.48h.112a5.68 5.68 0 0 0 5.14-3.267c.195-.43 19.737-42.31 26.492-56.98 5.982-12.978 11.148-24.18 11.148-38.714 0-24.712-19.19-44.81-42.785-44.81z"/><path d="M90.005 166h-.112c-3.938-.07-7.41-2.422-8.917-5.994-2.932-6.97-17.556-41.654-24.53-56.61a302.368 302.368 0 0 0-2.492-5.16C48.864 87.827 43.1 76.045 43.1 62.923 43.1 35.947 64.138 14 90 14s46.9 21.947 46.9 48.924c0 15.437-5.34 27.02-11.526 40.434-5.522 11.995-19.587 42.166-24.648 53.028l-1.84 3.947c-1.622 3.456-5.1 5.667-8.88 5.667zM90 22.23c-21.323 0-38.67 18.256-38.67 40.693 0 11.217 5.318 22.087 10.01 31.68.89 1.81 1.76 3.596 2.563 5.308 7.04 15.098 21.717 49.91 24.59 56.736.31.733.862 1.11 1.473 1.122l.04 4.116v-4.116c.604 0 1.158-.354 1.412-.897.02-.04.708-1.513 1.847-3.962 5.062-10.854 19.115-41.007 24.635-52.99 5.78-12.54 10.77-23.366 10.77-36.994 0-22.438-17.347-40.693-38.67-40.693z"/><g><path d="M73.757 37.493h15.4c7.017 0 12.112.997 15.28 2.993 3.172 2 4.758 5.174 4.758 9.528 0 2.955-.696 5.38-2.084 7.277-1.388 1.896-3.23 3.034-5.53 3.417v.34c3.136.7 5.397 2.008 6.785 3.926 1.388 1.92 2.08 4.467 2.08 7.65 0 4.512-1.63 8.03-4.89 10.557-3.263 2.53-7.688 3.792-13.283 3.792H73.757v-49.48zM84.25 57.088h6.093c2.84 0 4.903-.44 6.174-1.32 1.275-.88 1.913-2.334 1.913-4.365 0-1.895-.69-3.256-2.08-4.078-1.388-.822-3.584-1.235-6.585-1.235H84.25v10.998zm0 8.325v12.894h6.838c2.89 0 5.02-.552 6.394-1.655 1.377-1.107 2.068-2.798 2.068-5.078 0-4.107-2.937-6.16-8.8-6.16h-6.5z"/></g></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-bus"><path d="M140.142 47.383h-1.397v-9c0-6.6-5.547-10.615-12-12-9.316-2-21.384-4-36.942-4-16.212 0-26.624 1.75-36.545 4-6.436 1.46-12 5.4-12 12v9H39.86c-3.3 0-6 2.7-6 6v8c0 3.3 2.7 6 6 6h1.398v52.344c0 5.882 4.293 10.008 9.898 10.837v10.132c0 3.3 2.7 6 6 6h2.796c3.3 0 6-2.7 6-6v-9.97h48.056v9.97c0 3.3 2.7 6 6 6h2.796c3.3 0 6-2.7 6-6V130.57c5.626-.815 9.94-4.946 9.94-10.843V67.383h1.398c3.3 0 6-2.7 6-6v-8c0-3.3-2.7-6-6-6zM74.61 35.557a2 2 0 0 1 2-2h27.194a2 2 0 0 1 2 2V37.1a2 2 0 0 1-2 2H76.61a2 2 0 0 1-2-2v-1.543zm-13.846 84.68c-4.88-.115-8.53-4.016-8.463-8.986.077-4.667 4.034-8.426 8.823-8.353 4.793.076 8.678 4.023 8.596 8.76-.097 4.85-4.09 8.673-8.956 8.58zm-7.33-24.925a2 2 0 0 1-2-2v-43.54a2 2 0 0 1 2-2h72.646a2 2 0 0 1 2 2v43.54a2 2 0 0 1-2 2H53.434zm56.447 16.372c-.015-5.02 3.78-8.817 8.757-8.79 4.764 0 8.562 3.842 8.578 8.59.006 4.962-3.773 8.73-8.723 8.74-4.775.01-8.6-3.783-8.61-8.54z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-cable_car"><path d="M98.15 27.188l-1.89-3.466c-.617-1.133-2.006-2.06-3.086-2.06h-6.35c-1.08 0-2.47.927-3.086 2.06l-1.89 3.466h16.3zM125.045 29.933h-70.09v4.977h3.81v9.75h62.47v-9.75h3.81v-4.977zm-22.447 9.19a2 2 0 0 1-2 2H79.402a2 2 0 0 1-2-2V37.58a2 2 0 0 1 2-2h21.195a2 2 0 0 1 2 2v1.543zM143.353 134.92a2.5 2.5 0 0 1-2.487-2.5V71.66a2.5 2.5 0 0 1 2.488-2.5 2.5 2.5 0 0 1 2.487 2.5v60.76a2.5 2.5 0 0 1-2.487 2.5zM36.768 134.92a2.5 2.5 0 0 1-2.487-2.5V71.66a2.5 2.5 0 0 1 2.488-2.5 2.5 2.5 0 0 1 2.488 2.5v60.76a2.5 2.5 0 0 1-2.488 2.5zM136.744 147.86v-7.393H43.256v7.392h-11.05v4.976h14.05v-4.977H62.36c-3.543 3.598-7.224 7-10.832 10.487-1.02.986-2.073 1.937-3.057 2.972-.606.642-1.334 1.6-1.058 2.728.13.543.436.988.747 1.37.555.68.96.578 1.692.578h80.295c.733 0 1.138.102 1.694-.578.313-.382.616-.827.747-1.37.276-1.13-.45-2.086-1.06-2.73-.982-1.034-2.035-1.984-3.056-2.97-3.607-3.49-7.288-6.89-10.83-10.49h16.103v4.978h14.05v-4.977h-11.05zM136.744 46.946H43.256v61.488h93.488V46.946zM73.14 102.613H48.27V63.07c0-1.103 1.24-2.304 2.24-3 4.504-3.127 10.364-3.992 15.588-2.323 1.557.497 3.168 1.187 4.57 2.028 1.373.824 2.473 1.88 2.473 3.296v39.543zm29.296 0H77.564V63.07c0-1.103 1.24-2.304 2.24-3 4.504-3.127 10.364-3.992 15.588-2.323 1.557.497 3.168 1.187 4.57 2.028 1.373.824 2.473 1.88 2.473 3.296v39.543zm29.294 0h-24.87V63.07c0-1.103 1.238-2.304 2.24-3 4.503-3.127 10.363-3.992 15.587-2.323 1.557.497 3.168 1.187 4.57 2.028 1.373.824 2.473 1.88 2.473 3.296v39.543zM136.744 112.435H43.256v24.033h93.488v-24.033zm-46.97 19.88c-4.467-.105-7.805-3.674-7.744-8.224.07-4.27 3.69-7.71 8.072-7.643 4.388.067 7.943 3.68 7.867 8.016-.086 4.44-3.743 7.937-8.195 7.853z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-ferry"><path fill-rule="evenodd" clip-rule="evenodd" d="M90.72 156.76c-2.81 5.415-7.57 8.033-13.646 8.12-6.367.1-11.348-2.518-14.336-8.19-1.46 3.504-4.277 5.65-7.785 7.067-4.225 1.672-8.533 1.643-12.732.03-4.91-1.88-6.923-5.677-7.274-10.4-.05-.652 0-1.33 0-2.173 2.8 3.773 6.973 4.596 11.24 5.067 3.285.37 6.594.132 9.77-.783 2.773-.815 5.348-1.904 6.836-4.597 1.475 2.65 3.984 3.812 6.717 4.545 5.052 1.37 10.14 1.323 15.165-.192 2.883-.876 4.385-1.97 6.05-4.273 2.01 3.29 5.44 4.355 9.04 4.992 4.596.815 9.168.594 13.592-.984 2.174-.775 4.08-1.883 5.238-4.038 2.676 4.02 7.033 4.895 11.49 5.332 4.48.422 8.934.012 12.965-2.104 1.27-.67 2.307-1.72 3.318-2.504.74 5.454-2.273 10.433-7.307 12.18-5.503 1.895-10.747 1.41-15.634-1.678-2.217-1.425-3.105-2.47-4.746-5.398-2.848 5.445-7.73 8.09-13.95 8.112-6.238.012-11.148-2.598-14.01-8.13zM147.232 99.956l-10.366-5.14-4.88-24.052a5.507 5.507 0 0 0-3.345-4.012l-8.42-3.375-2.11-17.59a5.5 5.5 0 0 0-4.302-4.785l-7.92-1.72V27.77a5.5 5.5 0 0 0-5.5-5.5H79.4a5.5 5.5 0 0 0-5.5 5.5v11.51L65.98 41a5.503 5.503 0 0 0-4.3 4.785l-2.113 17.59-8.42 3.375a5.5 5.5 0 0 0-3.345 4.012l-4.888 24.093L32.74 99.97a5.5 5.5 0 0 0-2.758 6.62L40.69 135.4a5.5 5.5 0 0 0 .836 1.605c2.725 3.613 5.974 7.164 13.015 7.456.166.007.34.01.524.01 1.098 0 3.197-.147 5.558-1.075 3.426 2.967 8.404 4.633 14.256 4.633 4.634 0 10.594-1.183 15.123-4.245 4.53 3.062 10.49 4.245 15.123 4.245 5.852 0 10.83-1.667 14.256-4.634a15.47 15.47 0 0 0 5.556 1.077c.185 0 .36-.003.532-.01 7.036-.29 10.284-3.843 13.007-7.457a5.503 5.503 0 0 0 .836-1.604l10.708-28.81a5.5 5.5 0 0 0-2.786-6.634zM92.072 72.61a5.494 5.494 0 0 0-4.913.013L55.413 88.576l2.58-12.717 8.733-3.5a5.502 5.502 0 0 0 3.423-4.517l2.04-16.934 8.378-1.82a5.475 5.475 0 0 0 1.857-.793h14.938a5.492 5.492 0 0 0 1.857.793l8.376 1.82 2.04 16.932a5.505 5.505 0 0 0 3.423 4.517l8.735 3.5 2.59 12.77-32.313-16.02z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-funicular"><path d="M148.61 30.292c-.952-.57-2.376-.8-3.41-.526-8.724 2.298-14.11 3.773-19.816 5.335a2518.11 2518.11 0 0 1-15.84 4.298c-25.034 6.7-50.066 13.398-75.098 20.1l-1.374.364c-1.66.44-3.378.894-5.057 1.404-1.658.504-2.542 1.854-2.305 3.52.238 1.68 1.454 2.677 3.337 2.74l.117.004.436-.083c.33-.06.728-.132 1.116-.236 10.823-2.887 21.646-5.778 32.466-8.676 14.212-3.806 25.77-6.938 37.326-10.07s23.112-6.266 37.322-10.07c.934-.25 1.87-.492 2.805-.733 2.156-.556 4.386-1.13 6.56-1.805 1-.312 2.033-1.296 2.46-2.34.4-.978-.157-2.695-1.044-3.223z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M96.38 53.017c.467 2.48 1.1 5.866 1.53 8.188 1.01 5.5 2.03 10.997 2.998 16.505.157.894.51 1.248 1.415 1.19.93-.065 1.87-.048 2.804-.013 1.49.058 2.132.73 2.195 2.232.155 3.67.155 3.658-3.533 3.653-7.44-.008-14.876-.022-22.312.02-1.13.006-1.688-.237-1.512-1.48.094-.668.01-1.358.02-2.04.03-1.665.626-2.296 2.308-2.38.89-.043 1.787-.066 2.676-.007.86.06 1.207-.32 1.35-1.124 1.1-6.128 2.338-12.236 3.274-18.392.51-3.34 4.025-4.63 6.785-6.353zM84.147 36.342c-.047 3.142-2.37 5.372-5.563 5.342-3.005-.026-5.583-2.623-5.503-5.538.092-3.23 2.62-5.555 5.987-5.497 2.896.047 5.128 2.55 5.08 5.692zM117.68 27.324c.01 2.896-2.526 5.436-5.424 5.427-3.18-.008-5.648-2.404-5.663-5.498-.017-3.057 2.528-5.6 5.587-5.586 3.108.016 5.488 2.462 5.5 5.658zM61.764 46.103c-3.023-.078-5.52-2.646-5.43-5.587.085-2.924 2.77-5.533 5.655-5.5 2.99.033 5.61 2.75 5.518 5.72-.1 3.187-2.52 5.45-5.744 5.367zM100.9 31.802c.024 2.922-2.484 5.48-5.374 5.48-2.984 0-5.654-2.534-5.69-5.405-.04-3.125 2.462-5.707 5.614-5.796 2.953-.082 5.427 2.515 5.45 5.722zM146.07 131.44c-1.99-11.46-4.005-22.912-6.123-34.348-1.12-6.054-4.935-9.09-11.03-9.09-23.456.004-46.914.004-70.37.016-6.498.002-10.3 3.195-11.446 9.6-1.94 10.847-3.84 21.7-5.82 32.54-.377 2.067-.278 4.023.32 6.026 1.15 3.86 2.162 7.764 3.303 11.626 1.082 3.666 2.03 7.394 3.443 10.93 1.912 4.792 5.392 7.312 10.896 7.215 11.493-.205 22.993-.062 34.492-.062v.016c3.985 0 7.97 0 11.955-.002 7.82-.005 15.637-.044 23.455-.004 3.46.018 6.182-1.354 8.026-4.208 1.096-1.695 2.12-3.535 2.7-5.453 2.13-7.078 4.095-14.208 6.038-21.343a8.25 8.25 0 0 0 .16-3.46zm-74.393-2.464c-.003 2.948-1.038 4.136-3.602 4.14a4486.2 4486.2 0 0 1-13.227-.004c-2.542-.004-3.552-1.348-3.073-4.175 1.605-9.54 3.23-19.076 4.867-28.61.438-2.556 1.198-3.242 3.463-3.25 2.798-.01 5.597-.01 8.395 0 2.282.01 3.174 1.01 3.177 3.57.008 4.722.004 9.443.004 14.165 0 4.72.006 9.44-.003 14.164zm18.155 23.977c0 2.65-.96 3.928-2.968 3.968-1.48.03-2.962.025-4.44.003-1.998-.03-2.906-1.212-2.91-3.84-.012-8.77-.004-17.54-.004-26.312-.002-8.722-.006-17.444 0-26.166.002-2.554.725-3.508 2.662-3.526 1.702-.017 3.405-.024 5.107.003 1.775.03 2.552 1.064 2.552 3.395.005 17.49.006 34.984 0 52.478zm17.536-.232c0 2.982-.854 4.176-2.98 4.205-1.185.016-2.372-.013-3.558 0-2.082.02-2.92-1.13-2.92-4.07-.006-8.722-.004-17.442-.004-26.16 0-8.722-.002-17.443.003-26.164 0-2.452.674-3.43 2.383-3.45 1.56-.02 3.12-.026 4.68 0 1.686.03 2.395 1.063 2.396 3.465a181489 181489 0 0 1-.002 52.176zm25.08-19.618c-4.905.042-9.81.032-14.717.005-2.05-.013-3.124-1.307-3.138-3.764-.024-4.864-.007-9.73-.007-14.597 0-4.72-.007-9.442.003-14.162.004-2.58.848-3.498 3.214-3.507 3.03-.014 6.065-.015 9.098.002 1.97.01 2.902.74 3.29 2.834 1.453 7.827 2.845 15.665 4.263 23.498.342 1.888.705 3.77 1.04 5.66.445 2.543-.623 4.01-3.044 4.03z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-gondola"><path d="M148.61 30.292c-.952-.57-2.376-.8-3.41-.526-8.724 2.298-14.11 3.773-19.816 5.335a2518.11 2518.11 0 0 1-15.84 4.298c-25.034 6.7-50.066 13.398-75.098 20.1l-1.374.364c-1.66.44-3.378.894-5.057 1.404-1.658.504-2.542 1.854-2.305 3.52.238 1.68 1.454 2.677 3.337 2.74l.117.004.436-.083c.33-.06.728-.132 1.116-.236 10.823-2.887 21.646-5.778 32.466-8.676 14.212-3.806 25.77-6.938 37.326-10.07s23.112-6.266 37.322-10.07c.934-.25 1.87-.492 2.805-.733 2.156-.556 4.386-1.13 6.56-1.805 1-.312 2.033-1.296 2.46-2.34.4-.978-.157-2.695-1.044-3.223z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M96.38 53.017c.467 2.48 1.1 5.866 1.53 8.188 1.01 5.5 2.03 10.997 2.998 16.505.157.894.51 1.248 1.415 1.19.93-.065 1.87-.048 2.804-.013 1.49.058 2.132.73 2.195 2.232.155 3.67.155 3.658-3.533 3.653-7.44-.008-14.876-.022-22.312.02-1.13.006-1.688-.237-1.512-1.48.094-.668.01-1.358.02-2.04.03-1.665.626-2.296 2.308-2.38.89-.043 1.787-.066 2.676-.007.86.06 1.207-.32 1.35-1.124 1.1-6.128 2.338-12.236 3.274-18.392.51-3.34 4.025-4.63 6.785-6.353zM84.147 36.342c-.047 3.142-2.37 5.372-5.563 5.342-3.005-.026-5.583-2.623-5.503-5.538.092-3.23 2.62-5.555 5.987-5.497 2.896.047 5.128 2.55 5.08 5.692zM117.68 27.324c.01 2.896-2.526 5.436-5.424 5.427-3.18-.008-5.648-2.404-5.663-5.498-.017-3.057 2.528-5.6 5.587-5.586 3.108.016 5.488 2.462 5.5 5.658zM61.764 46.103c-3.023-.078-5.52-2.646-5.43-5.587.085-2.924 2.77-5.533 5.655-5.5 2.99.033 5.61 2.75 5.518 5.72-.1 3.187-2.52 5.45-5.744 5.367zM100.9 31.802c.024 2.922-2.484 5.48-5.374 5.48-2.984 0-5.654-2.534-5.69-5.405-.04-3.125 2.462-5.707 5.614-5.796 2.953-.082 5.427 2.515 5.45 5.722zM146.07 131.44c-1.99-11.46-4.005-22.912-6.123-34.348-1.12-6.054-4.935-9.09-11.03-9.09-23.456.004-46.914.004-70.37.016-6.498.002-10.3 3.195-11.446 9.6-1.94 10.847-3.84 21.7-5.82 32.54-.377 2.067-.278 4.023.32 6.026 1.15 3.86 2.162 7.764 3.303 11.626 1.082 3.666 2.03 7.394 3.443 10.93 1.912 4.792 5.392 7.312 10.896 7.215 11.493-.205 22.993-.062 34.492-.062v.016c3.985 0 7.97 0 11.955-.002 7.82-.005 15.637-.044 23.455-.004 3.46.018 6.182-1.354 8.026-4.208 1.096-1.695 2.12-3.535 2.7-5.453 2.13-7.078 4.095-14.208 6.038-21.343a8.25 8.25 0 0 0 .16-3.46zm-74.393-2.464c-.003 2.948-1.038 4.136-3.602 4.14a4486.2 4486.2 0 0 1-13.227-.004c-2.542-.004-3.552-1.348-3.073-4.175 1.605-9.54 3.23-19.076 4.867-28.61.438-2.556 1.198-3.242 3.463-3.25 2.798-.01 5.597-.01 8.395 0 2.282.01 3.174 1.01 3.177 3.57.008 4.722.004 9.443.004 14.165 0 4.72.006 9.44-.003 14.164zm18.155 23.977c0 2.65-.96 3.928-2.968 3.968-1.48.03-2.962.025-4.44.003-1.998-.03-2.906-1.212-2.91-3.84-.012-8.77-.004-17.54-.004-26.312-.002-8.722-.006-17.444 0-26.166.002-2.554.725-3.508 2.662-3.526 1.702-.017 3.405-.024 5.107.003 1.775.03 2.552 1.064 2.552 3.395.005 17.49.006 34.984 0 52.478zm17.536-.232c0 2.982-.854 4.176-2.98 4.205-1.185.016-2.372-.013-3.558 0-2.082.02-2.92-1.13-2.92-4.07-.006-8.722-.004-17.442-.004-26.16 0-8.722-.002-17.443.003-26.164 0-2.452.674-3.43 2.383-3.45 1.56-.02 3.12-.026 4.68 0 1.686.03 2.395 1.063 2.396 3.465a181489 181489 0 0 1-.002 52.176zm25.08-19.618c-4.905.042-9.81.032-14.717.005-2.05-.013-3.124-1.307-3.138-3.764-.024-4.864-.007-9.73-.007-14.597 0-4.72-.007-9.442.003-14.162.004-2.58.848-3.498 3.214-3.507 3.03-.014 6.065-.015 9.098.002 1.97.01 2.902.74 3.29 2.834 1.453 7.827 2.845 15.665 4.263 23.498.342 1.888.705 3.77 1.04 5.66.445 2.543-.623 4.01-3.044 4.03z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-metro"><path d="M145.163 161.32c-1.307-1.036-2.705-1.986-4.062-2.973-5.016-3.65-10.143-7.2-15.05-10.99 5.99-.655 10.693-5.766 10.693-11.924v-75.75c0-6.6-5.4-12-12-12H55.257c-6.6 0-12 5.4-12 12v75.75c0 6.158 4.703 11.27 10.694 11.925-4.907 3.788-10.034 7.338-15.05 10.99-1.357.985-2.756 1.936-4.063 2.97-.806.644-1.772 1.6-1.405 2.73.173.543.578.988.99 1.37.74.68 1.277.578 2.25.578h106.654c.974 0 1.51.102 2.25-.578.413-.382.818-.827.99-1.37.37-1.13-.597-2.086-1.403-2.73zm-84.136-25.78c-4.88-.117-8.53-4.018-8.464-8.988.077-4.668 4.033-8.427 8.822-8.354 4.794.076 8.68 4.023 8.597 8.76-.095 4.85-4.09 8.673-8.955 8.58zm24.875-27.927a2 2 0 0 1-2 2H52.696a2 2 0 0 1-2-2V74.07a2 2 0 0 1 2-2h31.206a2 2 0 0 1 2 2v33.543zm8.246 0V74.07a2 2 0 0 1 2-2h31.195a2 2 0 0 1 2 2v33.543a2 2 0 0 1-2 2H96.148a2 2 0 0 1-2-2zM76.608 60.4v-1.543a2 2 0 0 1 2-2h23.196a2 2 0 0 1 2 2V60.4a2 2 0 0 1-2 2H78.61a2 2 0 0 1-2-2zm42.147 75.125c-4.775.01-8.6-3.783-8.61-8.54-.016-5.022 3.78-8.818 8.756-8.792 4.765 0 8.563 3.843 8.58 8.59.003 4.963-3.775 8.73-8.725 8.742z"/><path d="M160.062 165.996h-8v-88.01c0-27.02-21.98-49-49-49H76.938c-27.02 0-49 21.98-49 49v88.01h-8v-88.01c0-31.43 25.57-57 57-57h26.125c31.43 0 57 25.57 57 57v88.01z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-rail"><path d="M147.162 161.32c-1.307-1.036-2.705-1.986-4.06-2.973-5.02-3.65-10.146-7.2-15.052-10.99 5.99-.655 10.693-5.766 10.693-11.924v-90.75c0-6.6-5.4-12-12-12h-15.98l-4.812-6.9c-1.573-2.254-5.11-4.1-7.86-4.1H81.908c-2.75 0-6.287 1.846-7.86 4.1l-4.813 6.9h-15.98c-6.6 0-12 5.4-12 12v90.75c0 6.158 4.704 11.27 10.696 11.925-4.907 3.788-10.034 7.338-15.052 10.99-1.355.985-2.754 1.936-4.06 2.97-.808.644-1.774 1.6-1.407 2.73.175.543.58.988.993 1.37.738.68 1.275.578 2.25.578h110.652c.975 0 1.512.102 2.25-.578.414-.382.818-.827.992-1.37.37-1.13-.598-2.086-1.405-2.73zm-86.398-25.78c-4.88-.117-8.53-4.018-8.463-8.988.077-4.668 4.034-8.427 8.823-8.354 4.793.076 8.678 4.023 8.596 8.76-.097 4.85-4.09 8.673-8.956 8.58zm24.875-29.927a2 2 0 0 1-2 2H50.433a2 2 0 0 1-2-2V65.07a2 2 0 0 1 2-2H83.64a2 2 0 0 1 2 2v40.543zm-4.57-62.988c.035-4.764 3.982-8.7 8.715-8.714 4.814-.005 8.68 3.94 8.67 8.847-.01 4.716-3.865 8.557-8.604 8.55-4.88 0-8.827-3.9-8.78-8.682zm12.815 62.988V65.07a2 2 0 0 1 2-2h33.195a2 2 0 0 1 2 2v40.543a2 2 0 0 1-2 2H95.885a2 2 0 0 1-2-2zm24.607 29.912c-4.775.01-8.6-3.783-8.61-8.54-.017-5.022 3.778-8.818 8.755-8.792 4.764 0 8.562 3.843 8.578 8.59.006 4.963-3.774 8.73-8.723 8.742z"/></symbol><symbol viewBox="0 0 180 180" id="icon-transit-type-tram"><path d="M147.162 161.32c-1.307-1.036-2.705-1.986-4.06-2.973-5.02-3.65-10.146-7.2-15.052-10.99 5.99-.655 10.693-5.766 10.693-11.924v-74.75c0-6.6-5.4-12-12-12h-25.155l8.622-17.934c.137-.237.195-.496.195-.75h4.7c.282.025.866.367 1.013.577l3.77 6.693a3.998 3.998 0 0 0 5.45 1.522 4 4 0 0 0 1.52-5.448l-3.77-6.693c-1.518-2.694-4.863-4.65-7.957-4.65H64.866c-3.092 0-6.44 1.956-7.957 4.65l-3.77 6.694a4 4 0 0 0 6.97 3.926l3.756-6.672c.162-.23.746-.573 1-.6h4.73c0 .256.058.514.194.75l8.622 17.934H53.256c-6.6 0-12 5.4-12 12v74.75c0 6.158 4.703 11.27 10.695 11.925-4.907 3.788-10.034 7.338-15.052 10.99-1.355.985-2.754 1.936-4.06 2.97-.808.644-1.774 1.6-1.407 2.73.175.543.58.988.993 1.37.738.68 1.275.578 2.25.578h110.652c.975 0 1.512.102 2.25-.578.414-.382.818-.827.992-1.37.37-1.128-.598-2.085-1.405-2.728zm-58.8-112.636C88.36 48.43 78.545 30 78.545 30h22.908s-9.817 18.43-9.817 18.684H88.36zM60.763 135.54c-4.88-.117-8.53-4.018-8.463-8.988.077-4.668 4.034-8.427 8.823-8.354 4.793.076 8.678 4.023 8.596 8.76-.097 4.85-4.09 8.673-8.956 8.58zm57.728-.015c-4.775.01-8.6-3.783-8.61-8.54-.017-5.022 3.778-8.818 8.755-8.792 4.764 0 8.562 3.843 8.578 8.59.006 4.963-3.774 8.73-8.723 8.742zm7.588-27.912H53.434a2 2 0 0 1-2-2V66.07a2 2 0 0 1 2-2h72.646a2 2 0 0 1 2 2v39.543a2 2 0 0 1-2 2z"/></symbol></svg>
</div> | rdzur/api-workshop | 07-display-turn-by-turn/svg.html | HTML | mit | 39,997 |
@charset "UTF-8";
/*
Animate.css - http://daneden.me/animate
Licensed under the MIT license
Copyright (c) 2013 Daniel Eden
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.
*/
body { /* Addresses a small issue in webkit: http://bit.ly/NEdoDq */
-webkit-backface-visibility: hidden;
}
.animated {
-webkit-animation-duration: 1s;
-moz-animation-duration: 1s;
-o-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-o-animation-fill-mode: both;
animation-fill-mode: both;
}
.animated.hinge {
-webkit-animation-duration: 2s;
-moz-animation-duration: 2s;
-o-animation-duration: 2s;
animation-duration: 2s;
}
@-webkit-keyframes flash {
0%, 50%, 100% {opacity: 1;}
25%, 75% {opacity: 0;}
}
@-moz-keyframes flash {
0%, 50%, 100% {opacity: 1;}
25%, 75% {opacity: 0;}
}
@-o-keyframes flash {
0%, 50%, 100% {opacity: 1;}
25%, 75% {opacity: 0;}
}
@keyframes flash {
0%, 50%, 100% {opacity: 1;}
25%, 75% {opacity: 0;}
}
.animated.flash {
-webkit-animation-name: flash;
-moz-animation-name: flash;
-o-animation-name: flash;
animation-name: flash;
}
@-webkit-keyframes shake {
0%, 100% {-webkit-transform: translateX(0);}
10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
}
@-moz-keyframes shake {
0%, 100% {-moz-transform: translateX(0);}
10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
}
@-o-keyframes shake {
0%, 100% {-o-transform: translateX(0);}
10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
}
@keyframes shake {
0%, 100% {transform: translateX(0);}
10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
20%, 40%, 60%, 80% {transform: translateX(10px);}
}
.animated.shake {
-webkit-animation-name: shake;
-moz-animation-name: shake;
-o-animation-name: shake;
animation-name: shake;
}
@-webkit-keyframes bounce {
0%, 20%, 50%, 80%, 100% {-webkit-transform: translateY(0);}
40% {-webkit-transform: translateY(-30px);}
60% {-webkit-transform: translateY(-15px);}
}
@-moz-keyframes bounce {
0%, 20%, 50%, 80%, 100% {-moz-transform: translateY(0);}
40% {-moz-transform: translateY(-30px);}
60% {-moz-transform: translateY(-15px);}
}
@-o-keyframes bounce {
0%, 20%, 50%, 80%, 100% {-o-transform: translateY(0);}
40% {-o-transform: translateY(-30px);}
60% {-o-transform: translateY(-15px);}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
40% {transform: translateY(-30px);}
60% {transform: translateY(-15px);}
}
.animated.bounce {
-webkit-animation-name: bounce;
-moz-animation-name: bounce;
-o-animation-name: bounce;
animation-name: bounce;
}
@-webkit-keyframes tada {
0% {-webkit-transform: scale(1);}
10%, 20% {-webkit-transform: scale(0.9) rotate(-3deg);}
30%, 50%, 70%, 90% {-webkit-transform: scale(1.1) rotate(3deg);}
40%, 60%, 80% {-webkit-transform: scale(1.1) rotate(-3deg);}
100% {-webkit-transform: scale(1) rotate(0);}
}
@-moz-keyframes tada {
0% {-moz-transform: scale(1);}
10%, 20% {-moz-transform: scale(0.9) rotate(-3deg);}
30%, 50%, 70%, 90% {-moz-transform: scale(1.1) rotate(3deg);}
40%, 60%, 80% {-moz-transform: scale(1.1) rotate(-3deg);}
100% {-moz-transform: scale(1) rotate(0);}
}
@-o-keyframes tada {
0% {-o-transform: scale(1);}
10%, 20% {-o-transform: scale(0.9) rotate(-3deg);}
30%, 50%, 70%, 90% {-o-transform: scale(1.1) rotate(3deg);}
40%, 60%, 80% {-o-transform: scale(1.1) rotate(-3deg);}
100% {-o-transform: scale(1) rotate(0);}
}
@keyframes tada {
0% {transform: scale(1);}
10%, 20% {transform: scale(0.9) rotate(-3deg);}
30%, 50%, 70%, 90% {transform: scale(1.1) rotate(3deg);}
40%, 60%, 80% {transform: scale(1.1) rotate(-3deg);}
100% {transform: scale(1) rotate(0);}
}
.animated.tada {
-webkit-animation-name: tada;
-moz-animation-name: tada;
-o-animation-name: tada;
animation-name: tada;
}
@-webkit-keyframes swing {
20%, 40%, 60%, 80%, 100% { -webkit-transform-origin: top center; }
20% { -webkit-transform: rotate(15deg); }
40% { -webkit-transform: rotate(-10deg); }
60% { -webkit-transform: rotate(5deg); }
80% { -webkit-transform: rotate(-5deg); }
100% { -webkit-transform: rotate(0deg); }
}
@-moz-keyframes swing {
20% { -moz-transform: rotate(15deg); }
40% { -moz-transform: rotate(-10deg); }
60% { -moz-transform: rotate(5deg); }
80% { -moz-transform: rotate(-5deg); }
100% { -moz-transform: rotate(0deg); }
}
@-o-keyframes swing {
20% { -o-transform: rotate(15deg); }
40% { -o-transform: rotate(-10deg); }
60% { -o-transform: rotate(5deg); }
80% { -o-transform: rotate(-5deg); }
100% { -o-transform: rotate(0deg); }
}
@keyframes swing {
20% { transform: rotate(15deg); }
40% { transform: rotate(-10deg); }
60% { transform: rotate(5deg); }
80% { transform: rotate(-5deg); }
100% { transform: rotate(0deg); }
}
.animated.swing {
-webkit-transform-origin: top center;
-moz-transform-origin: top center;
-o-transform-origin: top center;
transform-origin: top center;
-webkit-animation-name: swing;
-moz-animation-name: swing;
-o-animation-name: swing;
animation-name: swing;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes wobble {
0% { -webkit-transform: translateX(0%); }
15% { -webkit-transform: translateX(-25%) rotate(-5deg); }
30% { -webkit-transform: translateX(20%) rotate(3deg); }
45% { -webkit-transform: translateX(-15%) rotate(-3deg); }
60% { -webkit-transform: translateX(10%) rotate(2deg); }
75% { -webkit-transform: translateX(-5%) rotate(-1deg); }
100% { -webkit-transform: translateX(0%); }
}
@-moz-keyframes wobble {
0% { -moz-transform: translateX(0%); }
15% { -moz-transform: translateX(-25%) rotate(-5deg); }
30% { -moz-transform: translateX(20%) rotate(3deg); }
45% { -moz-transform: translateX(-15%) rotate(-3deg); }
60% { -moz-transform: translateX(10%) rotate(2deg); }
75% { -moz-transform: translateX(-5%) rotate(-1deg); }
100% { -moz-transform: translateX(0%); }
}
@-o-keyframes wobble {
0% { -o-transform: translateX(0%); }
15% { -o-transform: translateX(-25%) rotate(-5deg); }
30% { -o-transform: translateX(20%) rotate(3deg); }
45% { -o-transform: translateX(-15%) rotate(-3deg); }
60% { -o-transform: translateX(10%) rotate(2deg); }
75% { -o-transform: translateX(-5%) rotate(-1deg); }
100% { -o-transform: translateX(0%); }
}
@keyframes wobble {
0% { transform: translateX(0%); }
15% { transform: translateX(-25%) rotate(-5deg); }
30% { transform: translateX(20%) rotate(3deg); }
45% { transform: translateX(-15%) rotate(-3deg); }
60% { transform: translateX(10%) rotate(2deg); }
75% { transform: translateX(-5%) rotate(-1deg); }
100% { transform: translateX(0%); }
}
.animated.wobble {
-webkit-animation-name: wobble;
-moz-animation-name: wobble;
-o-animation-name: wobble;
animation-name: wobble;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes pulse {
0% { -webkit-transform: scale(1); }
50% { -webkit-transform: scale(1.1); }
100% { -webkit-transform: scale(1); }
}
@-moz-keyframes pulse {
0% { -moz-transform: scale(1); }
50% { -moz-transform: scale(1.1); }
100% { -moz-transform: scale(1); }
}
@-o-keyframes pulse {
0% { -o-transform: scale(1); }
50% { -o-transform: scale(1.1); }
100% { -o-transform: scale(1); }
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
.animated.pulse {
-webkit-animation-name: pulse;
-moz-animation-name: pulse;
-o-animation-name: pulse;
animation-name: pulse;
}
@-webkit-keyframes flip {
0% {
-webkit-transform: perspective(400px) rotateY(0);
-webkit-animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg);
-webkit-animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
-webkit-animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) rotateY(360deg) scale(.95);
-webkit-animation-timing-function: ease-in;
}
100% {
-webkit-transform: perspective(400px) scale(1);
-webkit-animation-timing-function: ease-in;
}
}
@-moz-keyframes flip {
0% {
-moz-transform: perspective(400px) rotateY(0);
-moz-animation-timing-function: ease-out;
}
40% {
-moz-transform: perspective(400px) translateZ(150px) rotateY(170deg);
-moz-animation-timing-function: ease-out;
}
50% {
-moz-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
-moz-animation-timing-function: ease-in;
}
80% {
-moz-transform: perspective(400px) rotateY(360deg) scale(.95);
-moz-animation-timing-function: ease-in;
}
100% {
-moz-transform: perspective(400px) scale(1);
-moz-animation-timing-function: ease-in;
}
}
@-o-keyframes flip {
0% {
-o-transform: perspective(400px) rotateY(0);
-o-animation-timing-function: ease-out;
}
40% {
-o-transform: perspective(400px) translateZ(150px) rotateY(170deg);
-o-animation-timing-function: ease-out;
}
50% {
-o-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
-o-animation-timing-function: ease-in;
}
80% {
-o-transform: perspective(400px) rotateY(360deg) scale(.95);
-o-animation-timing-function: ease-in;
}
100% {
-o-transform: perspective(400px) scale(1);
-o-animation-timing-function: ease-in;
}
}
@keyframes flip {
0% {
transform: perspective(400px) rotateY(0);
animation-timing-function: ease-out;
}
40% {
transform: perspective(400px) translateZ(150px) rotateY(170deg);
animation-timing-function: ease-out;
}
50% {
transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
animation-timing-function: ease-in;
}
80% {
transform: perspective(400px) rotateY(360deg) scale(.95);
animation-timing-function: ease-in;
}
100% {
transform: perspective(400px) scale(1);
animation-timing-function: ease-in;
}
}
.animated.flip {
-webkit-backface-visibility: visible !important;
-webkit-animation-name: flip;
-moz-backface-visibility: visible !important;
-moz-animation-name: flip;
-o-backface-visibility: visible !important;
-o-animation-name: flip;
backface-visibility: visible !important;
animation-name: flip;
}
@-webkit-keyframes flipInX {
0% {
-webkit-transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotateX(-10deg);
}
70% {
-webkit-transform: perspective(400px) rotateX(10deg);
}
100% {
-webkit-transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
}
@-moz-keyframes flipInX {
0% {
-moz-transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
40% {
-moz-transform: perspective(400px) rotateX(-10deg);
}
70% {
-moz-transform: perspective(400px) rotateX(10deg);
}
100% {
-moz-transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
}
@-o-keyframes flipInX {
0% {
-o-transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
40% {
-o-transform: perspective(400px) rotateX(-10deg);
}
70% {
-o-transform: perspective(400px) rotateX(10deg);
}
100% {
-o-transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
}
@keyframes flipInX {
0% {
transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
40% {
transform: perspective(400px) rotateX(-10deg);
}
70% {
transform: perspective(400px) rotateX(10deg);
}
100% {
transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
}
.animated.flipInX {
-webkit-backface-visibility: visible !important;
-webkit-animation-name: flipInX;
-moz-backface-visibility: visible !important;
-moz-animation-name: flipInX;
-o-backface-visibility: visible !important;
-o-animation-name: flipInX;
backface-visibility: visible !important;
animation-name: flipInX;
}
@-webkit-keyframes flipOutX {
0% {
-webkit-transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
}
@-moz-keyframes flipOutX {
0% {
-moz-transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
100% {
-moz-transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
}
@-o-keyframes flipOutX {
0% {
-o-transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
100% {
-o-transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
}
@keyframes flipOutX {
0% {
transform: perspective(400px) rotateX(0deg);
opacity: 1;
}
100% {
transform: perspective(400px) rotateX(90deg);
opacity: 0;
}
}
.animated.flipOutX {
-webkit-animation-name: flipOutX;
-webkit-backface-visibility: visible !important;
-moz-animation-name: flipOutX;
-moz-backface-visibility: visible !important;
-o-animation-name: flipOutX;
-o-backface-visibility: visible !important;
animation-name: flipOutX;
backface-visibility: visible !important;
}
@-webkit-keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotateY(-10deg);
}
70% {
-webkit-transform: perspective(400px) rotateY(10deg);
}
100% {
-webkit-transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
}
@-moz-keyframes flipInY {
0% {
-moz-transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
40% {
-moz-transform: perspective(400px) rotateY(-10deg);
}
70% {
-moz-transform: perspective(400px) rotateY(10deg);
}
100% {
-moz-transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
}
@-o-keyframes flipInY {
0% {
-o-transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
40% {
-o-transform: perspective(400px) rotateY(-10deg);
}
70% {
-o-transform: perspective(400px) rotateY(10deg);
}
100% {
-o-transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
}
@keyframes flipInY {
0% {
transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
40% {
transform: perspective(400px) rotateY(-10deg);
}
70% {
transform: perspective(400px) rotateY(10deg);
}
100% {
transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
}
.animated.flipInY {
-webkit-backface-visibility: visible !important;
-webkit-animation-name: flipInY;
-moz-backface-visibility: visible !important;
-moz-animation-name: flipInY;
-o-backface-visibility: visible !important;
-o-animation-name: flipInY;
backface-visibility: visible !important;
animation-name: flipInY;
}
@-webkit-keyframes flipOutY {
0% {
-webkit-transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
}
@-moz-keyframes flipOutY {
0% {
-moz-transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
100% {
-moz-transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
}
@-o-keyframes flipOutY {
0% {
-o-transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
100% {
-o-transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
}
@keyframes flipOutY {
0% {
transform: perspective(400px) rotateY(0deg);
opacity: 1;
}
100% {
transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
}
.animated.flipOutY {
-webkit-backface-visibility: visible !important;
-webkit-animation-name: flipOutY;
-moz-backface-visibility: visible !important;
-moz-animation-name: flipOutY;
-o-backface-visibility: visible !important;
-o-animation-name: flipOutY;
backface-visibility: visible !important;
animation-name: flipOutY;
}
@-webkit-keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
@-moz-keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
@-o-keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
@keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
.animated.fadeIn {
-webkit-animation-name: fadeIn;
-moz-animation-name: fadeIn;
-o-animation-name: fadeIn;
animation-name: fadeIn;
}
@-webkit-keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(20px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInUp {
0% {
opacity: 0;
-moz-transform: translateY(20px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInUp {
0% {
opacity: 0;
-o-transform: translateY(20px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInUp {
0% {
opacity: 0;
transform: translateY(20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.animated.fadeInUp {
-webkit-animation-name: fadeInUp;
-moz-animation-name: fadeInUp;
-o-animation-name: fadeInUp;
animation-name: fadeInUp;
}
@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-20px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-20px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInDown {
0% {
opacity: 0;
-o-transform: translateY(-20px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.animated.fadeInDown {
-webkit-animation-name: fadeInDown;
-moz-animation-name: fadeInDown;
-o-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@-webkit-keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(-20px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}
@-moz-keyframes fadeInLeft {
0% {
opacity: 0;
-moz-transform: translateX(-20px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}
@-o-keyframes fadeInLeft {
0% {
opacity: 0;
-o-transform: translateX(-20px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}
@keyframes fadeInLeft {
0% {
opacity: 0;
transform: translateX(-20px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
.animated.fadeInLeft {
-webkit-animation-name: fadeInLeft;
-moz-animation-name: fadeInLeft;
-o-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
@-webkit-keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translateX(20px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}
@-moz-keyframes fadeInRight {
0% {
opacity: 0;
-moz-transform: translateX(20px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}
@-o-keyframes fadeInRight {
0% {
opacity: 0;
-o-transform: translateX(20px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}
@keyframes fadeInRight {
0% {
opacity: 0;
transform: translateX(20px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
.animated.fadeInRight {
-webkit-animation-name: fadeInRight;
-moz-animation-name: fadeInRight;
-o-animation-name: fadeInRight;
animation-name: fadeInRight;
}
@-webkit-keyframes fadeInUpBig {
0% {
opacity: 0;
-webkit-transform: translateY(2000px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInUpBig {
0% {
opacity: 0;
-moz-transform: translateY(2000px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInUpBig {
0% {
opacity: 0;
-o-transform: translateY(2000px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInUpBig {
0% {
opacity: 0;
transform: translateY(2000px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.animated.fadeInUpBig {
-webkit-animation-name: fadeInUpBig;
-moz-animation-name: fadeInUpBig;
-o-animation-name: fadeInUpBig;
animation-name: fadeInUpBig;
}
@-webkit-keyframes fadeInDownBig {
0% {
opacity: 0;
-webkit-transform: translateY(-2000px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInDownBig {
0% {
opacity: 0;
-moz-transform: translateY(-2000px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInDownBig {
0% {
opacity: 0;
-o-transform: translateY(-2000px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInDownBig {
0% {
opacity: 0;
transform: translateY(-2000px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.animated.fadeInDownBig {
-webkit-animation-name: fadeInDownBig;
-moz-animation-name: fadeInDownBig;
-o-animation-name: fadeInDownBig;
animation-name: fadeInDownBig;
}
@-webkit-keyframes fadeInLeftBig {
0% {
opacity: 0;
-webkit-transform: translateX(-2000px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}
@-moz-keyframes fadeInLeftBig {
0% {
opacity: 0;
-moz-transform: translateX(-2000px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}
@-o-keyframes fadeInLeftBig {
0% {
opacity: 0;
-o-transform: translateX(-2000px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}
@keyframes fadeInLeftBig {
0% {
opacity: 0;
transform: translateX(-2000px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
.animated.fadeInLeftBig {
-webkit-animation-name: fadeInLeftBig;
-moz-animation-name: fadeInLeftBig;
-o-animation-name: fadeInLeftBig;
animation-name: fadeInLeftBig;
}
@-webkit-keyframes fadeInRightBig {
0% {
opacity: 0;
-webkit-transform: translateX(2000px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}
@-moz-keyframes fadeInRightBig {
0% {
opacity: 0;
-moz-transform: translateX(2000px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}
@-o-keyframes fadeInRightBig {
0% {
opacity: 0;
-o-transform: translateX(2000px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}
@keyframes fadeInRightBig {
0% {
opacity: 0;
transform: translateX(2000px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
.animated.fadeInRightBig {
-webkit-animation-name: fadeInRightBig;
-moz-animation-name: fadeInRightBig;
-o-animation-name: fadeInRightBig;
animation-name: fadeInRightBig;
}
@-webkit-keyframes fadeOut {
0% {opacity: 1;}
100% {opacity: 0;}
}
@-moz-keyframes fadeOut {
0% {opacity: 1;}
100% {opacity: 0;}
}
@-o-keyframes fadeOut {
0% {opacity: 1;}
100% {opacity: 0;}
}
@keyframes fadeOut {
0% {opacity: 1;}
100% {opacity: 0;}
}
.animated.fadeOut {
-webkit-animation-name: fadeOut;
-moz-animation-name: fadeOut;
-o-animation-name: fadeOut;
animation-name: fadeOut;
}
@-webkit-keyframes fadeOutUp {
0% {
opacity: 1;
-webkit-transform: translateY(0);
}
100% {
opacity: 0;
-webkit-transform: translateY(-20px);
}
}
@-moz-keyframes fadeOutUp {
0% {
opacity: 1;
-moz-transform: translateY(0);
}
100% {
opacity: 0;
-moz-transform: translateY(-20px);
}
}
@-o-keyframes fadeOutUp {
0% {
opacity: 1;
-o-transform: translateY(0);
}
100% {
opacity: 0;
-o-transform: translateY(-20px);
}
}
@keyframes fadeOutUp {
0% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(-20px);
}
}
.animated.fadeOutUp {
-webkit-animation-name: fadeOutUp;
-moz-animation-name: fadeOutUp;
-o-animation-name: fadeOutUp;
animation-name: fadeOutUp;
}
@-webkit-keyframes fadeOutDown {
0% {
opacity: 1;
-webkit-transform: translateY(0);
}
100% {
opacity: 0;
-webkit-transform: translateY(20px);
}
}
@-moz-keyframes fadeOutDown {
0% {
opacity: 1;
-moz-transform: translateY(0);
}
100% {
opacity: 0;
-moz-transform: translateY(20px);
}
}
@-o-keyframes fadeOutDown {
0% {
opacity: 1;
-o-transform: translateY(0);
}
100% {
opacity: 0;
-o-transform: translateY(20px);
}
}
@keyframes fadeOutDown {
0% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(20px);
}
}
.animated.fadeOutDown {
-webkit-animation-name: fadeOutDown;
-moz-animation-name: fadeOutDown;
-o-animation-name: fadeOutDown;
animation-name: fadeOutDown;
}
@-webkit-keyframes fadeOutLeft {
0% {
opacity: 1;
-webkit-transform: translateX(0);
}
100% {
opacity: 0;
-webkit-transform: translateX(-20px);
}
}
@-moz-keyframes fadeOutLeft {
0% {
opacity: 1;
-moz-transform: translateX(0);
}
100% {
opacity: 0;
-moz-transform: translateX(-20px);
}
}
@-o-keyframes fadeOutLeft {
0% {
opacity: 1;
-o-transform: translateX(0);
}
100% {
opacity: 0;
-o-transform: translateX(-20px);
}
}
@keyframes fadeOutLeft {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 0;
transform: translateX(-20px);
}
}
.animated.fadeOutLeft {
-webkit-animation-name: fadeOutLeft;
-moz-animation-name: fadeOutLeft;
-o-animation-name: fadeOutLeft;
animation-name: fadeOutLeft;
}
@-webkit-keyframes fadeOutRight {
0% {
opacity: 1;
-webkit-transform: translateX(0);
}
100% {
opacity: 0;
-webkit-transform: translateX(20px);
}
}
@-moz-keyframes fadeOutRight {
0% {
opacity: 1;
-moz-transform: translateX(0);
}
100% {
opacity: 0;
-moz-transform: translateX(20px);
}
}
@-o-keyframes fadeOutRight {
0% {
opacity: 1;
-o-transform: translateX(0);
}
100% {
opacity: 0;
-o-transform: translateX(20px);
}
}
@keyframes fadeOutRight {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 0;
transform: translateX(20px);
}
}
.animated.fadeOutRight {
-webkit-animation-name: fadeOutRight;
-moz-animation-name: fadeOutRight;
-o-animation-name: fadeOutRight;
animation-name: fadeOutRight;
}
@-webkit-keyframes fadeOutUpBig {
0% {
opacity: 1;
-webkit-transform: translateY(0);
}
100% {
opacity: 0;
-webkit-transform: translateY(-2000px);
}
}
@-moz-keyframes fadeOutUpBig {
0% {
opacity: 1;
-moz-transform: translateY(0);
}
100% {
opacity: 0;
-moz-transform: translateY(-2000px);
}
}
@-o-keyframes fadeOutUpBig {
0% {
opacity: 1;
-o-transform: translateY(0);
}
100% {
opacity: 0;
-o-transform: translateY(-2000px);
}
}
@keyframes fadeOutUpBig {
0% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(-2000px);
}
}
.animated.fadeOutUpBig {
-webkit-animation-name: fadeOutUpBig;
-moz-animation-name: fadeOutUpBig;
-o-animation-name: fadeOutUpBig;
animation-name: fadeOutUpBig;
}
@-webkit-keyframes fadeOutDownBig {
0% {
opacity: 1;
-webkit-transform: translateY(0);
}
100% {
opacity: 0;
-webkit-transform: translateY(2000px);
}
}
@-moz-keyframes fadeOutDownBig {
0% {
opacity: 1;
-moz-transform: translateY(0);
}
100% {
opacity: 0;
-moz-transform: translateY(2000px);
}
}
@-o-keyframes fadeOutDownBig {
0% {
opacity: 1;
-o-transform: translateY(0);
}
100% {
opacity: 0;
-o-transform: translateY(2000px);
}
}
@keyframes fadeOutDownBig {
0% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(2000px);
}
}
.animated.fadeOutDownBig {
-webkit-animation-name: fadeOutDownBig;
-moz-animation-name: fadeOutDownBig;
-o-animation-name: fadeOutDownBig;
animation-name: fadeOutDownBig;
}
@-webkit-keyframes fadeOutLeftBig {
0% {
opacity: 1;
-webkit-transform: translateX(0);
}
100% {
opacity: 0;
-webkit-transform: translateX(-2000px);
}
}
@-moz-keyframes fadeOutLeftBig {
0% {
opacity: 1;
-moz-transform: translateX(0);
}
100% {
opacity: 0;
-moz-transform: translateX(-2000px);
}
}
@-o-keyframes fadeOutLeftBig {
0% {
opacity: 1;
-o-transform: translateX(0);
}
100% {
opacity: 0;
-o-transform: translateX(-2000px);
}
}
@keyframes fadeOutLeftBig {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 0;
transform: translateX(-2000px);
}
}
.animated.fadeOutLeftBig {
-webkit-animation-name: fadeOutLeftBig;
-moz-animation-name: fadeOutLeftBig;
-o-animation-name: fadeOutLeftBig;
animation-name: fadeOutLeftBig;
}
@-webkit-keyframes fadeOutRightBig {
0% {
opacity: 1;
-webkit-transform: translateX(0);
}
100% {
opacity: 0;
-webkit-transform: translateX(2000px);
}
}
@-moz-keyframes fadeOutRightBig {
0% {
opacity: 1;
-moz-transform: translateX(0);
}
100% {
opacity: 0;
-moz-transform: translateX(2000px);
}
}
@-o-keyframes fadeOutRightBig {
0% {
opacity: 1;
-o-transform: translateX(0);
}
100% {
opacity: 0;
-o-transform: translateX(2000px);
}
}
@keyframes fadeOutRightBig {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 0;
transform: translateX(2000px);
}
}
.animated.fadeOutRightBig {
-webkit-animation-name: fadeOutRightBig;
-moz-animation-name: fadeOutRightBig;
-o-animation-name: fadeOutRightBig;
animation-name: fadeOutRightBig;
}
@-webkit-keyframes bounceIn {
0% {
opacity: 0;
-webkit-transform: scale(.3);
}
50% {
opacity: 1;
-webkit-transform: scale(1.05);
}
70% {
-webkit-transform: scale(.9);
}
100% {
-webkit-transform: scale(1);
}
}
@-moz-keyframes bounceIn {
0% {
opacity: 0;
-moz-transform: scale(.3);
}
50% {
opacity: 1;
-moz-transform: scale(1.05);
}
70% {
-moz-transform: scale(.9);
}
100% {
-moz-transform: scale(1);
}
}
@-o-keyframes bounceIn {
0% {
opacity: 0;
-o-transform: scale(.3);
}
50% {
opacity: 1;
-o-transform: scale(1.05);
}
70% {
-o-transform: scale(.9);
}
100% {
-o-transform: scale(1);
}
}
@keyframes bounceIn {
0% {
opacity: 0;
transform: scale(.3);
}
50% {
opacity: 1;
transform: scale(1.05);
}
70% {
transform: scale(.9);
}
100% {
transform: scale(1);
}
}
.animated.bounceIn {
-webkit-animation-name: bounceIn;
-moz-animation-name: bounceIn;
-o-animation-name: bounceIn;
animation-name: bounceIn;
}
@-webkit-keyframes bounceInUp {
0% {
opacity: 0;
-webkit-transform: translateY(2000px);
}
60% {
opacity: 1;
-webkit-transform: translateY(-30px);
}
80% {
-webkit-transform: translateY(10px);
}
100% {
-webkit-transform: translateY(0);
}
}
@-moz-keyframes bounceInUp {
0% {
opacity: 0;
-moz-transform: translateY(2000px);
}
60% {
opacity: 1;
-moz-transform: translateY(-30px);
}
80% {
-moz-transform: translateY(10px);
}
100% {
-moz-transform: translateY(0);
}
}
@-o-keyframes bounceInUp {
0% {
opacity: 0;
-o-transform: translateY(2000px);
}
60% {
opacity: 1;
-o-transform: translateY(-30px);
}
80% {
-o-transform: translateY(10px);
}
100% {
-o-transform: translateY(0);
}
}
@keyframes bounceInUp {
0% {
opacity: 0;
transform: translateY(2000px);
}
60% {
opacity: 1;
transform: translateY(-30px);
}
80% {
transform: translateY(10px);
}
100% {
transform: translateY(0);
}
}
.animated.bounceInUp {
-webkit-animation-name: bounceInUp;
-moz-animation-name: bounceInUp;
-o-animation-name: bounceInUp;
animation-name: bounceInUp;
}
@-webkit-keyframes bounceInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-2000px);
}
60% {
opacity: 1;
-webkit-transform: translateY(30px);
}
80% {
-webkit-transform: translateY(-10px);
}
100% {
-webkit-transform: translateY(0);
}
}
@-moz-keyframes bounceInDown {
0% {
opacity: 0;
-moz-transform: translateY(-2000px);
}
60% {
opacity: 1;
-moz-transform: translateY(30px);
}
80% {
-moz-transform: translateY(-10px);
}
100% {
-moz-transform: translateY(0);
}
}
@-o-keyframes bounceInDown {
0% {
opacity: 0;
-o-transform: translateY(-2000px);
}
60% {
opacity: 1;
-o-transform: translateY(30px);
}
80% {
-o-transform: translateY(-10px);
}
100% {
-o-transform: translateY(0);
}
}
@keyframes bounceInDown {
0% {
opacity: 0;
transform: translateY(-2000px);
}
60% {
opacity: 1;
transform: translateY(30px);
}
80% {
transform: translateY(-10px);
}
100% {
transform: translateY(0);
}
}
.animated.bounceInDown {
-webkit-animation-name: bounceInDown;
-moz-animation-name: bounceInDown;
-o-animation-name: bounceInDown;
animation-name: bounceInDown;
}
@-webkit-keyframes bounceInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(-2000px);
}
60% {
opacity: 1;
-webkit-transform: translateX(30px);
}
80% {
-webkit-transform: translateX(-10px);
}
100% {
-webkit-transform: translateX(0);
}
}
@-moz-keyframes bounceInLeft {
0% {
opacity: 0;
-moz-transform: translateX(-2000px);
}
60% {
opacity: 1;
-moz-transform: translateX(30px);
}
80% {
-moz-transform: translateX(-10px);
}
100% {
-moz-transform: translateX(0);
}
}
@-o-keyframes bounceInLeft {
0% {
opacity: 0;
-o-transform: translateX(-2000px);
}
60% {
opacity: 1;
-o-transform: translateX(30px);
}
80% {
-o-transform: translateX(-10px);
}
100% {
-o-transform: translateX(0);
}
}
@keyframes bounceInLeft {
0% {
opacity: 0;
transform: translateX(-2000px);
}
60% {
opacity: 1;
transform: translateX(30px);
}
80% {
transform: translateX(-10px);
}
100% {
transform: translateX(0);
}
}
.animated.bounceInLeft {
-webkit-animation-name: bounceInLeft;
-moz-animation-name: bounceInLeft;
-o-animation-name: bounceInLeft;
animation-name: bounceInLeft;
}
@-webkit-keyframes bounceInRight {
0% {
opacity: 0;
-webkit-transform: translateX(2000px);
}
60% {
opacity: 1;
-webkit-transform: translateX(-30px);
}
80% {
-webkit-transform: translateX(10px);
}
100% {
-webkit-transform: translateX(0);
}
}
@-moz-keyframes bounceInRight {
0% {
opacity: 0;
-moz-transform: translateX(2000px);
}
60% {
opacity: 1;
-moz-transform: translateX(-30px);
}
80% {
-moz-transform: translateX(10px);
}
100% {
-moz-transform: translateX(0);
}
}
@-o-keyframes bounceInRight {
0% {
opacity: 0;
-o-transform: translateX(2000px);
}
60% {
opacity: 1;
-o-transform: translateX(-30px);
}
80% {
-o-transform: translateX(10px);
}
100% {
-o-transform: translateX(0);
}
}
@keyframes bounceInRight {
0% {
opacity: 0;
transform: translateX(2000px);
}
60% {
opacity: 1;
transform: translateX(-30px);
}
80% {
transform: translateX(10px);
}
100% {
transform: translateX(0);
}
}
.animated.bounceInRight {
-webkit-animation-name: bounceInRight;
-moz-animation-name: bounceInRight;
-o-animation-name: bounceInRight;
animation-name: bounceInRight;
}
@-webkit-keyframes bounceOut {
0% {
-webkit-transform: scale(1);
}
25% {
-webkit-transform: scale(.95);
}
50% {
opacity: 1;
-webkit-transform: scale(1.1);
}
100% {
opacity: 0;
-webkit-transform: scale(.3);
}
}
@-moz-keyframes bounceOut {
0% {
-moz-transform: scale(1);
}
25% {
-moz-transform: scale(.95);
}
50% {
opacity: 1;
-moz-transform: scale(1.1);
}
100% {
opacity: 0;
-moz-transform: scale(.3);
}
}
@-o-keyframes bounceOut {
0% {
-o-transform: scale(1);
}
25% {
-o-transform: scale(.95);
}
50% {
opacity: 1;
-o-transform: scale(1.1);
}
100% {
opacity: 0;
-o-transform: scale(.3);
}
}
@keyframes bounceOut {
0% {
transform: scale(1);
}
25% {
transform: scale(.95);
}
50% {
opacity: 1;
transform: scale(1.1);
}
100% {
opacity: 0;
transform: scale(.3);
}
}
.animated.bounceOut {
-webkit-animation-name: bounceOut;
-moz-animation-name: bounceOut;
-o-animation-name: bounceOut;
animation-name: bounceOut;
}
@-webkit-keyframes bounceOutUp {
0% {
-webkit-transform: translateY(0);
}
20% {
opacity: 1;
-webkit-transform: translateY(20px);
}
100% {
opacity: 0;
-webkit-transform: translateY(-2000px);
}
}
@-moz-keyframes bounceOutUp {
0% {
-moz-transform: translateY(0);
}
20% {
opacity: 1;
-moz-transform: translateY(20px);
}
100% {
opacity: 0;
-moz-transform: translateY(-2000px);
}
}
@-o-keyframes bounceOutUp {
0% {
-o-transform: translateY(0);
}
20% {
opacity: 1;
-o-transform: translateY(20px);
}
100% {
opacity: 0;
-o-transform: translateY(-2000px);
}
}
@keyframes bounceOutUp {
0% {
transform: translateY(0);
}
20% {
opacity: 1;
transform: translateY(20px);
}
100% {
opacity: 0;
transform: translateY(-2000px);
}
}
.animated.bounceOutUp {
-webkit-animation-name: bounceOutUp;
-moz-animation-name: bounceOutUp;
-o-animation-name: bounceOutUp;
animation-name: bounceOutUp;
}
@-webkit-keyframes bounceOutDown {
0% {
-webkit-transform: translateY(0);
}
20% {
opacity: 1;
-webkit-transform: translateY(-20px);
}
100% {
opacity: 0;
-webkit-transform: translateY(2000px);
}
}
@-moz-keyframes bounceOutDown {
0% {
-moz-transform: translateY(0);
}
20% {
opacity: 1;
-moz-transform: translateY(-20px);
}
100% {
opacity: 0;
-moz-transform: translateY(2000px);
}
}
@-o-keyframes bounceOutDown {
0% {
-o-transform: translateY(0);
}
20% {
opacity: 1;
-o-transform: translateY(-20px);
}
100% {
opacity: 0;
-o-transform: translateY(2000px);
}
}
@keyframes bounceOutDown {
0% {
transform: translateY(0);
}
20% {
opacity: 1;
transform: translateY(-20px);
}
100% {
opacity: 0;
transform: translateY(2000px);
}
}
.animated.bounceOutDown {
-webkit-animation-name: bounceOutDown;
-moz-animation-name: bounceOutDown;
-o-animation-name: bounceOutDown;
animation-name: bounceOutDown;
}
@-webkit-keyframes bounceOutLeft {
0% {
-webkit-transform: translateX(0);
}
20% {
opacity: 1;
-webkit-transform: translateX(20px);
}
100% {
opacity: 0;
-webkit-transform: translateX(-2000px);
}
}
@-moz-keyframes bounceOutLeft {
0% {
-moz-transform: translateX(0);
}
20% {
opacity: 1;
-moz-transform: translateX(20px);
}
100% {
opacity: 0;
-moz-transform: translateX(-2000px);
}
}
@-o-keyframes bounceOutLeft {
0% {
-o-transform: translateX(0);
}
20% {
opacity: 1;
-o-transform: translateX(20px);
}
100% {
opacity: 0;
-o-transform: translateX(-2000px);
}
}
@keyframes bounceOutLeft {
0% {
transform: translateX(0);
}
20% {
opacity: 1;
transform: translateX(20px);
}
100% {
opacity: 0;
transform: translateX(-2000px);
}
}
.animated.bounceOutLeft {
-webkit-animation-name: bounceOutLeft;
-moz-animation-name: bounceOutLeft;
-o-animation-name: bounceOutLeft;
animation-name: bounceOutLeft;
}
@-webkit-keyframes bounceOutRight {
0% {
-webkit-transform: translateX(0);
}
20% {
opacity: 1;
-webkit-transform: translateX(-20px);
}
100% {
opacity: 0;
-webkit-transform: translateX(2000px);
}
}
@-moz-keyframes bounceOutRight {
0% {
-moz-transform: translateX(0);
}
20% {
opacity: 1;
-moz-transform: translateX(-20px);
}
100% {
opacity: 0;
-moz-transform: translateX(2000px);
}
}
@-o-keyframes bounceOutRight {
0% {
-o-transform: translateX(0);
}
20% {
opacity: 1;
-o-transform: translateX(-20px);
}
100% {
opacity: 0;
-o-transform: translateX(2000px);
}
}
@keyframes bounceOutRight {
0% {
transform: translateX(0);
}
20% {
opacity: 1;
transform: translateX(-20px);
}
100% {
opacity: 0;
transform: translateX(2000px);
}
}
.animated.bounceOutRight {
-webkit-animation-name: bounceOutRight;
-moz-animation-name: bounceOutRight;
-o-animation-name: bounceOutRight;
animation-name: bounceOutRight;
}
@-webkit-keyframes rotateIn {
0% {
-webkit-transform-origin: center center;
-webkit-transform: rotate(-200deg);
opacity: 0;
}
100% {
-webkit-transform-origin: center center;
-webkit-transform: rotate(0);
opacity: 1;
}
}
@-moz-keyframes rotateIn {
0% {
-moz-transform-origin: center center;
-moz-transform: rotate(-200deg);
opacity: 0;
}
100% {
-moz-transform-origin: center center;
-moz-transform: rotate(0);
opacity: 1;
}
}
@-o-keyframes rotateIn {
0% {
-o-transform-origin: center center;
-o-transform: rotate(-200deg);
opacity: 0;
}
100% {
-o-transform-origin: center center;
-o-transform: rotate(0);
opacity: 1;
}
}
@keyframes rotateIn {
0% {
transform-origin: center center;
transform: rotate(-200deg);
opacity: 0;
}
100% {
transform-origin: center center;
transform: rotate(0);
opacity: 1;
}
}
.animated.rotateIn {
-webkit-animation-name: rotateIn;
-moz-animation-name: rotateIn;
-o-animation-name: rotateIn;
animation-name: rotateIn;
}
@-webkit-keyframes rotateInUpLeft {
0% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(90deg);
opacity: 0;
}
100% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
}
@-moz-keyframes rotateInUpLeft {
0% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(90deg);
opacity: 0;
}
100% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(0);
opacity: 1;
}
}
@-o-keyframes rotateInUpLeft {
0% {
-o-transform-origin: left bottom;
-o-transform: rotate(90deg);
opacity: 0;
}
100% {
-o-transform-origin: left bottom;
-o-transform: rotate(0);
opacity: 1;
}
}
@keyframes rotateInUpLeft {
0% {
transform-origin: left bottom;
transform: rotate(90deg);
opacity: 0;
}
100% {
transform-origin: left bottom;
transform: rotate(0);
opacity: 1;
}
}
.animated.rotateInUpLeft {
-webkit-animation-name: rotateInUpLeft;
-moz-animation-name: rotateInUpLeft;
-o-animation-name: rotateInUpLeft;
animation-name: rotateInUpLeft;
}
@-webkit-keyframes rotateInDownLeft {
0% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(-90deg);
opacity: 0;
}
100% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
}
@-moz-keyframes rotateInDownLeft {
0% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(-90deg);
opacity: 0;
}
100% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(0);
opacity: 1;
}
}
@-o-keyframes rotateInDownLeft {
0% {
-o-transform-origin: left bottom;
-o-transform: rotate(-90deg);
opacity: 0;
}
100% {
-o-transform-origin: left bottom;
-o-transform: rotate(0);
opacity: 1;
}
}
@keyframes rotateInDownLeft {
0% {
transform-origin: left bottom;
transform: rotate(-90deg);
opacity: 0;
}
100% {
transform-origin: left bottom;
transform: rotate(0);
opacity: 1;
}
}
.animated.rotateInDownLeft {
-webkit-animation-name: rotateInDownLeft;
-moz-animation-name: rotateInDownLeft;
-o-animation-name: rotateInDownLeft;
animation-name: rotateInDownLeft;
}
@-webkit-keyframes rotateInUpRight {
0% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(-90deg);
opacity: 0;
}
100% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
}
@-moz-keyframes rotateInUpRight {
0% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(-90deg);
opacity: 0;
}
100% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(0);
opacity: 1;
}
}
@-o-keyframes rotateInUpRight {
0% {
-o-transform-origin: right bottom;
-o-transform: rotate(-90deg);
opacity: 0;
}
100% {
-o-transform-origin: right bottom;
-o-transform: rotate(0);
opacity: 1;
}
}
@keyframes rotateInUpRight {
0% {
transform-origin: right bottom;
transform: rotate(-90deg);
opacity: 0;
}
100% {
transform-origin: right bottom;
transform: rotate(0);
opacity: 1;
}
}
.animated.rotateInUpRight {
-webkit-animation-name: rotateInUpRight;
-moz-animation-name: rotateInUpRight;
-o-animation-name: rotateInUpRight;
animation-name: rotateInUpRight;
}
@-webkit-keyframes rotateInDownRight {
0% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(90deg);
opacity: 0;
}
100% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
}
@-moz-keyframes rotateInDownRight {
0% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(90deg);
opacity: 0;
}
100% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(0);
opacity: 1;
}
}
@-o-keyframes rotateInDownRight {
0% {
-o-transform-origin: right bottom;
-o-transform: rotate(90deg);
opacity: 0;
}
100% {
-o-transform-origin: right bottom;
-o-transform: rotate(0);
opacity: 1;
}
}
@keyframes rotateInDownRight {
0% {
transform-origin: right bottom;
transform: rotate(90deg);
opacity: 0;
}
100% {
transform-origin: right bottom;
transform: rotate(0);
opacity: 1;
}
}
.animated.rotateInDownRight {
-webkit-animation-name: rotateInDownRight;
-moz-animation-name: rotateInDownRight;
-o-animation-name: rotateInDownRight;
animation-name: rotateInDownRight;
}
@-webkit-keyframes rotateOut {
0% {
-webkit-transform-origin: center center;
-webkit-transform: rotate(0);
opacity: 1;
}
100% {
-webkit-transform-origin: center center;
-webkit-transform: rotate(200deg);
opacity: 0;
}
}
@-moz-keyframes rotateOut {
0% {
-moz-transform-origin: center center;
-moz-transform: rotate(0);
opacity: 1;
}
100% {
-moz-transform-origin: center center;
-moz-transform: rotate(200deg);
opacity: 0;
}
}
@-o-keyframes rotateOut {
0% {
-o-transform-origin: center center;
-o-transform: rotate(0);
opacity: 1;
}
100% {
-o-transform-origin: center center;
-o-transform: rotate(200deg);
opacity: 0;
}
}
@keyframes rotateOut {
0% {
transform-origin: center center;
transform: rotate(0);
opacity: 1;
}
100% {
transform-origin: center center;
transform: rotate(200deg);
opacity: 0;
}
}
.animated.rotateOut {
-webkit-animation-name: rotateOut;
-moz-animation-name: rotateOut;
-o-animation-name: rotateOut;
animation-name: rotateOut;
}
@-webkit-keyframes rotateOutUpLeft {
0% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
100% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(-90deg);
opacity: 0;
}
}
@-moz-keyframes rotateOutUpLeft {
0% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(0);
opacity: 1;
}
100% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(-90deg);
opacity: 0;
}
}
@-o-keyframes rotateOutUpLeft {
0% {
-o-transform-origin: left bottom;
-o-transform: rotate(0);
opacity: 1;
}
100% {
-o-transform-origin: left bottom;
-o-transform: rotate(-90deg);
opacity: 0;
}
}
@keyframes rotateOutUpLeft {
0% {
transform-origin: left bottom;
transform: rotate(0);
opacity: 1;
}
100% {
transform-origin: left bottom;
transform: rotate(-90deg);
opacity: 0;
}
}
.animated.rotateOutUpLeft {
-webkit-animation-name: rotateOutUpLeft;
-moz-animation-name: rotateOutUpLeft;
-o-animation-name: rotateOutUpLeft;
animation-name: rotateOutUpLeft;
}
@-webkit-keyframes rotateOutDownLeft {
0% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
100% {
-webkit-transform-origin: left bottom;
-webkit-transform: rotate(90deg);
opacity: 0;
}
}
@-moz-keyframes rotateOutDownLeft {
0% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(0);
opacity: 1;
}
100% {
-moz-transform-origin: left bottom;
-moz-transform: rotate(90deg);
opacity: 0;
}
}
@-o-keyframes rotateOutDownLeft {
0% {
-o-transform-origin: left bottom;
-o-transform: rotate(0);
opacity: 1;
}
100% {
-o-transform-origin: left bottom;
-o-transform: rotate(90deg);
opacity: 0;
}
}
@keyframes rotateOutDownLeft {
0% {
transform-origin: left bottom;
transform: rotate(0);
opacity: 1;
}
100% {
transform-origin: left bottom;
transform: rotate(90deg);
opacity: 0;
}
}
.animated.rotateOutDownLeft {
-webkit-animation-name: rotateOutDownLeft;
-moz-animation-name: rotateOutDownLeft;
-o-animation-name: rotateOutDownLeft;
animation-name: rotateOutDownLeft;
}
@-webkit-keyframes rotateOutUpRight {
0% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
100% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(90deg);
opacity: 0;
}
}
@-moz-keyframes rotateOutUpRight {
0% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(0);
opacity: 1;
}
100% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(90deg);
opacity: 0;
}
}
@-o-keyframes rotateOutUpRight {
0% {
-o-transform-origin: right bottom;
-o-transform: rotate(0);
opacity: 1;
}
100% {
-o-transform-origin: right bottom;
-o-transform: rotate(90deg);
opacity: 0;
}
}
@keyframes rotateOutUpRight {
0% {
transform-origin: right bottom;
transform: rotate(0);
opacity: 1;
}
100% {
transform-origin: right bottom;
transform: rotate(90deg);
opacity: 0;
}
}
.animated.rotateOutUpRight {
-webkit-animation-name: rotateOutUpRight;
-moz-animation-name: rotateOutUpRight;
-o-animation-name: rotateOutUpRight;
animation-name: rotateOutUpRight;
}
@-webkit-keyframes rotateOutDownRight {
0% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(0);
opacity: 1;
}
100% {
-webkit-transform-origin: right bottom;
-webkit-transform: rotate(-90deg);
opacity: 0;
}
}
@-moz-keyframes rotateOutDownRight {
0% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(0);
opacity: 1;
}
100% {
-moz-transform-origin: right bottom;
-moz-transform: rotate(-90deg);
opacity: 0;
}
}
@-o-keyframes rotateOutDownRight {
0% {
-o-transform-origin: right bottom;
-o-transform: rotate(0);
opacity: 1;
}
100% {
-o-transform-origin: right bottom;
-o-transform: rotate(-90deg);
opacity: 0;
}
}
@keyframes rotateOutDownRight {
0% {
transform-origin: right bottom;
transform: rotate(0);
opacity: 1;
}
100% {
transform-origin: right bottom;
transform: rotate(-90deg);
opacity: 0;
}
}
.animated.rotateOutDownRight {
-webkit-animation-name: rotateOutDownRight;
-moz-animation-name: rotateOutDownRight;
-o-animation-name: rotateOutDownRight;
animation-name: rotateOutDownRight;
}
@-webkit-keyframes hinge {
0% { -webkit-transform: rotate(0); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
20%, 60% { -webkit-transform: rotate(80deg); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
40% { -webkit-transform: rotate(60deg); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
80% { -webkit-transform: rotate(60deg) translateY(0); opacity: 1; -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
100% { -webkit-transform: translateY(700px); opacity: 0; }
}
@-moz-keyframes hinge {
0% { -moz-transform: rotate(0); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
20%, 60% { -moz-transform: rotate(80deg); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
40% { -moz-transform: rotate(60deg); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
80% { -moz-transform: rotate(60deg) translateY(0); opacity: 1; -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
100% { -moz-transform: translateY(700px); opacity: 0; }
}
@-o-keyframes hinge {
0% { -o-transform: rotate(0); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
20%, 60% { -o-transform: rotate(80deg); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
40% { -o-transform: rotate(60deg); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
80% { -o-transform: rotate(60deg) translateY(0); opacity: 1; -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
100% { -o-transform: translateY(700px); opacity: 0; }
}
@keyframes hinge {
0% { transform: rotate(0); transform-origin: top left; animation-timing-function: ease-in-out; }
20%, 60% { transform: rotate(80deg); transform-origin: top left; animation-timing-function: ease-in-out; }
40% { transform: rotate(60deg); transform-origin: top left; animation-timing-function: ease-in-out; }
80% { transform: rotate(60deg) translateY(0); opacity: 1; transform-origin: top left; animation-timing-function: ease-in-out; }
100% { transform: translateY(700px); opacity: 0; }
}
.animated.hinge {
-webkit-animation-name: hinge;
-moz-animation-name: hinge;
-o-animation-name: hinge;
animation-name: hinge;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollIn {
0% { opacity: 0; -webkit-transform: translateX(-100%) rotate(-120deg); }
100% { opacity: 1; -webkit-transform: translateX(0px) rotate(0deg); }
}
@-moz-keyframes rollIn {
0% { opacity: 0; -moz-transform: translateX(-100%) rotate(-120deg); }
100% { opacity: 1; -moz-transform: translateX(0px) rotate(0deg); }
}
@-o-keyframes rollIn {
0% { opacity: 0; -o-transform: translateX(-100%) rotate(-120deg); }
100% { opacity: 1; -o-transform: translateX(0px) rotate(0deg); }
}
@keyframes rollIn {
0% { opacity: 0; transform: translateX(-100%) rotate(-120deg); }
100% { opacity: 1; transform: translateX(0px) rotate(0deg); }
}
.animated.rollIn {
-webkit-animation-name: rollIn;
-moz-animation-name: rollIn;
-o-animation-name: rollIn;
animation-name: rollIn;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollOut {
0% {
opacity: 1;
-webkit-transform: translateX(0px) rotate(0deg);
}
100% {
opacity: 0;
-webkit-transform: translateX(100%) rotate(120deg);
}
}
@-moz-keyframes rollOut {
0% {
opacity: 1;
-moz-transform: translateX(0px) rotate(0deg);
}
100% {
opacity: 0;
-moz-transform: translateX(100%) rotate(120deg);
}
}
@-o-keyframes rollOut {
0% {
opacity: 1;
-o-transform: translateX(0px) rotate(0deg);
}
100% {
opacity: 0;
-o-transform: translateX(100%) rotate(120deg);
}
}
@keyframes rollOut {
0% {
opacity: 1;
transform: translateX(0px) rotate(0deg);
}
100% {
opacity: 0;
transform: translateX(100%) rotate(120deg);
}
}
.animated.rollOut {
-webkit-animation-name: rollOut;
-moz-animation-name: rollOut;
-o-animation-name: rollOut;
animation-name: rollOut;
}
/* originally authored by Angelo Rohit - https://github.com/angelorohit */
@-webkit-keyframes lightSpeedIn {
0% { -webkit-transform: translateX(100%) skewX(-30deg); opacity: 0; }
60% { -webkit-transform: translateX(-20%) skewX(30deg); opacity: 1; }
80% { -webkit-transform: translateX(0%) skewX(-15deg); opacity: 1; }
100% { -webkit-transform: translateX(0%) skewX(0deg); opacity: 1; }
}
@-moz-keyframes lightSpeedIn {
0% { -moz-transform: translateX(100%) skewX(-30deg); opacity: 0; }
60% { -moz-transform: translateX(-20%) skewX(30deg); opacity: 1; }
80% { -moz-transform: translateX(0%) skewX(-15deg); opacity: 1; }
100% { -moz-transform: translateX(0%) skewX(0deg); opacity: 1; }
}
@-o-keyframes lightSpeedIn {
0% { -o-transform: translateX(100%) skewX(-30deg); opacity: 0; }
60% { -o-transform: translateX(-20%) skewX(30deg); opacity: 1; }
80% { -o-transform: translateX(0%) skewX(-15deg); opacity: 1; }
100% { -o-transform: translateX(0%) skewX(0deg); opacity: 1; }
}
@keyframes lightSpeedIn {
0% { transform: translateX(100%) skewX(-30deg); opacity: 0; }
60% { transform: translateX(-20%) skewX(30deg); opacity: 1; }
80% { transform: translateX(0%) skewX(-15deg); opacity: 1; }
100% { transform: translateX(0%) skewX(0deg); opacity: 1; }
}
.animated.lightSpeedIn {
-webkit-animation-name: lightSpeedIn;
-moz-animation-name: lightSpeedIn;
-o-animation-name: lightSpeedIn;
animation-name: lightSpeedIn;
-webkit-animation-timing-function: ease-out;
-moz-animation-timing-function: ease-out;
-o-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
.animated.lightSpeedIn {
-webkit-animation-duration: 0.5s;
-moz-animation-duration: 0.5s;
-o-animation-duration: 0.5s;
animation-duration: 0.5s;
}
/* originally authored by Angelo Rohit - https://github.com/angelorohit */
@-webkit-keyframes lightSpeedOut {
0% { -webkit-transform: translateX(0%) skewX(0deg); opacity: 1; }
100% { -webkit-transform: translateX(100%) skewX(-30deg); opacity: 0; }
}
@-moz-keyframes lightSpeedOut {
0% { -moz-transform: translateX(0%) skewX(0deg); opacity: 1; }
100% { -moz-transform: translateX(100%) skewX(-30deg); opacity: 0; }
}
@-o-keyframes lightSpeedOut {
0% { -o-transform: translateX(0%) skewX(0deg); opacity: 1; }
100% { -o-transform: translateX(100%) skewX(-30deg); opacity: 0; }
}
@keyframes lightSpeedOut {
0% { transform: translateX(0%) skewX(0deg); opacity: 1; }
100% { transform: translateX(100%) skewX(-30deg); opacity: 0; }
}
.animated.lightSpeedOut {
-webkit-animation-name: lightSpeedOut;
-moz-animation-name: lightSpeedOut;
-o-animation-name: lightSpeedOut;
animation-name: lightSpeedOut;
-webkit-animation-timing-function: ease-in;
-moz-animation-timing-function: ease-in;
-o-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
.animated.lightSpeedOut {
-webkit-animation-duration: 0.25s;
-moz-animation-duration: 0.25s;
-o-animation-duration: 0.25s;
animation-duration: 0.25s;
}
/* originally authored by Angelo Rohit - https://github.com/angelorohit */
@-webkit-keyframes wiggle {
0% { -webkit-transform: skewX(9deg); }
10% { -webkit-transform: skewX(-8deg); }
20% { -webkit-transform: skewX(7deg); }
30% { -webkit-transform: skewX(-6deg); }
40% { -webkit-transform: skewX(5deg); }
50% { -webkit-transform: skewX(-4deg); }
60% { -webkit-transform: skewX(3deg); }
70% { -webkit-transform: skewX(-2deg); }
80% { -webkit-transform: skewX(1deg); }
90% { -webkit-transform: skewX(0deg); }
100% { -webkit-transform: skewX(0deg); }
}
@-moz-keyframes wiggle {
0% { -moz-transform: skewX(9deg); }
10% { -moz-transform: skewX(-8deg); }
20% { -moz-transform: skewX(7deg); }
30% { -moz-transform: skewX(-6deg); }
40% { -moz-transform: skewX(5deg); }
50% { -moz-transform: skewX(-4deg); }
60% { -moz-transform: skewX(3deg); }
70% { -moz-transform: skewX(-2deg); }
80% { -moz-transform: skewX(1deg); }
90% { -moz-transform: skewX(0deg); }
100% { -moz-transform: skewX(0deg); }
}
@-o-keyframes wiggle {
0% { -o-transform: skewX(9deg); }
10% { -o-transform: skewX(-8deg); }
20% { -o-transform: skewX(7deg); }
30% { -o-transform: skewX(-6deg); }
40% { -o-transform: skewX(5deg); }
50% { -o-transform: skewX(-4deg); }
60% { -o-transform: skewX(3deg); }
70% { -o-transform: skewX(-2deg); }
80% { -o-transform: skewX(1deg); }
90% { -o-transform: skewX(0deg); }
100% { -o-transform: skewX(0deg); }
}
@keyframes wiggle {
0% { transform: skewX(9deg); }
10% { transform: skewX(-8deg); }
20% { transform: skewX(7deg); }
30% { transform: skewX(-6deg); }
40% { transform: skewX(5deg); }
50% { transform: skewX(-4deg); }
60% { transform: skewX(3deg); }
70% { transform: skewX(-2deg); }
80% { transform: skewX(1deg); }
90% { transform: skewX(0deg); }
100% { transform: skewX(0deg); }
}
.animated.wiggle {
-webkit-animation-name: wiggle;
-moz-animation-name: wiggle;
-o-animation-name: wiggle;
animation-name: wiggle;
-webkit-animation-timing-function: ease-in;
-moz-animation-timing-function: ease-in;
-o-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
.animated.wiggle {
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
-o-animation-duration: 0.75s;
animation-duration: 0.75s;
}
| sutejoramadhan/if | public/css/animate.css | CSS | mit | 61,623 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Data.Common;
using System.Data.SqlClient;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
internal static partial class SNINativeMethodWrapper
{
private const string SNI = "sni.dll";
private static int s_sniMaxComposedSpnLength = -1;
private const int SniOpenTimeOut = -1; // infinite
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void SqlAsyncCallbackDelegate(IntPtr m_ConsKey, IntPtr pPacket, uint dwError);
internal static int SniMaxComposedSpnLength
{
get
{
if (s_sniMaxComposedSpnLength == -1)
{
s_sniMaxComposedSpnLength = checked((int)GetSniMaxComposedSpnLength());
}
return s_sniMaxComposedSpnLength;
}
}
#region Structs\Enums
[StructLayout(LayoutKind.Sequential)]
internal struct ConsumerInfo
{
internal int defaultBufferSize;
internal SqlAsyncCallbackDelegate readDelegate;
internal SqlAsyncCallbackDelegate writeDelegate;
internal IntPtr key;
}
internal enum ConsumerNumber
{
SNI_Consumer_SNI,
SNI_Consumer_SSB,
SNI_Consumer_PacketIsReleased,
SNI_Consumer_Invalid,
}
internal enum IOType
{
READ,
WRITE,
}
internal enum PrefixEnum
{
UNKNOWN_PREFIX,
SM_PREFIX,
TCP_PREFIX,
NP_PREFIX,
VIA_PREFIX,
INVALID_PREFIX,
}
internal enum ProviderEnum
{
HTTP_PROV,
NP_PROV,
SESSION_PROV,
SIGN_PROV,
SM_PROV,
SMUX_PROV,
SSL_PROV,
TCP_PROV,
VIA_PROV,
MAX_PROVS,
INVALID_PROV,
}
internal enum QTypes
{
SNI_QUERY_CONN_INFO,
SNI_QUERY_CONN_BUFSIZE,
SNI_QUERY_CONN_KEY,
SNI_QUERY_CLIENT_ENCRYPT_POSSIBLE,
SNI_QUERY_SERVER_ENCRYPT_POSSIBLE,
SNI_QUERY_CERTIFICATE,
SNI_QUERY_LOCALDB_HMODULE,
SNI_QUERY_CONN_ENCRYPT,
SNI_QUERY_CONN_PROVIDERNUM,
SNI_QUERY_CONN_CONNID,
SNI_QUERY_CONN_PARENTCONNID,
SNI_QUERY_CONN_SECPKG,
SNI_QUERY_CONN_NETPACKETSIZE,
SNI_QUERY_CONN_NODENUM,
SNI_QUERY_CONN_PACKETSRECD,
SNI_QUERY_CONN_PACKETSSENT,
SNI_QUERY_CONN_PEERADDR,
SNI_QUERY_CONN_PEERPORT,
SNI_QUERY_CONN_LASTREADTIME,
SNI_QUERY_CONN_LASTWRITETIME,
SNI_QUERY_CONN_CONSUMER_ID,
SNI_QUERY_CONN_CONNECTTIME,
SNI_QUERY_CONN_HTTPENDPOINT,
SNI_QUERY_CONN_LOCALADDR,
SNI_QUERY_CONN_LOCALPORT,
SNI_QUERY_CONN_SSLHANDSHAKESTATE,
SNI_QUERY_CONN_SOBUFAUTOTUNING,
SNI_QUERY_CONN_SECPKGNAME,
SNI_QUERY_CONN_SECPKGMUTUALAUTH,
SNI_QUERY_CONN_CONSUMERCONNID,
SNI_QUERY_CONN_SNIUCI,
SNI_QUERY_CONN_SUPPORTS_EXTENDED_PROTECTION,
SNI_QUERY_CONN_CHANNEL_PROVIDES_AUTHENTICATION_CONTEXT,
SNI_QUERY_CONN_PEERID,
SNI_QUERY_CONN_SUPPORTS_SYNC_OVER_ASYNC,
}
internal enum TransparentNetworkResolutionMode : byte
{
DisabledMode = 0,
SequentialMode,
ParallelMode
};
[StructLayout(LayoutKind.Sequential)]
private struct Sni_Consumer_Info
{
public int DefaultUserDataLength;
public IntPtr ConsumerKey;
public IntPtr fnReadComp;
public IntPtr fnWriteComp;
public IntPtr fnTrace;
public IntPtr fnAcceptComp;
public uint dwNumProts;
public IntPtr rgListenInfo;
public IntPtr NodeAffinity;
}
[StructLayout(LayoutKind.Sequential)]
private unsafe struct SNI_CLIENT_CONSUMER_INFO
{
public Sni_Consumer_Info ConsumerInfo;
[MarshalAs(UnmanagedType.LPWStr)]
public string wszConnectionString;
public PrefixEnum networkLibrary;
public byte* szSPN;
public uint cchSPN;
public byte* szInstanceName;
public uint cchInstanceName;
[MarshalAs(UnmanagedType.Bool)]
public bool fOverrideLastConnectCache;
[MarshalAs(UnmanagedType.Bool)]
public bool fSynchronousConnection;
public int timeout;
[MarshalAs(UnmanagedType.Bool)]
public bool fParallel;
public TransparentNetworkResolutionMode transparentNetworkResolution;
public int totalTimeout;
public bool isAzureSqlServerEndpoint;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct SNI_Error
{
internal ProviderEnum provider;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 261)]
internal string errorMessage;
internal uint nativeError;
internal uint sniError;
[MarshalAs(UnmanagedType.LPWStr)]
internal string fileName;
[MarshalAs(UnmanagedType.LPWStr)]
internal string function;
internal uint lineNumber;
}
#endregion
#region DLL Imports
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIAddProviderWrapper")]
internal static extern uint SNIAddProvider(SNIHandle pConn, ProviderEnum ProvNum, [In] ref uint pInfo);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNICheckConnectionWrapper")]
internal static extern uint SNICheckConnection([In] SNIHandle pConn);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNICloseWrapper")]
internal static extern uint SNIClose(IntPtr pConn);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern void SNIGetLastError(out SNI_Error pErrorStruct);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern void SNIPacketRelease(IntPtr pPacket);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIPacketResetWrapper")]
internal static extern void SNIPacketReset([In] SNIHandle pConn, IOType IOType, SNIPacket pPacket, ConsumerNumber ConsNum);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint SNIQueryInfo(QTypes QType, ref uint pbQInfo);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint SNIQueryInfo(QTypes QType, ref IntPtr pbQInfo);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIReadAsyncWrapper")]
internal static extern uint SNIReadAsync(SNIHandle pConn, ref IntPtr ppNewPacket);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint SNIReadSyncOverAsync(SNIHandle pConn, ref IntPtr ppNewPacket, int timeout);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIRemoveProviderWrapper")]
internal static extern uint SNIRemoveProvider(SNIHandle pConn, ProviderEnum ProvNum);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint SNISecInitPackage(ref uint pcbMaxToken);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNISetInfoWrapper")]
internal static extern uint SNISetInfo(SNIHandle pConn, QTypes QType, [In] ref uint pbQInfo);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint SNITerminate();
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIWaitForSSLHandshakeToCompleteWrapper")]
internal static extern uint SNIWaitForSSLHandshakeToComplete([In] SNIHandle pConn, int dwMilliseconds);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint UnmanagedIsTokenRestricted([In] IntPtr token, [MarshalAs(UnmanagedType.Bool)] out bool isRestricted);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint GetSniMaxComposedSpnLength();
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out Guid pbQInfo);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIInitialize([In] IntPtr pmo);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIOpenSyncExWrapper(ref SNI_CLIENT_CONSUMER_INFO pClientConsumerInfo, out IntPtr ppConn);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIOpenWrapper(
[In] ref Sni_Consumer_Info pConsumerInfo,
[MarshalAs(UnmanagedType.LPStr)] string szConnect,
[In] SNIHandle pConn,
out IntPtr ppConn,
[MarshalAs(UnmanagedType.Bool)] bool fSync);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr SNIPacketAllocateWrapper([In] SafeHandle pConn, IOType IOType);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIPacketGetDataWrapper([In] IntPtr packet, [In, Out] byte[] readBuffer, uint readBufferLength, out uint dataSize);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe void SNIPacketSetData(SNIPacket pPacket, [In] byte* pbBuf, uint cbBuf);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe uint SNISecGenClientContextWrapper(
[In] SNIHandle pConn,
[In, Out] byte[] pIn,
uint cbIn,
[In, Out] byte[] pOut,
[In] ref uint pcbOut,
[MarshalAsAttribute(UnmanagedType.Bool)] out bool pfDone,
byte* szServerInfo,
uint cbServerInfo,
[MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszUserName,
[MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszPassword);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIWriteAsyncWrapper(SNIHandle pConn, [In] SNIPacket pPacket);
[DllImport(SNI, CallingConvention = CallingConvention.Cdecl)]
private static extern uint SNIWriteSyncOverAsync(SNIHandle pConn, [In] SNIPacket pPacket);
#endregion
internal static uint SniGetConnectionId(SNIHandle pConn, ref Guid connId)
{
return SNIGetInfoWrapper(pConn, QTypes.SNI_QUERY_CONN_CONNID, out connId);
}
internal static uint SNIInitialize()
{
return SNIInitialize(IntPtr.Zero);
}
internal static unsafe uint SNIOpenMarsSession(ConsumerInfo consumerInfo, SNIHandle parent, ref IntPtr pConn, bool fSync)
{
// initialize consumer info for MARS
Sni_Consumer_Info native_consumerInfo = new Sni_Consumer_Info();
MarshalConsumerInfo(consumerInfo, ref native_consumerInfo);
return SNIOpenWrapper(ref native_consumerInfo, "session:", parent, out pConn, fSync);
}
internal static unsafe uint SNIOpenSyncEx(ConsumerInfo consumerInfo, string constring, ref IntPtr pConn, byte[] spnBuffer, byte[] instanceName, bool fOverrideCache, bool fSync, int timeout, bool fParallel)
{
fixed (byte* pin_instanceName = &instanceName[0])
{
SNI_CLIENT_CONSUMER_INFO clientConsumerInfo = new SNI_CLIENT_CONSUMER_INFO();
// initialize client ConsumerInfo part first
MarshalConsumerInfo(consumerInfo, ref clientConsumerInfo.ConsumerInfo);
clientConsumerInfo.wszConnectionString = constring;
clientConsumerInfo.networkLibrary = PrefixEnum.UNKNOWN_PREFIX;
clientConsumerInfo.szInstanceName = pin_instanceName;
clientConsumerInfo.cchInstanceName = (uint)instanceName.Length;
clientConsumerInfo.fOverrideLastConnectCache = fOverrideCache;
clientConsumerInfo.fSynchronousConnection = fSync;
clientConsumerInfo.timeout = timeout;
clientConsumerInfo.fParallel = fParallel;
clientConsumerInfo.transparentNetworkResolution = TransparentNetworkResolutionMode.DisabledMode;
clientConsumerInfo.totalTimeout = SniOpenTimeOut;
clientConsumerInfo.isAzureSqlServerEndpoint = ADP.IsAzureSqlServerEndpoint(constring);
if (spnBuffer != null)
{
fixed (byte* pin_spnBuffer = &spnBuffer[0])
{
clientConsumerInfo.szSPN = pin_spnBuffer;
clientConsumerInfo.cchSPN = (uint)spnBuffer.Length;
return SNIOpenSyncExWrapper(ref clientConsumerInfo, out pConn);
}
}
else
{
// else leave szSPN null (SQL Auth)
return SNIOpenSyncExWrapper(ref clientConsumerInfo, out pConn);
}
}
}
internal static void SNIPacketAllocate(SafeHandle pConn, IOType IOType, ref IntPtr pPacket)
{
pPacket = SNIPacketAllocateWrapper(pConn, IOType);
}
internal static unsafe uint SNIPacketGetData(IntPtr packet, byte[] readBuffer, ref uint dataSize)
{
return SNIPacketGetDataWrapper(packet, readBuffer, (uint)readBuffer.Length, out dataSize);
}
internal static unsafe void SNIPacketSetData(SNIPacket packet, byte[] data, int length)
{
fixed (byte* pin_data = &data[0])
{
SNIPacketSetData(packet, pin_data, (uint)length);
}
}
internal static unsafe uint SNISecGenClientContext(SNIHandle pConnectionObject, byte[] inBuff, uint receivedLength, byte[] OutBuff, ref uint sendLength, byte[] serverUserName)
{
fixed (byte* pin_serverUserName = &serverUserName[0])
{
bool local_fDone;
return SNISecGenClientContextWrapper(
pConnectionObject,
inBuff,
receivedLength,
OutBuff,
ref sendLength,
out local_fDone,
pin_serverUserName,
(uint)serverUserName.Length,
null,
null);
}
}
internal static uint SNIWritePacket(SNIHandle pConn, SNIPacket packet, bool sync)
{
if (sync)
{
return SNIWriteSyncOverAsync(pConn, packet);
}
else
{
return SNIWriteAsyncWrapper(pConn, packet);
}
}
private static void MarshalConsumerInfo(ConsumerInfo consumerInfo, ref Sni_Consumer_Info native_consumerInfo)
{
native_consumerInfo.DefaultUserDataLength = consumerInfo.defaultBufferSize;
native_consumerInfo.fnReadComp = null != consumerInfo.readDelegate
? Marshal.GetFunctionPointerForDelegate(consumerInfo.readDelegate)
: IntPtr.Zero;
native_consumerInfo.fnWriteComp = null != consumerInfo.writeDelegate
? Marshal.GetFunctionPointerForDelegate(consumerInfo.writeDelegate)
: IntPtr.Zero;
native_consumerInfo.ConsumerKey = consumerInfo.key;
}
}
}
namespace System.Data
{
internal static partial class SafeNativeMethods
{
[DllImport("kernel32.dll", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, SetLastError = true)]
internal static extern IntPtr GetProcAddress(IntPtr HModule, [MarshalAs(UnmanagedType.LPStr), In] string funcName);
}
}
namespace System.Data
{
internal static class Win32NativeMethods
{
internal static bool IsTokenRestrictedWrapper(IntPtr token)
{
bool isRestricted;
uint result = SNINativeMethodWrapper.UnmanagedIsTokenRestricted(token, out isRestricted);
if (result != 0)
{
Marshal.ThrowExceptionForHR(unchecked((int)result));
}
return isRestricted;
}
}
}
| jlin177/corefx | src/System.Data.SqlClient/src/Interop/SNINativeMethodWrapper.Windows.cs | C# | mit | 17,341 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKShareOpenGraphValueContainer.h"
#import "FBSDKShareOpenGraphValueContainer+Internal.h"
#import <FBSDKCoreKit/FBSDKMacros.h>
#import "FBSDKCoreKit+Internal.h"
#import "FBSDKShareOpenGraphObject.h"
#import "FBSDKSharePhoto.h"
#import "FBSDKShareUtility.h"
#define FBSDK_SHARE_OPEN_GRAPH_VALUE_CONTAINER_PROPERTIES_KEY @"properties"
@implementation FBSDKShareOpenGraphValueContainer
{
NSMutableDictionary *_properties;
}
#pragma mark - Object Lifecycle
- (instancetype)init
{
if ((self = [super init])) {
_properties = [[NSMutableDictionary alloc] init];
}
return self;
}
#pragma mark - Public Methods
- (NSDictionary *)allData
{
return [_properties copy];
}
- (NSArray *)arrayForKey:(NSString *)key
{
return [self _valueOfClass:[NSArray class] forKey:key];
}
- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(NSString *key, id object, BOOL *stop))block
{
[_properties enumerateKeysAndObjectsUsingBlock:block];
}
- (NSEnumerator *)keyEnumerator
{
return [_properties keyEnumerator];
}
- (NSNumber *)numberForKey:(NSString *)key
{
return [self _valueOfClass:[NSNumber class] forKey:key];
}
- (NSEnumerator *)objectEnumerator
{
return [_properties objectEnumerator];
}
- (FBSDKShareOpenGraphObject *)objectForKey:(NSString *)key
{
return [self _valueOfClass:[FBSDKShareOpenGraphObject class] forKey:key];
}
- (id)objectForKeyedSubscript:(id<NSCopying>)key
{
return [self _valueForKey:key];
}
- (void)parseProperties:(NSDictionary *)properties
{
[FBSDKShareUtility assertOpenGraphValues:properties requireKeyNamespace:[self requireKeyNamespace]];
[_properties addEntriesFromDictionary:[FBSDKShareUtility convertOpenGraphValues:properties]];
}
- (FBSDKSharePhoto *)photoForKey:(NSString *)key
{
return [self _valueOfClass:[FBSDKSharePhoto class] forKey:key];
}
- (void)removeObjectForKey:(NSString *)key
{
[_properties removeObjectForKey:key];
}
- (void)setArray:(NSArray *)array forKey:(NSString *)key
{
[self _setValue:array forKey:key];
}
- (void)setNumber:(NSNumber *)number forKey:(NSString *)key
{
[self _setValue:number forKey:key];
}
- (void)setObject:(FBSDKShareOpenGraphObject *)object forKey:(NSString *)key
{
[self _setValue:object forKey:key];
}
- (void)setPhoto:(FBSDKSharePhoto *)photo forKey:(NSString *)key
{
[self _setValue:photo forKey:key];
}
- (void)setString:(NSString *)string forKey:(NSString *)key
{
[self _setValue:string forKey:key];
}
- (void)setURL:(NSURL *)URL forKey:(NSString *)key
{
[self _setValue:URL forKey:key];
}
- (NSString *)stringForKey:(NSString *)key
{
return [self _valueOfClass:[NSString class] forKey:key];
}
- (NSURL *)URLForKey:(NSString *)key
{
return [self _valueOfClass:[NSURL class] forKey:key];
}
- (id)valueForKey:(NSString *)key
{
return [self _valueForKey:key] ?: [super valueForKey:key];
}
#pragma mark - Internal Methods
- (NSDictionary *)allProperties
{
return _properties;
}
- (BOOL)requireKeyNamespace
{
return YES;
}
#pragma mark - Equality
- (NSUInteger)hash
{
return [_properties hash];
}
- (BOOL)isEqual:(id)object
{
if (self == object) {
return YES;
}
if (![object isKindOfClass:[FBSDKShareOpenGraphValueContainer class]]) {
return NO;
}
return [self isEqualToShareOpenGraphValueContainer:(FBSDKShareOpenGraphValueContainer *)object];
}
- (BOOL)isEqualToShareOpenGraphValueContainer:(FBSDKShareOpenGraphValueContainer *)object
{
return [FBSDKInternalUtility object:_properties isEqualToObject:[object allProperties]];
}
#pragma mark - NSCoding
+ (BOOL)supportsSecureCoding
{
return YES;
}
- (id)initWithCoder:(NSCoder *)decoder
{
if ((self = [self init])) {
NSSet *classes = [NSSet setWithObjects:
[NSArray class],
[NSDictionary class],
[FBSDKShareOpenGraphObject class],
[FBSDKSharePhoto class],
nil];
NSDictionary *properties = [decoder decodeObjectOfClasses:classes
forKey:FBSDK_SHARE_OPEN_GRAPH_VALUE_CONTAINER_PROPERTIES_KEY];
if ([properties count]) {
[self parseProperties:properties];
}
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)encoder
{
[encoder encodeObject:_properties forKey:FBSDK_SHARE_OPEN_GRAPH_VALUE_CONTAINER_PROPERTIES_KEY];
}
#pragma mark - Helper Methods
- (void)_setValue:(id)value forKey:(NSString *)key
{
[FBSDKShareUtility assertOpenGraphKey:key requireNamespace:[self requireKeyNamespace]];
[FBSDKShareUtility assertOpenGraphValue:value];
if (value) {
_properties[key] = value;
} else {
[self removeObjectForKey:key];
}
}
- (id)_valueForKey:(id)key
{
key = [FBSDKTypeUtility stringValue:key];
return (key ? [FBSDKTypeUtility objectValue:_properties[key]] : nil);
}
- (id)_valueOfClass:(__unsafe_unretained Class)cls forKey:(NSString *)key
{
id value = [self _valueForKey:key];
return ([value isKindOfClass:cls] ? value : nil);
}
@end
| naokits/NKMessngr | Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphValueContainer.m | Matlab | mit | 6,084 |
@keyframes vex-dropin {
/* line 51, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 0;
}
/* line 54, ../sass/_keyframes.sass */
1% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 0;
}
/* line 59, ../sass/_keyframes.sass */
2% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 1;
}
/* line 62, ../sass/_keyframes.sass */
100% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 1;
}
}
@-webkit-keyframes vex-dropin {
/* line 51, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 0;
}
/* line 54, ../sass/_keyframes.sass */
1% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 0;
}
/* line 59, ../sass/_keyframes.sass */
2% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 1;
}
/* line 62, ../sass/_keyframes.sass */
100% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 1;
}
}
@-moz-keyframes vex-dropin {
/* line 51, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 0;
}
/* line 54, ../sass/_keyframes.sass */
1% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 0;
}
/* line 59, ../sass/_keyframes.sass */
2% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 1;
}
/* line 62, ../sass/_keyframes.sass */
100% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 1;
}
}
@-ms-keyframes vex-dropin {
/* line 51, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 0;
}
/* line 54, ../sass/_keyframes.sass */
1% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 0;
}
/* line 59, ../sass/_keyframes.sass */
2% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 1;
}
/* line 62, ../sass/_keyframes.sass */
100% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 1;
}
}
@-o-keyframes vex-dropin {
/* line 51, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 0;
}
/* line 54, ../sass/_keyframes.sass */
1% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 0;
}
/* line 59, ../sass/_keyframes.sass */
2% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
opacity: 1;
}
/* line 62, ../sass/_keyframes.sass */
100% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
opacity: 1;
}
}
@keyframes vex-dropout {
/* line 68, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
}
/* line 70, ../sass/_keyframes.sass */
100% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
}
}
@-webkit-keyframes vex-dropout {
/* line 68, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
}
/* line 70, ../sass/_keyframes.sass */
100% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
}
}
@-moz-keyframes vex-dropout {
/* line 68, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
}
/* line 70, ../sass/_keyframes.sass */
100% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
}
}
@-ms-keyframes vex-dropout {
/* line 68, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
}
/* line 70, ../sass/_keyframes.sass */
100% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
}
}
@-o-keyframes vex-dropout {
/* line 68, ../sass/_keyframes.sass */
0% {
transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
}
/* line 70, ../sass/_keyframes.sass */
100% {
transform: translateY(-800px);
-webkit-transform: translateY(-800px);
-moz-transform: translateY(-800px);
-ms-transform: translateY(-800px);
-o-transform: translateY(-800px);
}
}
@keyframes vex-pulse {
/* line 104, ../sass/_keyframes.sass */
0% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
/* line 106, ../sass/_keyframes.sass */
70% {
-webkit-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
-moz-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
}
/* line 108, ../sass/_keyframes.sass */
100% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
}
@-webkit-keyframes vex-pulse {
/* line 104, ../sass/_keyframes.sass */
0% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
/* line 106, ../sass/_keyframes.sass */
70% {
-webkit-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
-moz-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
}
/* line 108, ../sass/_keyframes.sass */
100% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
}
@-moz-keyframes vex-pulse {
/* line 104, ../sass/_keyframes.sass */
0% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
/* line 106, ../sass/_keyframes.sass */
70% {
-webkit-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
-moz-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
}
/* line 108, ../sass/_keyframes.sass */
100% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
}
@-ms-keyframes vex-pulse {
/* line 104, ../sass/_keyframes.sass */
0% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
/* line 106, ../sass/_keyframes.sass */
70% {
-webkit-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
-moz-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
}
/* line 108, ../sass/_keyframes.sass */
100% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
}
@-o-keyframes vex-pulse {
/* line 104, ../sass/_keyframes.sass */
0% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
/* line 106, ../sass/_keyframes.sass */
70% {
-webkit-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
-moz-box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25);
}
/* line 108, ../sass/_keyframes.sass */
100% {
-webkit-box-shadow: inset 0 0 0 300px transparent;
-moz-box-shadow: inset 0 0 0 300px transparent;
box-shadow: inset 0 0 0 300px transparent;
}
}
/* line 15, ../sass/vex-theme-top.sass */
.vex.vex-theme-top.vex-closing .vex-content {
animation: vex-dropout 0.5s;
-webkit-animation: vex-dropout 0.5s;
-moz-animation: vex-dropout 0.5s;
-ms-animation: vex-dropout 0.5s;
-o-animation: vex-dropout 0.5s;
-webkit-backface-visibility: hidden;
}
/* line 18, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-content {
animation: vex-dropin 0.5s;
-webkit-animation: vex-dropin 0.5s;
-moz-animation: vex-dropin 0.5s;
-ms-animation: vex-dropin 0.5s;
-o-animation: vex-dropin 0.5s;
-webkit-backface-visibility: hidden;
}
/* line 21, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-content {
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-ms-border-radius: 0 0 5px 5px;
-o-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
font-family: "Helvetica Neue", sans-serif;
background: #f0f0f0;
color: #444444;
padding: 1em;
position: relative;
margin: 0 auto;
max-width: 100%;
width: 450px;
font-size: 1.1em;
line-height: 1.5em;
}
/* line 34, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-content h1, .vex.vex-theme-top .vex-content h2, .vex.vex-theme-top .vex-content h3, .vex.vex-theme-top .vex-content h4, .vex.vex-theme-top .vex-content h5, .vex.vex-theme-top .vex-content h6, .vex.vex-theme-top .vex-content p, .vex.vex-theme-top .vex-content ul, .vex.vex-theme-top .vex-content li {
color: inherit;
}
/* line 37, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-close {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
/* line 44, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-close:before {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
position: absolute;
content: "\00D7";
font-size: 26px;
font-weight: normal;
line-height: 31px;
height: 30px;
width: 30px;
text-align: center;
top: 3px;
right: 3px;
color: #bbbbbb;
background: transparent;
}
/* line 59, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-close:hover:before, .vex.vex-theme-top .vex-close:active:before {
color: #777777;
background: #e0e0e0;
}
/* line 65, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-form .vex-dialog-message {
margin-bottom: 0.5em;
}
/* line 68, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-form .vex-dialog-input {
margin-bottom: 1em;
}
/* line 71, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-form .vex-dialog-input textarea, .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="text"], .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="password"], .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="email"], .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="url"] {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
background: white;
width: 100%;
padding: 0.25em 0.67em;
border: 0;
font-family: inherit;
font-weight: inherit;
font-size: inherit;
min-height: 2.5em;
margin: 0 0 0.25em;
}
/* line 83, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-form .vex-dialog-input textarea:focus, .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="text"]:focus, .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="password"]:focus, .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="email"]:focus, .vex.vex-theme-top .vex-dialog-form .vex-dialog-input input[type="url"]:focus {
-webkit-box-shadow: inset 0 0 0 2px #8dbdf1;
-moz-box-shadow: inset 0 0 0 2px #8dbdf1;
box-shadow: inset 0 0 0 2px #8dbdf1;
outline: none;
}
/* line 87, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-form .vex-dialog-buttons {
*zoom: 1;
}
/* line 38, ../../../../../.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
.vex.vex-theme-top .vex-dialog-form .vex-dialog-buttons:after {
content: "";
display: table;
clear: both;
}
/* line 90, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-button {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
border: 0;
float: right;
margin: 0 0 0 0.5em;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
}
/* line 102, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-button.vex-last {
margin-left: 0;
}
/* line 105, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-button:focus {
animation: vex-pulse 1.1s infinite;
-webkit-animation: vex-pulse 1.1s infinite;
-moz-animation: vex-pulse 1.1s infinite;
-ms-animation: vex-pulse 1.1s infinite;
-o-animation: vex-pulse 1.1s infinite;
-webkit-backface-visibility: hidden;
outline: none;
}
@media (max-width: 568px) {
/* line 105, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-button:focus {
animation: none;
-webkit-animation: none;
-moz-animation: none;
-ms-animation: none;
-o-animation: none;
-webkit-backface-visibility: hidden;
}
}
/* line 114, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-button.vex-dialog-button-primary {
background: #3288e6;
color: white;
}
/* line 118, ../sass/vex-theme-top.sass */
.vex.vex-theme-top .vex-dialog-button.vex-dialog-button-secondary {
background: #e0e0e0;
color: #777777;
}
/* line 122, ../sass/vex-theme-top.sass */
.vex-loading-spinner.vex-theme-top {
-webkit-box-shadow: 0 0 0 0.5em #f0f0f0, 0 0 1px 0.5em rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 0 0 0.5em #f0f0f0, 0 0 1px 0.5em rgba(0, 0, 0, 0.3);
box-shadow: 0 0 0 0.5em #f0f0f0, 0 0 1px 0.5em rgba(0, 0, 0, 0.3);
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
-ms-border-radius: 100%;
-o-border-radius: 100%;
border-radius: 100%;
background: #f0f0f0;
border: 0.2em solid transparent;
border-top-color: #bbbbbb;
top: -1.1em;
bottom: auto;
}
| samthor/cdnjs | ajax/libs/vex-js/1.3.5/css/vex-theme-top.css | CSS | mit | 17,496 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
/**
* Transforms between a normalized format (integer or float) and a percentage value.
*
* @author Bernhard Schussek <bschussek@gmail.com>
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
*/
class PercentToLocalizedStringTransformer implements DataTransformerInterface
{
const FRACTIONAL = 'fractional';
const INTEGER = 'integer';
protected static $types = array(
self::FRACTIONAL,
self::INTEGER,
);
private $type;
private $precision;
/**
* Constructor.
*
* @see self::$types for a list of supported types
*
* @param integer $precision The precision
* @param string $type One of the supported types
*
* @throws UnexpectedTypeException if the given value of type is unknown
*/
public function __construct($precision = null, $type = null)
{
if (null === $precision) {
$precision = 0;
}
if (null === $type) {
$type = self::FRACTIONAL;
}
if (!in_array($type, self::$types, true)) {
throw new UnexpectedTypeException($type, implode('", "', self::$types));
}
$this->type = $type;
$this->precision = $precision;
}
/**
* Transforms between a normalized format (integer or float) into a percentage value.
*
* @param number $value Normalized value
*
* @return number Percentage value
*
* @throws UnexpectedTypeException if the given value is not numeric
* @throws TransformationFailedException if the value could not be transformed
*/
public function transform($value)
{
if (null === $value) {
return '';
}
if (!is_numeric($value)) {
throw new UnexpectedTypeException($value, 'numeric');
}
if (self::FRACTIONAL == $this->type) {
$value *= 100;
}
$formatter = $this->getNumberFormatter();
$value = $formatter->format($value);
if (intl_is_failure($formatter->getErrorCode())) {
throw new TransformationFailedException($formatter->getErrorMessage());
}
// replace the UTF-8 non break spaces
return $value;
}
/**
* Transforms between a percentage value into a normalized format (integer or float).
*
* @param number $value Percentage value.
*
* @return number Normalized value.
*
* @throws UnexpectedTypeException if the given value is not a string
* @throws TransformationFailedException if the value could not be transformed
*/
public function reverseTransform($value)
{
if (!is_string($value)) {
throw new UnexpectedTypeException($value, 'string');
}
if ('' === $value) {
return null;
}
$formatter = $this->getNumberFormatter();
// replace normal spaces so that the formatter can read them
$value = $formatter->parse(str_replace(' ', ' ', $value));
if (intl_is_failure($formatter->getErrorCode())) {
throw new TransformationFailedException($formatter->getErrorMessage());
}
if (self::FRACTIONAL == $this->type) {
$value /= 100;
}
return $value;
}
/**
* Returns a preconfigured \NumberFormatter instance
*
* @return \NumberFormatter
*/
protected function getNumberFormatter()
{
$formatter = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::DECIMAL);
$formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->precision);
return $formatter;
}
}
| schoolcompetition/compete | vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php | PHP | mit | 4,156 |
/* tslint:disable:no-unused-variable */
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
});
TestBed.compileComponents();
});
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
it(`should have as title 'app works!'`, async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app works!');
}));
it('should render title in a h1 tag', async(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('app works!');
}));
});
| acottais/VPNRouteSP | src/app/app.component.spec.ts | TypeScript | mit | 1,046 |
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.slider = {
name : 'slider',
version : '5.5.3',
settings : {
start : 0,
end : 100,
step : 1,
precision : 2,
initial : null,
display_selector : '',
vertical : false,
trigger_input_change : false,
on_change : function () {}
},
cache : {},
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle');
this.bindings(method, options);
this.reflow();
},
events : function () {
var self = this;
$(this.scope)
.off('.slider')
.on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
'[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-handle', function (e) {
if (!self.cache.active) {
e.preventDefault();
self.set_active_slider($(e.target));
}
})
.on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function (e) {
if (!!self.cache.active) {
e.preventDefault();
if ($.data(self.cache.active[0], 'settings').vertical) {
var scroll_offset = 0;
if (!e.pageY) {
scroll_offset = window.scrollY;
}
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
} else {
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
}
}
})
.on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
if(!self.cache.active) {
// if the user has just clicked into the slider without starting to drag the handle
var slider = $(e.target).attr('role') === 'slider' ? $(e.target) : $(e.target).closest('.range-slider').find("[role='slider']");
if (slider.length && (!slider.parent().hasClass('disabled') && !slider.parent().attr('disabled'))) {
self.set_active_slider(slider);
if ($.data(self.cache.active[0], 'settings').vertical) {
var scroll_offset = 0;
if (!e.pageY) {
scroll_offset = window.scrollY;
}
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
} else {
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
}
}
}
self.remove_active_slider();
})
.on('change.fndtn.slider', function (e) {
self.settings.on_change();
});
self.S(window)
.on('resize.fndtn.slider', self.throttle(function (e) {
self.reflow();
}, 300));
// update slider value as users change input value
this.S('[' + this.attr_name() + ']').each(function () {
var slider = $(this),
handle = slider.children('.range-slider-handle')[0],
settings = self.initialize_settings(handle);
if (settings.display_selector != '') {
$(settings.display_selector).each(function(){
if ($(this).attr('value')) {
$(this).off('change').on('change', function () {
slider.foundation("slider", "set_value", $(this).val());
});
}
});
}
});
},
get_cursor_position : function (e, xy) {
var pageXY = 'page' + xy.toUpperCase(),
clientXY = 'client' + xy.toUpperCase(),
position;
if (typeof e[pageXY] !== 'undefined') {
position = e[pageXY];
} else if (typeof e.originalEvent[clientXY] !== 'undefined') {
position = e.originalEvent[clientXY];
} else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0][clientXY] !== 'undefined') {
position = e.originalEvent.touches[0][clientXY];
} else if (e.currentPoint && typeof e.currentPoint[xy] !== 'undefined') {
position = e.currentPoint[xy];
}
return position;
},
set_active_slider : function ($handle) {
this.cache.active = $handle;
},
remove_active_slider : function () {
this.cache.active = null;
},
calculate_position : function ($handle, cursor_x) {
var self = this,
settings = $.data($handle[0], 'settings'),
handle_l = $.data($handle[0], 'handle_l'),
handle_o = $.data($handle[0], 'handle_o'),
bar_l = $.data($handle[0], 'bar_l'),
bar_o = $.data($handle[0], 'bar_o');
requestAnimationFrame(function () {
var pct;
if (Foundation.rtl && !settings.vertical) {
pct = self.limit_to(((bar_o + bar_l - cursor_x) / bar_l), 0, 1);
} else {
pct = self.limit_to(((cursor_x - bar_o) / bar_l), 0, 1);
}
pct = settings.vertical ? 1 - pct : pct;
var norm = self.normalized_value(pct, settings.start, settings.end, settings.step, settings.precision);
self.set_ui($handle, norm);
});
},
set_ui : function ($handle, value) {
var settings = $.data($handle[0], 'settings'),
handle_l = $.data($handle[0], 'handle_l'),
bar_l = $.data($handle[0], 'bar_l'),
norm_pct = this.normalized_percentage(value, settings.start, settings.end),
handle_offset = norm_pct * (bar_l - handle_l) - 1,
progress_bar_length = norm_pct * 100,
$handle_parent = $handle.parent(),
$hidden_inputs = $handle.parent().children('input[type=hidden]');
if (Foundation.rtl && !settings.vertical) {
handle_offset = -handle_offset;
}
handle_offset = settings.vertical ? -handle_offset + bar_l - handle_l + 1 : handle_offset;
this.set_translate($handle, handle_offset, settings.vertical);
if (settings.vertical) {
$handle.siblings('.range-slider-active-segment').css('height', progress_bar_length + '%');
} else {
$handle.siblings('.range-slider-active-segment').css('width', progress_bar_length + '%');
}
$handle_parent.attr(this.attr_name(), value).trigger('change.fndtn.slider');
$hidden_inputs.val(value);
if (settings.trigger_input_change) {
$hidden_inputs.trigger('change.fndtn.slider');
}
if (!$handle[0].hasAttribute('aria-valuemin')) {
$handle.attr({
'aria-valuemin' : settings.start,
'aria-valuemax' : settings.end
});
}
$handle.attr('aria-valuenow', value);
if (settings.display_selector != '') {
$(settings.display_selector).each(function () {
if (this.hasAttribute('value')) {
$(this).val(value);
} else {
$(this).text(value);
}
});
}
},
normalized_percentage : function (val, start, end) {
return Math.min(1, (val - start) / (end - start));
},
normalized_value : function (val, start, end, step, precision) {
var range = end - start,
point = val * range,
mod = (point - (point % step)) / step,
rem = point % step,
round = ( rem >= step * 0.5 ? step : 0);
return ((mod * step + round) + start).toFixed(precision);
},
set_translate : function (ele, offset, vertical) {
if (vertical) {
$(ele)
.css('-webkit-transform', 'translateY(' + offset + 'px)')
.css('-moz-transform', 'translateY(' + offset + 'px)')
.css('-ms-transform', 'translateY(' + offset + 'px)')
.css('-o-transform', 'translateY(' + offset + 'px)')
.css('transform', 'translateY(' + offset + 'px)');
} else {
$(ele)
.css('-webkit-transform', 'translateX(' + offset + 'px)')
.css('-moz-transform', 'translateX(' + offset + 'px)')
.css('-ms-transform', 'translateX(' + offset + 'px)')
.css('-o-transform', 'translateX(' + offset + 'px)')
.css('transform', 'translateX(' + offset + 'px)');
}
},
limit_to : function (val, min, max) {
return Math.min(Math.max(val, min), max);
},
initialize_settings : function (handle) {
var settings = $.extend({}, this.settings, this.data_options($(handle).parent())),
decimal_places_match_result;
if (settings.precision === null) {
decimal_places_match_result = ('' + settings.step).match(/\.([\d]*)/);
settings.precision = decimal_places_match_result && decimal_places_match_result[1] ? decimal_places_match_result[1].length : 0;
}
if (settings.vertical) {
$.data(handle, 'bar_o', $(handle).parent().offset().top);
$.data(handle, 'bar_l', $(handle).parent().outerHeight());
$.data(handle, 'handle_o', $(handle).offset().top);
$.data(handle, 'handle_l', $(handle).outerHeight());
} else {
$.data(handle, 'bar_o', $(handle).parent().offset().left);
$.data(handle, 'bar_l', $(handle).parent().outerWidth());
$.data(handle, 'handle_o', $(handle).offset().left);
$.data(handle, 'handle_l', $(handle).outerWidth());
}
$.data(handle, 'bar', $(handle).parent());
return $.data(handle, 'settings', settings);
},
set_initial_position : function ($ele) {
var settings = $.data($ele.children('.range-slider-handle')[0], 'settings'),
initial = ((typeof settings.initial == 'number' && !isNaN(settings.initial)) ? settings.initial : Math.floor((settings.end - settings.start) * 0.5 / settings.step) * settings.step + settings.start),
$handle = $ele.children('.range-slider-handle');
this.set_ui($handle, initial);
},
set_value : function (value) {
var self = this;
$('[' + self.attr_name() + ']', this.scope).each(function () {
$(this).attr(self.attr_name(), value);
});
if (!!$(this.scope).attr(self.attr_name())) {
$(this.scope).attr(self.attr_name(), value);
}
self.reflow();
},
reflow : function () {
var self = this;
self.S('[' + this.attr_name() + ']').each(function () {
var handle = $(this).children('.range-slider-handle')[0],
val = $(this).attr(self.attr_name());
self.initialize_settings(handle);
if (val) {
self.set_ui($(handle), parseFloat(val));
} else {
self.set_initial_position($(this));
}
});
}
};
}(jQuery, window, window.document));
| afrievalt/firefight | public/js/foundation/foundation.slider.js | JavaScript | mit | 10,659 |
/**
* @license AngularJS v1.2.26
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
/* jshint maxlen: false */
/**
* @ngdoc module
* @name ngAnimate
* @description
*
* # ngAnimate
*
* The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.
*
*
* <div doc-module-components="ngAnimate"></div>
*
* # Usage
*
* To see animations in action, all that is required is to define the appropriate CSS classes
* or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:
* `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
* by using the `$animate` service.
*
* Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:
*
* | Directive | Supported Animations |
* |---------------------------------------------------------- |----------------------------------------------------|
* | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move |
* | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave |
* | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave |
* | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave |
* | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave |
* | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove |
* | {@link ng.directive:ngShow#usage_animations ngShow & ngHide} | add and remove (the ng-hide class value) |
* | {@link ng.directive:form#usage_animations form} | add and remove (dirty, pristine, valid, invalid & all other validations) |
* | {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
*
* You can find out more information about animations upon visiting each directive page.
*
* Below is an example of how to apply animations to a directive that supports animation hooks:
*
* ```html
* <style type="text/css">
* .slide.ng-enter, .slide.ng-leave {
* -webkit-transition:0.5s linear all;
* transition:0.5s linear all;
* }
*
* .slide.ng-enter { } /* starting animations for enter */
* .slide.ng-enter.ng-enter-active { } /* terminal animations for enter */
* .slide.ng-leave { } /* starting animations for leave */
* .slide.ng-leave.ng-leave-active { } /* terminal animations for leave */
* </style>
*
* <!--
* the animate service will automatically add .ng-enter and .ng-leave to the element
* to trigger the CSS transition/animations
* -->
* <ANY class="slide" ng-include="..."></ANY>
* ```
*
* Keep in mind that, by default, if an animation is running, any child elements cannot be animated
* until the parent element's animation has completed. This blocking feature can be overridden by
* placing the `ng-animate-children` attribute on a parent container tag.
*
* ```html
* <div class="slide-animation" ng-if="on" ng-animate-children>
* <div class="fade-animation" ng-if="on">
* <div class="explode-animation" ng-if="on">
* ...
* </div>
* </div>
* </div>
* ```
*
* When the `on` expression value changes and an animation is triggered then each of the elements within
* will all animate without the block being applied to child elements.
*
* <h2>CSS-defined Animations</h2>
* The animate service will automatically apply two CSS classes to the animated element and these two CSS classes
* are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported
* and can be used to play along with this naming structure.
*
* The following code below demonstrates how to perform animations using **CSS transitions** with Angular:
*
* ```html
* <style type="text/css">
* /*
* The animate class is apart of the element and the ng-enter class
* is attached to the element once the enter animation event is triggered
* */
* .reveal-animation.ng-enter {
* -webkit-transition: 1s linear all; /* Safari/Chrome */
* transition: 1s linear all; /* All other modern browsers and IE10+ */
*
* /* The animation preparation code */
* opacity: 0;
* }
*
* /*
* Keep in mind that you want to combine both CSS
* classes together to avoid any CSS-specificity
* conflicts
* */
* .reveal-animation.ng-enter.ng-enter-active {
* /* The animation code itself */
* opacity: 1;
* }
* </style>
*
* <div class="view-container">
* <div ng-view class="reveal-animation"></div>
* </div>
* ```
*
* The following code below demonstrates how to perform animations using **CSS animations** with Angular:
*
* ```html
* <style type="text/css">
* .reveal-animation.ng-enter {
* -webkit-animation: enter_sequence 1s linear; /* Safari/Chrome */
* animation: enter_sequence 1s linear; /* IE10+ and Future Browsers */
* }
* @-webkit-keyframes enter_sequence {
* from { opacity:0; }
* to { opacity:1; }
* }
* @keyframes enter_sequence {
* from { opacity:0; }
* to { opacity:1; }
* }
* </style>
*
* <div class="view-container">
* <div ng-view class="reveal-animation"></div>
* </div>
* ```
*
* Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.
*
* Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add
* the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically
* detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be
* removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end
* immediately resulting in a DOM element that is at its final state. This final state is when the DOM element
* has no CSS transition/animation classes applied to it.
*
* <h3>CSS Staggering Animations</h3>
* A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
* curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be
* performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for
* the animation. The style property expected within the stagger class can either be a **transition-delay** or an
* **animation-delay** property (or both if your animation contains both transitions and keyframe animations).
*
* ```css
* .my-animation.ng-enter {
* /* standard transition code */
* -webkit-transition: 1s linear all;
* transition: 1s linear all;
* opacity:0;
* }
* .my-animation.ng-enter-stagger {
* /* this will have a 100ms delay between each successive leave animation */
* -webkit-transition-delay: 0.1s;
* transition-delay: 0.1s;
*
* /* in case the stagger doesn't work then these two values
* must be set to 0 to avoid an accidental CSS inheritance */
* -webkit-transition-duration: 0s;
* transition-duration: 0s;
* }
* .my-animation.ng-enter.ng-enter-active {
* /* standard transition styles */
* opacity:1;
* }
* ```
*
* Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations
* on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this
* are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation
* will also be reset if more than 10ms has passed after the last animation has been fired.
*
* The following code will issue the **ng-leave-stagger** event on the element provided:
*
* ```js
* var kids = parent.children();
*
* $animate.leave(kids[0]); //stagger index=0
* $animate.leave(kids[1]); //stagger index=1
* $animate.leave(kids[2]); //stagger index=2
* $animate.leave(kids[3]); //stagger index=3
* $animate.leave(kids[4]); //stagger index=4
*
* $timeout(function() {
* //stagger has reset itself
* $animate.leave(kids[5]); //stagger index=0
* $animate.leave(kids[6]); //stagger index=1
* }, 100, false);
* ```
*
* Stagger animations are currently only supported within CSS-defined animations.
*
* <h2>JavaScript-defined Animations</h2>
* In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not
* yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.
*
* ```js
* //!annotate="YourApp" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.
* var ngModule = angular.module('YourApp', ['ngAnimate']);
* ngModule.animation('.my-crazy-animation', function() {
* return {
* enter: function(element, done) {
* //run the animation here and call done when the animation is complete
* return function(cancelled) {
* //this (optional) function will be called when the animation
* //completes or when the animation is cancelled (the cancelled
* //flag will be set to true if cancelled).
* };
* },
* leave: function(element, done) { },
* move: function(element, done) { },
*
* //animation that can be triggered before the class is added
* beforeAddClass: function(element, className, done) { },
*
* //animation that can be triggered after the class is added
* addClass: function(element, className, done) { },
*
* //animation that can be triggered before the class is removed
* beforeRemoveClass: function(element, className, done) { },
*
* //animation that can be triggered after the class is removed
* removeClass: function(element, className, done) { }
* };
* });
* ```
*
* JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run
* a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits
* the element's CSS class attribute value and then run the matching animation event function (if found).
* In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will
* be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).
*
* Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.
* As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,
* and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation
* or transition code that is defined via a stylesheet).
*
*/
angular.module('ngAnimate', ['ng'])
/**
* @ngdoc provider
* @name $animateProvider
* @description
*
* The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.
* When an animation is triggered, the $animate service will query the $animate service to find any animations that match
* the provided name value.
*
* Requires the {@link ngAnimate `ngAnimate`} module to be installed.
*
* Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
*
*/
.directive('ngAnimateChildren', function() {
var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';
return function(scope, element, attrs) {
var val = attrs.ngAnimateChildren;
if(angular.isString(val) && val.length === 0) { //empty attribute
element.data(NG_ANIMATE_CHILDREN, true);
} else {
scope.$watch(val, function(value) {
element.data(NG_ANIMATE_CHILDREN, !!value);
});
}
};
})
//this private service is only used within CSS-enabled animations
//IE8 + IE9 do not support rAF natively, but that is fine since they
//also don't support transitions and keyframes which means that the code
//below will never be used by the two browsers.
.factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) {
var bod = $document[0].body;
return function(fn) {
//the returned function acts as the cancellation function
return $$rAF(function() {
//the line below will force the browser to perform a repaint
//so that all the animated elements within the animation frame
//will be properly updated and drawn on screen. This is
//required to perform multi-class CSS based animations with
//Firefox. DO NOT REMOVE THIS LINE.
var a = bod.offsetWidth + 1;
fn();
});
};
}])
.config(['$provide', '$animateProvider', function($provide, $animateProvider) {
var noop = angular.noop;
var forEach = angular.forEach;
var selectors = $animateProvider.$$selectors;
var ELEMENT_NODE = 1;
var NG_ANIMATE_STATE = '$$ngAnimateState';
var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';
var NG_ANIMATE_CLASS_NAME = 'ng-animate';
var rootAnimateState = {running: true};
function extractElementNode(element) {
for(var i = 0; i < element.length; i++) {
var elm = element[i];
if(elm.nodeType == ELEMENT_NODE) {
return elm;
}
}
}
function prepareElement(element) {
return element && angular.element(element);
}
function stripCommentsFromElement(element) {
return angular.element(extractElementNode(element));
}
function isMatchingElement(elm1, elm2) {
return extractElementNode(elm1) == extractElementNode(elm2);
}
$provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document',
function($delegate, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document) {
var globalAnimationCounter = 0;
$rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
// disable animations during bootstrap, but once we bootstrapped, wait again
// for another digest until enabling animations. The reason why we digest twice
// is because all structural animations (enter, leave and move) all perform a
// post digest operation before animating. If we only wait for a single digest
// to pass then the structural animation would render its animation on page load.
// (which is what we're trying to avoid when the application first boots up.)
$rootScope.$$postDigest(function() {
$rootScope.$$postDigest(function() {
rootAnimateState.running = false;
});
});
var classNameFilter = $animateProvider.classNameFilter();
var isAnimatableClassName = !classNameFilter
? function() { return true; }
: function(className) {
return classNameFilter.test(className);
};
function blockElementAnimations(element) {
var data = element.data(NG_ANIMATE_STATE) || {};
data.running = true;
element.data(NG_ANIMATE_STATE, data);
}
function lookup(name) {
if (name) {
var matches = [],
flagMap = {},
classes = name.substr(1).split('.');
//the empty string value is the default animation
//operation which performs CSS transition and keyframe
//animations sniffing. This is always included for each
//element animation procedure if the browser supports
//transitions and/or keyframe animations. The default
//animation is added to the top of the list to prevent
//any previous animations from affecting the element styling
//prior to the element being animated.
if ($sniffer.transitions || $sniffer.animations) {
matches.push($injector.get(selectors['']));
}
for(var i=0; i < classes.length; i++) {
var klass = classes[i],
selectorFactoryName = selectors[klass];
if(selectorFactoryName && !flagMap[klass]) {
matches.push($injector.get(selectorFactoryName));
flagMap[klass] = true;
}
}
return matches;
}
}
function animationRunner(element, animationEvent, className) {
//transcluded directives may sometimes fire an animation using only comment nodes
//best to catch this early on to prevent any animation operations from occurring
var node = element[0];
if(!node) {
return;
}
var isSetClassOperation = animationEvent == 'setClass';
var isClassBased = isSetClassOperation ||
animationEvent == 'addClass' ||
animationEvent == 'removeClass';
var classNameAdd, classNameRemove;
if(angular.isArray(className)) {
classNameAdd = className[0];
classNameRemove = className[1];
className = classNameAdd + ' ' + classNameRemove;
}
var currentClassName = element.attr('class');
var classes = currentClassName + ' ' + className;
if(!isAnimatableClassName(classes)) {
return;
}
var beforeComplete = noop,
beforeCancel = [],
before = [],
afterComplete = noop,
afterCancel = [],
after = [];
var animationLookup = (' ' + classes).replace(/\s+/g,'.');
forEach(lookup(animationLookup), function(animationFactory) {
var created = registerAnimation(animationFactory, animationEvent);
if(!created && isSetClassOperation) {
registerAnimation(animationFactory, 'addClass');
registerAnimation(animationFactory, 'removeClass');
}
});
function registerAnimation(animationFactory, event) {
var afterFn = animationFactory[event];
var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)];
if(afterFn || beforeFn) {
if(event == 'leave') {
beforeFn = afterFn;
//when set as null then animation knows to skip this phase
afterFn = null;
}
after.push({
event : event, fn : afterFn
});
before.push({
event : event, fn : beforeFn
});
return true;
}
}
function run(fns, cancellations, allCompleteFn) {
var animations = [];
forEach(fns, function(animation) {
animation.fn && animations.push(animation);
});
var count = 0;
function afterAnimationComplete(index) {
if(cancellations) {
(cancellations[index] || noop)();
if(++count < animations.length) return;
cancellations = null;
}
allCompleteFn();
}
//The code below adds directly to the array in order to work with
//both sync and async animations. Sync animations are when the done()
//operation is called right away. DO NOT REFACTOR!
forEach(animations, function(animation, index) {
var progress = function() {
afterAnimationComplete(index);
};
switch(animation.event) {
case 'setClass':
cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress));
break;
case 'addClass':
cancellations.push(animation.fn(element, classNameAdd || className, progress));
break;
case 'removeClass':
cancellations.push(animation.fn(element, classNameRemove || className, progress));
break;
default:
cancellations.push(animation.fn(element, progress));
break;
}
});
if(cancellations && cancellations.length === 0) {
allCompleteFn();
}
}
return {
node : node,
event : animationEvent,
className : className,
isClassBased : isClassBased,
isSetClassOperation : isSetClassOperation,
before : function(allCompleteFn) {
beforeComplete = allCompleteFn;
run(before, beforeCancel, function() {
beforeComplete = noop;
allCompleteFn();
});
},
after : function(allCompleteFn) {
afterComplete = allCompleteFn;
run(after, afterCancel, function() {
afterComplete = noop;
allCompleteFn();
});
},
cancel : function() {
if(beforeCancel) {
forEach(beforeCancel, function(cancelFn) {
(cancelFn || noop)(true);
});
beforeComplete(true);
}
if(afterCancel) {
forEach(afterCancel, function(cancelFn) {
(cancelFn || noop)(true);
});
afterComplete(true);
}
}
};
}
/**
* @ngdoc service
* @name $animate
* @kind function
*
* @description
* The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.
* When any of these operations are run, the $animate service
* will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)
* as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.
*
* The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives
* will work out of the box without any extra configuration.
*
* Requires the {@link ngAnimate `ngAnimate`} module to be installed.
*
* Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
*
*/
return {
/**
* @ngdoc method
* @name $animate#enter
* @kind function
*
* @description
* Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once
* the animation is started, the following CSS classes will be present on the element for the duration of the animation:
*
* Below is a breakdown of each step that occurs during enter animation:
*
* | Animation Step | What the element class attribute looks like |
* |----------------------------------------------------------------------------------------------|---------------------------------------------|
* | 1. $animate.enter(...) is called | class="my-animation" |
* | 2. element is inserted into the parentElement element or beside the afterElement element | class="my-animation" |
* | 3. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" |
* | 4. the .ng-enter class is added to the element | class="my-animation ng-animate ng-enter" |
* | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-enter" |
* | 6. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate ng-enter" |
* | 7. the .ng-enter-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-enter ng-enter-active" |
* | 8. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active ng-enter ng-enter-active" |
* | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation" |
*
* @param {DOMElement} element the element that will be the focus of the enter animation
* @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation
* @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
enter : function(element, parentElement, afterElement, doneCallback) {
element = angular.element(element);
parentElement = prepareElement(parentElement);
afterElement = prepareElement(afterElement);
blockElementAnimations(element);
$delegate.enter(element, parentElement, afterElement);
$rootScope.$$postDigest(function() {
element = stripCommentsFromElement(element);
performAnimation('enter', 'ng-enter', element, parentElement, afterElement, noop, doneCallback);
});
},
/**
* @ngdoc method
* @name $animate#leave
* @kind function
*
* @description
* Runs the leave animation operation and, upon completion, removes the element from the DOM. Once
* the animation is started, the following CSS classes will be added for the duration of the animation:
*
* Below is a breakdown of each step that occurs during leave animation:
*
* | Animation Step | What the element class attribute looks like |
* |----------------------------------------------------------------------------------------------|---------------------------------------------|
* | 1. $animate.leave(...) is called | class="my-animation" |
* | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" |
* | 3. the .ng-leave class is added to the element | class="my-animation ng-animate ng-leave" |
* | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-leave" |
* | 5. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate ng-leave" |
* | 6. the .ng-leave-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-leave ng-leave-active" |
* | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active ng-leave ng-leave-active" |
* | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
* | 9. The element is removed from the DOM | ... |
* | 10. The doneCallback() callback is fired (if provided) | ... |
*
* @param {DOMElement} element the element that will be the focus of the leave animation
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
leave : function(element, doneCallback) {
element = angular.element(element);
cancelChildAnimations(element);
blockElementAnimations(element);
$rootScope.$$postDigest(function() {
performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() {
$delegate.leave(element);
}, doneCallback);
});
},
/**
* @ngdoc method
* @name $animate#move
* @kind function
*
* @description
* Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or
* add the element directly after the afterElement element if present. Then the move animation will be run. Once
* the animation is started, the following CSS classes will be added for the duration of the animation:
*
* Below is a breakdown of each step that occurs during move animation:
*
* | Animation Step | What the element class attribute looks like |
* |----------------------------------------------------------------------------------------------|---------------------------------------------|
* | 1. $animate.move(...) is called | class="my-animation" |
* | 2. element is moved into the parentElement element or beside the afterElement element | class="my-animation" |
* | 3. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" |
* | 4. the .ng-move class is added to the element | class="my-animation ng-animate ng-move" |
* | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate ng-move" |
* | 6. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate ng-move" |
* | 7. the .ng-move-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-move ng-move-active" |
* | 8. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active ng-move ng-move-active" |
* | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation" |
*
* @param {DOMElement} element the element that will be the focus of the move animation
* @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation
* @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
move : function(element, parentElement, afterElement, doneCallback) {
element = angular.element(element);
parentElement = prepareElement(parentElement);
afterElement = prepareElement(afterElement);
cancelChildAnimations(element);
blockElementAnimations(element);
$delegate.move(element, parentElement, afterElement);
$rootScope.$$postDigest(function() {
element = stripCommentsFromElement(element);
performAnimation('move', 'ng-move', element, parentElement, afterElement, noop, doneCallback);
});
},
/**
* @ngdoc method
* @name $animate#addClass
*
* @description
* Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.
* Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide
* the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions
* or keyframes are defined on the -add or base CSS class).
*
* Below is a breakdown of each step that occurs during addClass animation:
*
* | Animation Step | What the element class attribute looks like |
* |------------------------------------------------------------------------------------------------|---------------------------------------------|
* | 1. $animate.addClass(element, 'super') is called | class="my-animation" |
* | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation ng-animate" |
* | 3. the .super-add class are added to the element | class="my-animation ng-animate super-add" |
* | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation ng-animate super-add" |
* | 5. $animate waits for 10ms (this performs a reflow) | class="my-animation ng-animate super-add" |
* | 6. the .super, .super-add-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active super super-add super-add-active" |
* | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation super super-add super-add-active" |
* | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation super" |
* | 9. The super class is kept on the element | class="my-animation super" |
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation super" |
*
* @param {DOMElement} element the element that will be animated
* @param {string} className the CSS class that will be added to the element and then animated
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
addClass : function(element, className, doneCallback) {
element = angular.element(element);
element = stripCommentsFromElement(element);
performAnimation('addClass', className, element, null, null, function() {
$delegate.addClass(element, className);
}, doneCallback);
},
/**
* @ngdoc method
* @name $animate#removeClass
*
* @description
* Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value
* from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in
* order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if
* no CSS transitions or keyframes are defined on the -remove or base CSS classes).
*
* Below is a breakdown of each step that occurs during removeClass animation:
*
* | Animation Step | What the element class attribute looks like |
* |-----------------------------------------------------------------------------------------------|---------------------------------------------|
* | 1. $animate.removeClass(element, 'super') is called | class="my-animation super" |
* | 2. $animate runs any JavaScript-defined animations on the element | class="my-animation super ng-animate" |
* | 3. the .super-remove class are added to the element | class="my-animation super ng-animate super-remove"|
* | 4. $animate scans the element styles to get the CSS transition/animation duration and delay | class="my-animation super ng-animate super-remove" |
* | 5. $animate waits for 10ms (this performs a reflow) | class="my-animation super ng-animate super-remove" |
* | 6. the .super-remove-active and .ng-animate-active classes are added and .super is removed (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active super-remove super-remove-active" |
* | 7. $animate waits for X milliseconds for the animation to complete | class="my-animation ng-animate ng-animate-active super-remove super-remove-active" |
* | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
* | 9. The doneCallback() callback is fired (if provided) | class="my-animation" |
*
*
* @param {DOMElement} element the element that will be animated
* @param {string} className the CSS class that will be animated and then removed from the element
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
removeClass : function(element, className, doneCallback) {
element = angular.element(element);
element = stripCommentsFromElement(element);
performAnimation('removeClass', className, element, null, null, function() {
$delegate.removeClass(element, className);
}, doneCallback);
},
/**
*
* @ngdoc function
* @name $animate#setClass
* @function
* @description Adds and/or removes the given CSS classes to and from the element.
* Once complete, the done() callback will be fired (if provided).
* @param {DOMElement} element the element which will its CSS classes changed
* removed from it
* @param {string} add the CSS classes which will be added to the element
* @param {string} remove the CSS class which will be removed from the element
* @param {Function=} done the callback function (if provided) that will be fired after the
* CSS classes have been set on the element
*/
setClass : function(element, add, remove, doneCallback) {
element = angular.element(element);
element = stripCommentsFromElement(element);
performAnimation('setClass', [add, remove], element, null, null, function() {
$delegate.setClass(element, add, remove);
}, doneCallback);
},
/**
* @ngdoc method
* @name $animate#enabled
* @kind function
*
* @param {boolean=} value If provided then set the animation on or off.
* @param {DOMElement=} element If provided then the element will be used to represent the enable/disable operation
* @return {boolean} Current animation state.
*
* @description
* Globally enables/disables animations.
*
*/
enabled : function(value, element) {
switch(arguments.length) {
case 2:
if(value) {
cleanup(element);
} else {
var data = element.data(NG_ANIMATE_STATE) || {};
data.disabled = true;
element.data(NG_ANIMATE_STATE, data);
}
break;
case 1:
rootAnimateState.disabled = !value;
break;
default:
value = !rootAnimateState.disabled;
break;
}
return !!value;
}
};
/*
all animations call this shared animation triggering function internally.
The animationEvent variable refers to the JavaScript animation event that will be triggered
and the className value is the name of the animation that will be applied within the
CSS code. Element, parentElement and afterElement are provided DOM elements for the animation
and the onComplete callback will be fired once the animation is fully complete.
*/
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
var runner = animationRunner(element, animationEvent, className);
if(!runner) {
fireDOMOperation();
fireBeforeCallbackAsync();
fireAfterCallbackAsync();
closeAnimation();
return;
}
className = runner.className;
var elementEvents = angular.element._data(runner.node);
elementEvents = elementEvents && elementEvents.events;
if (!parentElement) {
parentElement = afterElement ? afterElement.parent() : element.parent();
}
var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};
var runningAnimations = ngAnimateState.active || {};
var totalActiveAnimations = ngAnimateState.totalActive || 0;
var lastAnimation = ngAnimateState.last;
//only allow animations if the currently running animation is not structural
//or if there is no animation running at all
var skipAnimations;
if (runner.isClassBased) {
skipAnimations = ngAnimateState.running ||
ngAnimateState.disabled ||
(lastAnimation && !lastAnimation.isClassBased);
}
//skip the animation if animations are disabled, a parent is already being animated,
//the element is not currently attached to the document body or then completely close
//the animation if any matching animations are not found at all.
//NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found.
if (skipAnimations || animationsDisabled(element, parentElement)) {
fireDOMOperation();
fireBeforeCallbackAsync();
fireAfterCallbackAsync();
closeAnimation();
return;
}
var skipAnimation = false;
if(totalActiveAnimations > 0) {
var animationsToCancel = [];
if(!runner.isClassBased) {
if(animationEvent == 'leave' && runningAnimations['ng-leave']) {
skipAnimation = true;
} else {
//cancel all animations when a structural animation takes place
for(var klass in runningAnimations) {
animationsToCancel.push(runningAnimations[klass]);
cleanup(element, klass);
}
runningAnimations = {};
totalActiveAnimations = 0;
}
} else if(lastAnimation.event == 'setClass') {
animationsToCancel.push(lastAnimation);
cleanup(element, className);
}
else if(runningAnimations[className]) {
var current = runningAnimations[className];
if(current.event == animationEvent) {
skipAnimation = true;
} else {
animationsToCancel.push(current);
cleanup(element, className);
}
}
if(animationsToCancel.length > 0) {
forEach(animationsToCancel, function(operation) {
operation.cancel();
});
}
}
if(runner.isClassBased && !runner.isSetClassOperation && !skipAnimation) {
skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR
}
if(skipAnimation) {
fireDOMOperation();
fireBeforeCallbackAsync();
fireAfterCallbackAsync();
fireDoneCallbackAsync();
return;
}
if(animationEvent == 'leave') {
//there's no need to ever remove the listener since the element
//will be removed (destroyed) after the leave animation ends or
//is cancelled midway
element.one('$destroy', function(e) {
var element = angular.element(this);
var state = element.data(NG_ANIMATE_STATE);
if(state) {
var activeLeaveAnimation = state.active['ng-leave'];
if(activeLeaveAnimation) {
activeLeaveAnimation.cancel();
cleanup(element, 'ng-leave');
}
}
});
}
//the ng-animate class does nothing, but it's here to allow for
//parent animations to find and cancel child animations when needed
element.addClass(NG_ANIMATE_CLASS_NAME);
var localAnimationCount = globalAnimationCounter++;
totalActiveAnimations++;
runningAnimations[className] = runner;
element.data(NG_ANIMATE_STATE, {
last : runner,
active : runningAnimations,
index : localAnimationCount,
totalActive : totalActiveAnimations
});
//first we run the before animations and when all of those are complete
//then we perform the DOM operation and run the next set of animations
fireBeforeCallbackAsync();
runner.before(function(cancelled) {
var data = element.data(NG_ANIMATE_STATE);
cancelled = cancelled ||
!data || !data.active[className] ||
(runner.isClassBased && data.active[className].event != animationEvent);
fireDOMOperation();
if(cancelled === true) {
closeAnimation();
} else {
fireAfterCallbackAsync();
runner.after(closeAnimation);
}
});
function fireDOMCallback(animationPhase) {
var eventName = '$animate:' + animationPhase;
if(elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) {
$$asyncCallback(function() {
element.triggerHandler(eventName, {
event : animationEvent,
className : className
});
});
}
}
function fireBeforeCallbackAsync() {
fireDOMCallback('before');
}
function fireAfterCallbackAsync() {
fireDOMCallback('after');
}
function fireDoneCallbackAsync() {
fireDOMCallback('close');
if(doneCallback) {
$$asyncCallback(function() {
doneCallback();
});
}
}
//it is less complicated to use a flag than managing and canceling
//timeouts containing multiple callbacks.
function fireDOMOperation() {
if(!fireDOMOperation.hasBeenRun) {
fireDOMOperation.hasBeenRun = true;
domOperation();
}
}
function closeAnimation() {
if(!closeAnimation.hasBeenRun) {
closeAnimation.hasBeenRun = true;
var data = element.data(NG_ANIMATE_STATE);
if(data) {
/* only structural animations wait for reflow before removing an
animation, but class-based animations don't. An example of this
failing would be when a parent HTML tag has a ng-class attribute
causing ALL directives below to skip animations during the digest */
if(runner && runner.isClassBased) {
cleanup(element, className);
} else {
$$asyncCallback(function() {
var data = element.data(NG_ANIMATE_STATE) || {};
if(localAnimationCount == data.index) {
cleanup(element, className, animationEvent);
}
});
element.data(NG_ANIMATE_STATE, data);
}
}
fireDoneCallbackAsync();
}
}
}
function cancelChildAnimations(element) {
var node = extractElementNode(element);
if (node) {
var nodes = angular.isFunction(node.getElementsByClassName) ?
node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :
node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);
forEach(nodes, function(element) {
element = angular.element(element);
var data = element.data(NG_ANIMATE_STATE);
if(data && data.active) {
forEach(data.active, function(runner) {
runner.cancel();
});
}
});
}
}
function cleanup(element, className) {
if(isMatchingElement(element, $rootElement)) {
if(!rootAnimateState.disabled) {
rootAnimateState.running = false;
rootAnimateState.structural = false;
}
} else if(className) {
var data = element.data(NG_ANIMATE_STATE) || {};
var removeAnimations = className === true;
if(!removeAnimations && data.active && data.active[className]) {
data.totalActive--;
delete data.active[className];
}
if(removeAnimations || !data.totalActive) {
element.removeClass(NG_ANIMATE_CLASS_NAME);
element.removeData(NG_ANIMATE_STATE);
}
}
}
function animationsDisabled(element, parentElement) {
if (rootAnimateState.disabled) {
return true;
}
if (isMatchingElement(element, $rootElement)) {
return rootAnimateState.running;
}
var allowChildAnimations, parentRunningAnimation, hasParent;
do {
//the element did not reach the root element which means that it
//is not apart of the DOM. Therefore there is no reason to do
//any animations on it
if (parentElement.length === 0) break;
var isRoot = isMatchingElement(parentElement, $rootElement);
var state = isRoot ? rootAnimateState : (parentElement.data(NG_ANIMATE_STATE) || {});
if (state.disabled) {
return true;
}
//no matter what, for an animation to work it must reach the root element
//this implies that the element is attached to the DOM when the animation is run
if (isRoot) {
hasParent = true;
}
//once a flag is found that is strictly false then everything before
//it will be discarded and all child animations will be restricted
if (allowChildAnimations !== false) {
var animateChildrenFlag = parentElement.data(NG_ANIMATE_CHILDREN);
if(angular.isDefined(animateChildrenFlag)) {
allowChildAnimations = animateChildrenFlag;
}
}
parentRunningAnimation = parentRunningAnimation ||
state.running ||
(state.last && !state.last.isClassBased);
}
while(parentElement = parentElement.parent());
return !hasParent || (!allowChildAnimations && parentRunningAnimation);
}
}]);
$animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',
function($window, $sniffer, $timeout, $$animateReflow) {
// Detect proper transitionend/animationend event names.
var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
// If unprefixed events are not supported but webkit-prefixed are, use the latter.
// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
// Register both events in case `window.onanimationend` is not supported because of that,
// do the same for `transitionend` as Safari is likely to exhibit similar behavior.
// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
// therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition
if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
CSS_PREFIX = '-webkit-';
TRANSITION_PROP = 'WebkitTransition';
TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
} else {
TRANSITION_PROP = 'transition';
TRANSITIONEND_EVENT = 'transitionend';
}
if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
CSS_PREFIX = '-webkit-';
ANIMATION_PROP = 'WebkitAnimation';
ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
} else {
ANIMATION_PROP = 'animation';
ANIMATIONEND_EVENT = 'animationend';
}
var DURATION_KEY = 'Duration';
var PROPERTY_KEY = 'Property';
var DELAY_KEY = 'Delay';
var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';
var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';
var NG_ANIMATE_BLOCK_CLASS_NAME = 'ng-animate-block-transitions';
var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;
var CLOSING_TIME_BUFFER = 1.5;
var ONE_SECOND = 1000;
var lookupCache = {};
var parentCounter = 0;
var animationReflowQueue = [];
var cancelAnimationReflow;
function afterReflow(element, callback) {
if(cancelAnimationReflow) {
cancelAnimationReflow();
}
animationReflowQueue.push(callback);
cancelAnimationReflow = $$animateReflow(function() {
forEach(animationReflowQueue, function(fn) {
fn();
});
animationReflowQueue = [];
cancelAnimationReflow = null;
lookupCache = {};
});
}
var closingTimer = null;
var closingTimestamp = 0;
var animationElementQueue = [];
function animationCloseHandler(element, totalTime) {
var node = extractElementNode(element);
element = angular.element(node);
//this item will be garbage collected by the closing
//animation timeout
animationElementQueue.push(element);
//but it may not need to cancel out the existing timeout
//if the timestamp is less than the previous one
var futureTimestamp = Date.now() + totalTime;
if(futureTimestamp <= closingTimestamp) {
return;
}
$timeout.cancel(closingTimer);
closingTimestamp = futureTimestamp;
closingTimer = $timeout(function() {
closeAllAnimations(animationElementQueue);
animationElementQueue = [];
}, totalTime, false);
}
function closeAllAnimations(elements) {
forEach(elements, function(element) {
var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
if(elementData) {
(elementData.closeAnimationFn || noop)();
}
});
}
function getElementAnimationDetails(element, cacheKey) {
var data = cacheKey ? lookupCache[cacheKey] : null;
if(!data) {
var transitionDuration = 0;
var transitionDelay = 0;
var animationDuration = 0;
var animationDelay = 0;
var transitionDelayStyle;
var animationDelayStyle;
var transitionDurationStyle;
var transitionPropertyStyle;
//we want all the styles defined before and after
forEach(element, function(element) {
if (element.nodeType == ELEMENT_NODE) {
var elementStyles = $window.getComputedStyle(element) || {};
transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];
transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);
transitionPropertyStyle = elementStyles[TRANSITION_PROP + PROPERTY_KEY];
transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];
transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);
animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];
animationDelay = Math.max(parseMaxTime(animationDelayStyle), animationDelay);
var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);
if(aDuration > 0) {
aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;
}
animationDuration = Math.max(aDuration, animationDuration);
}
});
data = {
total : 0,
transitionPropertyStyle: transitionPropertyStyle,
transitionDurationStyle: transitionDurationStyle,
transitionDelayStyle: transitionDelayStyle,
transitionDelay: transitionDelay,
transitionDuration: transitionDuration,
animationDelayStyle: animationDelayStyle,
animationDelay: animationDelay,
animationDuration: animationDuration
};
if(cacheKey) {
lookupCache[cacheKey] = data;
}
}
return data;
}
function parseMaxTime(str) {
var maxValue = 0;
var values = angular.isString(str) ?
str.split(/\s*,\s*/) :
[];
forEach(values, function(value) {
maxValue = Math.max(parseFloat(value) || 0, maxValue);
});
return maxValue;
}
function getCacheKey(element) {
var parentElement = element.parent();
var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);
if(!parentID) {
parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);
parentID = parentCounter;
}
return parentID + '-' + extractElementNode(element).getAttribute('class');
}
function animateSetup(animationEvent, element, className, calculationDecorator) {
var cacheKey = getCacheKey(element);
var eventCacheKey = cacheKey + ' ' + className;
var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;
var stagger = {};
if(itemIndex > 0) {
var staggerClassName = className + '-stagger';
var staggerCacheKey = cacheKey + ' ' + staggerClassName;
var applyClasses = !lookupCache[staggerCacheKey];
applyClasses && element.addClass(staggerClassName);
stagger = getElementAnimationDetails(element, staggerCacheKey);
applyClasses && element.removeClass(staggerClassName);
}
/* the animation itself may need to add/remove special CSS classes
* before calculating the anmation styles */
calculationDecorator = calculationDecorator ||
function(fn) { return fn(); };
element.addClass(className);
var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};
var timings = calculationDecorator(function() {
return getElementAnimationDetails(element, eventCacheKey);
});
var transitionDuration = timings.transitionDuration;
var animationDuration = timings.animationDuration;
if(transitionDuration === 0 && animationDuration === 0) {
element.removeClass(className);
return false;
}
element.data(NG_ANIMATE_CSS_DATA_KEY, {
running : formerData.running || 0,
itemIndex : itemIndex,
stagger : stagger,
timings : timings,
closeAnimationFn : noop
});
//temporarily disable the transition so that the enter styles
//don't animate twice (this is here to avoid a bug in Chrome/FF).
var isCurrentlyAnimating = formerData.running > 0 || animationEvent == 'setClass';
if(transitionDuration > 0) {
blockTransitions(element, className, isCurrentlyAnimating);
}
//staggering keyframe animations work by adjusting the `animation-delay` CSS property
//on the given element, however, the delay value can only calculated after the reflow
//since by that time $animate knows how many elements are being animated. Therefore,
//until the reflow occurs the element needs to be blocked (where the keyframe animation
//is set to `none 0s`). This blocking mechanism should only be set for when a stagger
//animation is detected and when the element item index is greater than 0.
if(animationDuration > 0 && stagger.animationDelay > 0 && stagger.animationDuration === 0) {
blockKeyframeAnimations(element);
}
return true;
}
function isStructuralAnimation(className) {
return className == 'ng-enter' || className == 'ng-move' || className == 'ng-leave';
}
function blockTransitions(element, className, isAnimating) {
if(isStructuralAnimation(className) || !isAnimating) {
extractElementNode(element).style[TRANSITION_PROP + PROPERTY_KEY] = 'none';
} else {
element.addClass(NG_ANIMATE_BLOCK_CLASS_NAME);
}
}
function blockKeyframeAnimations(element) {
extractElementNode(element).style[ANIMATION_PROP] = 'none 0s';
}
function unblockTransitions(element, className) {
var prop = TRANSITION_PROP + PROPERTY_KEY;
var node = extractElementNode(element);
if(node.style[prop] && node.style[prop].length > 0) {
node.style[prop] = '';
}
element.removeClass(NG_ANIMATE_BLOCK_CLASS_NAME);
}
function unblockKeyframeAnimations(element) {
var prop = ANIMATION_PROP;
var node = extractElementNode(element);
if(node.style[prop] && node.style[prop].length > 0) {
node.style[prop] = '';
}
}
function animateRun(animationEvent, element, className, activeAnimationComplete) {
var node = extractElementNode(element);
var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
if(node.getAttribute('class').indexOf(className) == -1 || !elementData) {
activeAnimationComplete();
return;
}
var activeClassName = '';
forEach(className.split(' '), function(klass, i) {
activeClassName += (i > 0 ? ' ' : '') + klass + '-active';
});
var stagger = elementData.stagger;
var timings = elementData.timings;
var itemIndex = elementData.itemIndex;
var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);
var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);
var maxDelayTime = maxDelay * ONE_SECOND;
var startTime = Date.now();
var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;
var style = '', appliedStyles = [];
if(timings.transitionDuration > 0) {
var propertyStyle = timings.transitionPropertyStyle;
if(propertyStyle.indexOf('all') == -1) {
style += CSS_PREFIX + 'transition-property: ' + propertyStyle + ';';
style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + ';';
appliedStyles.push(CSS_PREFIX + 'transition-property');
appliedStyles.push(CSS_PREFIX + 'transition-duration');
}
}
if(itemIndex > 0) {
if(stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {
var delayStyle = timings.transitionDelayStyle;
style += CSS_PREFIX + 'transition-delay: ' +
prepareStaggerDelay(delayStyle, stagger.transitionDelay, itemIndex) + '; ';
appliedStyles.push(CSS_PREFIX + 'transition-delay');
}
if(stagger.animationDelay > 0 && stagger.animationDuration === 0) {
style += CSS_PREFIX + 'animation-delay: ' +
prepareStaggerDelay(timings.animationDelayStyle, stagger.animationDelay, itemIndex) + '; ';
appliedStyles.push(CSS_PREFIX + 'animation-delay');
}
}
if(appliedStyles.length > 0) {
//the element being animated may sometimes contain comment nodes in
//the jqLite object, so we're safe to use a single variable to house
//the styles since there is always only one element being animated
var oldStyle = node.getAttribute('style') || '';
node.setAttribute('style', oldStyle + '; ' + style);
}
element.on(css3AnimationEvents, onAnimationProgress);
element.addClass(activeClassName);
elementData.closeAnimationFn = function() {
onEnd();
activeAnimationComplete();
};
var staggerTime = itemIndex * (Math.max(stagger.animationDelay, stagger.transitionDelay) || 0);
var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER;
var totalTime = (staggerTime + animationTime) * ONE_SECOND;
elementData.running++;
animationCloseHandler(element, totalTime);
return onEnd;
// This will automatically be called by $animate so
// there is no need to attach this internally to the
// timeout done method.
function onEnd(cancelled) {
element.off(css3AnimationEvents, onAnimationProgress);
element.removeClass(activeClassName);
animateClose(element, className);
var node = extractElementNode(element);
for (var i in appliedStyles) {
node.style.removeProperty(appliedStyles[i]);
}
}
function onAnimationProgress(event) {
event.stopPropagation();
var ev = event.originalEvent || event;
var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();
/* Firefox (or possibly just Gecko) likes to not round values up
* when a ms measurement is used for the animation */
var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));
/* $manualTimeStamp is a mocked timeStamp value which is set
* within browserTrigger(). This is only here so that tests can
* mock animations properly. Real events fallback to event.timeStamp,
* or, if they don't, then a timeStamp is automatically created for them.
* We're checking to see if the timeStamp surpasses the expected delay,
* but we're using elapsedTime instead of the timeStamp on the 2nd
* pre-condition since animations sometimes close off early */
if(Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {
activeAnimationComplete();
}
}
}
function prepareStaggerDelay(delayStyle, staggerDelay, index) {
var style = '';
forEach(delayStyle.split(','), function(val, i) {
style += (i > 0 ? ',' : '') +
(index * staggerDelay + parseInt(val, 10)) + 's';
});
return style;
}
function animateBefore(animationEvent, element, className, calculationDecorator) {
if(animateSetup(animationEvent, element, className, calculationDecorator)) {
return function(cancelled) {
cancelled && animateClose(element, className);
};
}
}
function animateAfter(animationEvent, element, className, afterAnimationComplete) {
if(element.data(NG_ANIMATE_CSS_DATA_KEY)) {
return animateRun(animationEvent, element, className, afterAnimationComplete);
} else {
animateClose(element, className);
afterAnimationComplete();
}
}
function animate(animationEvent, element, className, animationComplete) {
//If the animateSetup function doesn't bother returning a
//cancellation function then it means that there is no animation
//to perform at all
var preReflowCancellation = animateBefore(animationEvent, element, className);
if(!preReflowCancellation) {
animationComplete();
return;
}
//There are two cancellation functions: one is before the first
//reflow animation and the second is during the active state
//animation. The first function will take care of removing the
//data from the element which will not make the 2nd animation
//happen in the first place
var cancel = preReflowCancellation;
afterReflow(element, function() {
unblockTransitions(element, className);
unblockKeyframeAnimations(element);
//once the reflow is complete then we point cancel to
//the new cancellation function which will remove all of the
//animation properties from the active animation
cancel = animateAfter(animationEvent, element, className, animationComplete);
});
return function(cancelled) {
(cancel || noop)(cancelled);
};
}
function animateClose(element, className) {
element.removeClass(className);
var data = element.data(NG_ANIMATE_CSS_DATA_KEY);
if(data) {
if(data.running) {
data.running--;
}
if(!data.running || data.running === 0) {
element.removeData(NG_ANIMATE_CSS_DATA_KEY);
}
}
}
return {
enter : function(element, animationCompleted) {
return animate('enter', element, 'ng-enter', animationCompleted);
},
leave : function(element, animationCompleted) {
return animate('leave', element, 'ng-leave', animationCompleted);
},
move : function(element, animationCompleted) {
return animate('move', element, 'ng-move', animationCompleted);
},
beforeSetClass : function(element, add, remove, animationCompleted) {
var className = suffixClasses(remove, '-remove') + ' ' +
suffixClasses(add, '-add');
var cancellationMethod = animateBefore('setClass', element, className, function(fn) {
/* when classes are removed from an element then the transition style
* that is applied is the transition defined on the element without the
* CSS class being there. This is how CSS3 functions outside of ngAnimate.
* http://plnkr.co/edit/j8OzgTNxHTb4n3zLyjGW?p=preview */
var klass = element.attr('class');
element.removeClass(remove);
element.addClass(add);
var timings = fn();
element.attr('class', klass);
return timings;
});
if(cancellationMethod) {
afterReflow(element, function() {
unblockTransitions(element, className);
unblockKeyframeAnimations(element);
animationCompleted();
});
return cancellationMethod;
}
animationCompleted();
},
beforeAddClass : function(element, className, animationCompleted) {
var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'), function(fn) {
/* when a CSS class is added to an element then the transition style that
* is applied is the transition defined on the element when the CSS class
* is added at the time of the animation. This is how CSS3 functions
* outside of ngAnimate. */
element.addClass(className);
var timings = fn();
element.removeClass(className);
return timings;
});
if(cancellationMethod) {
afterReflow(element, function() {
unblockTransitions(element, className);
unblockKeyframeAnimations(element);
animationCompleted();
});
return cancellationMethod;
}
animationCompleted();
},
setClass : function(element, add, remove, animationCompleted) {
remove = suffixClasses(remove, '-remove');
add = suffixClasses(add, '-add');
var className = remove + ' ' + add;
return animateAfter('setClass', element, className, animationCompleted);
},
addClass : function(element, className, animationCompleted) {
return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted);
},
beforeRemoveClass : function(element, className, animationCompleted) {
var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'), function(fn) {
/* when classes are removed from an element then the transition style
* that is applied is the transition defined on the element without the
* CSS class being there. This is how CSS3 functions outside of ngAnimate.
* http://plnkr.co/edit/j8OzgTNxHTb4n3zLyjGW?p=preview */
var klass = element.attr('class');
element.removeClass(className);
var timings = fn();
element.attr('class', klass);
return timings;
});
if(cancellationMethod) {
afterReflow(element, function() {
unblockTransitions(element, className);
unblockKeyframeAnimations(element);
animationCompleted();
});
return cancellationMethod;
}
animationCompleted();
},
removeClass : function(element, className, animationCompleted) {
return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted);
}
};
function suffixClasses(classes, suffix) {
var className = '';
classes = angular.isArray(classes) ? classes : classes.split(/\s+/);
forEach(classes, function(klass, i) {
if(klass && klass.length > 0) {
className += (i > 0 ? ' ' : '') + klass + suffix;
}
});
return className;
}
}]);
}]);
})(window, window.angular);
| svenanders/cdnjs | ajax/libs/angular.js/1.2.26/angular-animate.js | JavaScript | mit | 77,392 |
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+css-extras+clike+javascript+java+php+php-extras+coffeescript+scss+bash+c+cpp+python+sql+groovy+http+ruby+gherkin+csharp+go+nsis+aspnet&plugins=line-highlight+line-numbers+show-invisibles+autolinker+wpd+file-highlight+show-language */
var self=typeof window!="undefined"?window:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;f=f.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ");var l={element:r,language:o,grammar:u,code:f};t.hooks.run("before-highlight",l);if(i&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){l.highlightedCode=n.stringify(JSON.parse(e.data),o);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(l.element);t.hooks.run("after-highlight",l)};c.postMessage(JSON.stringify({language:l.language,code:l.code}))}else{l.highlightedCode=t.highlight(l.code,l.grammar,l.language);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(r);t.hooks.run("after-highlight",l)}},highlight:function(e,r,i){return n.stringify(t.tokenize(e,r),i)},tokenize:function(e,n,r){var i=t.Token,s=[e],o=n.rest;if(o){for(var u in o)n[u]=o[u];delete n.rest}e:for(var u in n){if(!n.hasOwnProperty(u)||!n[u])continue;var a=n[u],f=a.inside,l=!!a.lookbehind,c=0;a=a.pattern||a;for(var h=0;h<s.length;h++){var p=s[h];if(s.length>e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+"</"+s.tag+">"};if(!self.document){if(!self.addEventListener)return self.Prism;self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return self.Prism}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}return self.Prism}();typeof module!="undefined"&&module.exports&&(module.exports=Prism);;
Prism.languages.markup={comment:/<!--[\w\W]*?-->/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});;
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,inside:{tag:{pattern:/(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});;
Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/g,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/g,"pseudo-class":/:[-\w]+(?:\(.*\))?/g,"class":/\.[-:\.\w]+/g,id:/#[-:\.\w]+/g}};Prism.languages.insertBefore("css","ignore",{hexcode:/#[\da-f]{3,6}/gi,entity:/\\[\da-f]{1,8}/gi,number:/[\d%\.]+/g,"function":/(attr|calc|cross-fade|cycle|element|hsla?|image|lang|linear-gradient|matrix3d|matrix|perspective|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|rgba?|rotatex|rotatey|rotatez|rotate3d|rotate|scalex|scaley|scalez|scale3d|scale|skewx|skewy|skew|steps|translatex|translatey|translatez|translate3d|translate|url|var)/ig});;
Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|(&){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|get|set|new|with|typeof|try|throw|catch|finally|null|break|continue|this)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<|<)script[\w\W]*?(>|>)[\w\W]*?(<|<)\/script(>|>)/ig,inside:{tag:{pattern:/(<|<)script[\w\W]*?(>|>)|(<|<)\/script(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});;
Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+[e]?[\d]*[df]\b|\W\d*\.?\d+\b/gi,operator:{pattern:/([^\.]|^)([-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\/|%|\^|(<){2}|($gt;){2,3}|:|~)/g,lookbehind:!0}});;
/**
* Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/
* Modified by Miles Johnson: http://milesj.me
*
* Supports the following:
* - Extends clike syntax
* - Support for PHP 5.3 and 5.4 (namespaces, traits, etc)
* - Smarter constant and function matching
*
* Adds the following new token classes:
* constant, delimiter, variable, function, package
*/Prism.languages.php=Prism.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/ig,constant:/\b[A-Z0-9_]{2,}\b/g});Prism.languages.insertBefore("php","keyword",{delimiter:/(\?>|<\?php|<\?)/ig,variable:/(\$\w+)\b/ig,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/g,lookbehind:!0,inside:{punctuation:/\\/}}});Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/g,lookbehind:!0}});if(Prism.languages.markup){Prism.hooks.add("before-highlight",function(e){if(e.language!=="php")return;e.tokenStack=[];e.code=e.code.replace(/(?:<\?php|<\?|<\?php|<\?)[\w\W]*?(?:\?>|\?>)/ig,function(t){e.tokenStack.push(t);return"{{{PHP"+e.tokenStack.length+"}}}"})});Prism.hooks.add("after-highlight",function(e){if(e.language!=="php")return;for(var t=0,n;n=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",Prism.highlight(n,e.grammar,"php"));e.element.innerHTML=e.highlightedCode});Prism.hooks.add("wrap",function(e){e.language==="php"&&e.type==="markup"&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))});Prism.languages.insertBefore("php","comment",{markup:{pattern:/(<|<)[^?]\/?(.*?)(>|>)/g,inside:Prism.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/g})};;
Prism.languages.insertBefore("php","variable",{"this":/\$this/g,global:/\$_?(GLOBALS|SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)/g,scope:{pattern:/\b[\w\\]+::/g,inside:{keyword:/(static|self|parent)/,punctuation:/(::|\\)/}}});;
Prism.languages.coffeescript=Prism.languages.extend("javascript",{"block-comment":/([#]{3}\s*\r?\n(.*\s*\r*\n*)\s*?\r?\n[#]{3})/g,comment:/(\s|^)([#]{1}[^#^\r^\n]{2,}?(\r?\n|$))/g,keyword:/\b(this|window|delete|class|extends|namespace|extend|ar|let|if|else|while|do|for|each|of|return|in|instanceof|new|with|typeof|try|catch|finally|null|undefined|break|continue)\b/g});Prism.languages.insertBefore("coffeescript","keyword",{"function":{pattern:/[a-z|A-z]+\s*[:|=]\s*(\([.|a-z\s|,|:|{|}|\"|\'|=]*\))?\s*->/gi,inside:{"function-name":/[_?a-z-|A-Z-]+(\s*[:|=])| @[_?$?a-z-|A-Z-]+(\s*)| /g,operator:/[-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\//g}},"attr-name":/[_?a-z-|A-Z-]+(\s*:)| @[_?$?a-z-|A-Z-]+(\s*)| /g});;
Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g,lookbehind:!0},atrule:/@[\w-]+(?=\s+(\(|\{|;))/gi,url:/([-a-z]+-)*url(?=\()/gi,selector:/([^@;\{\}\(\)]?([^@;\{\}\(\)]|&|\#\{\$[-_\w]+\})+)(?=\s*\{(\}|\s|[^\}]+(:|\{)[^\}]+))/gm});Prism.languages.insertBefore("scss","atrule",{keyword:/@(if|else if|else|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)|(?=@for\s+\$[-_\w]+\s)+from/i});Prism.languages.insertBefore("scss","property",{variable:/((\$[-_\w]+)|(#\{\$[-_\w]+\}))/i});Prism.languages.insertBefore("scss","ignore",{placeholder:/%[-_\w]+/i,statement:/\B!(default|optional)\b/gi,"boolean":/\b(true|false)\b/g,"null":/\b(null)\b/g,operator:/\s+([-+]{1,2}|={1,2}|!=|\|?\||\?|\*|\/|\%)\s+/g});;
Prism.languages.bash=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])(#.*?(\r?\n|$))/g,lookbehind:!0},string:{pattern:/("|')(\\?[\s\S])*?\1/g,inside:{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^\}]+\})/g}},keyword:/\b(if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)\b/g});Prism.languages.insertBefore("bash","keyword",{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^}]+\})/g});Prism.languages.insertBefore("bash","comment",{important:/(^#!\s*\/bin\/bash)|(^#!\s*\/bin\/sh)/g});;
Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/g,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|={1,2}|\^|~|%|(&){1,2}|\|?\||\?|\*|\//g});Prism.languages.insertBefore("c","keyword",{property:{pattern:/#[a-zA-Z]+\ .*/g,inside:{property:/<[a-zA-Z.]+>/g}}});;
Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|delete\[\]|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|new\[\]|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/g,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|(&){1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/g});;
Prism.languages.python={comment:{pattern:/(^|[^\\])#.*?(\r?\n|$)/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,keyword:/\b(as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/g,"boolean":/\b(True|False)\b/g,number:/\b-?(0x)?\d*\.?[\da-f]+\b/g,operator:/[-+]{1,2}|=?<|=?>|!|={1,2}|(&){1,2}|(&){1,2}|\|?\||\?|\*|\/|~|\^|%|\b(or|and|not)\b/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
Prism.languages.sql={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|((--)|(\/\/)|#).*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,keyword:/\b(ACTION|ADD|AFTER|ALGORITHM|ALTER|ANALYZE|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADE|CASCADED|CASE|CHAIN|CHAR VARYING|CHARACTER VARYING|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLUMN|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATA|DATABASE|DATABASES|DATETIME|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DOUBLE PRECISION|DROP|DUMMY|DUMP|DUMPFILE|DUPLICATE KEY|ELSE|ENABLE|ENCLOSED BY|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPE|ESCAPED BY|EXCEPT|EXEC|EXECUTE|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR|FOR EACH ROW|FORCE|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GEOMETRY|GEOMETRYCOLLECTION|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|IDENTITY|IDENTITY_INSERT|IDENTITYCOL|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTO|INVOKER|ISOLATION LEVEL|JOIN|KEY|KEYS|KILL|LANGUAGE SQL|LAST|LEFT|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONGBLOB|LONGTEXT|MATCH|MATCHED|MEDIUMBLOB|MEDIUMINT|MEDIUMTEXT|MERGE|MIDDLEINT|MODIFIES SQL DATA|MODIFY|MULTILINESTRING|MULTIPOINT|MULTIPOLYGON|NATIONAL|NATIONAL CHAR VARYING|NATIONAL CHARACTER|NATIONAL CHARACTER VARYING|NATIONAL VARCHAR|NATURAL|NCHAR|NCHAR VARCHAR|NEXT|NO|NO SQL|NOCHECK|NOCYCLE|NONCLUSTERED|NULLIF|NUMERIC|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUT|OUTER|OUTFILE|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREV|PRIMARY|PRINT|PRIVILEGES|PROC|PROCEDURE|PUBLIC|PURGE|QUICK|RAISERROR|READ|READS SQL DATA|READTEXT|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEATABLE|REPLICATION|REQUIRE|RESTORE|RESTRICT|RETURN|RETURNS|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROWCOUNT|ROWGUIDCOL|ROWS?|RTREE|RULE|SAVE|SAVEPOINT|SCHEMA|SELECT|SERIAL|SERIALIZABLE|SESSION|SESSION_USER|SET|SETUSER|SHARE MODE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|START|STARTING BY|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLE|TABLES|TABLESPACE|TEMPORARY|TEMPTABLE|TERMINATED BY|TEXT|TEXTSIZE|THEN|TIMESTAMP|TINYBLOB|TINYINT|TINYTEXT|TO|TOP|TRAN|TRANSACTION|TRANSACTIONS|TRIGGER|TRUNCATE|TSEQUAL|TYPE|TYPES|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARBINARY|VARCHAR|VARCHARACTER|VARYING|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH|WITH ROLLUP|WITHIN|WORK|WRITE|WRITETEXT)\b/gi,"boolean":/\b(TRUE|FALSE|NULL)\b/gi,number:/\b-?(0x)?\d*\.?[\da-f]+\b/g,operator:/\b(ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|IS|UNIQUE|CHARACTER SET|COLLATE|DIV|OFFSET|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b|[-+]{1}|!|=?<|=?>|={1}|(&){1,2}|\|?\||\?|\*|\//gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[;[\]()`,.]/g};;
Prism.languages.groovy=Prism.languages.extend("clike",{keyword:/\b(as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/g,string:/("""|''')[\W\w]*?\1|("|'|\/)[\W\w]*?\2|(\$\/)(\$\/\$|[\W\w])*?\/\$/g,number:/\b0b[01_]+\b|\b0x[\da-f_]+(\.[\da-f_p\-]+)?\b|\b[\d_]+(\.[\d_]+[e]?[\d]*)?[glidf]\b|[\d_]+(\.[\d_]+)?\b/gi,operator:{pattern:/(^|[^.])(={0,2}~|\?\.|\*?\.@|\.&|\.{1,2}(?!\.)|\.{2}(<)?(?=\w)|->|\?:|[-+]{1,2}|!|<=>|>{1,3}|(<){1,2}|={1,2}|(&){1,2}|\|{1,2}|\?|\*{1,2}|\/|\^|%)/g,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/g});Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(setup|given|when|then|and|cleanup|expect|where):/g});Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0}});Prism.hooks.add("wrap",function(e){if(e.language==="groovy"&&e.type==="string"){var t=e.content[0];if(t!="'"){var n=/([^\\])(\$(\{.*?\}|[\w\.]+))/;t==="$"&&(n=/([^\$])(\$(\{.*?\}|[\w\.]+))/);e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}});e.classes.push(t==="/"?"regex":"gstring")}}});;
Prism.languages.http={"request-line":{pattern:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/g,inside:{property:/^\b(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/g,"attr-name":/:\w+/g}},"response-status":{pattern:/^HTTP\/1.[01] [0-9]+.*/g,inside:{property:/[0-9]+[A-Z\s-]+$/g}},keyword:/^[\w-]+:(?=.+)/gm};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:new RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)\\n\\n[\\w\\W]*","gi"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}};Prism.languages.insertBefore("http","keyword",options)};;
/**
* Original by Samuel Flores
*
* Adds the following new token classes:
* constant, builtin, variable, symbol, regex
*/Prism.languages.ruby=Prism.languages.extend("clike",{comment:/#[^\r\n]*(\r?\n|$)/g,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/g,builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*[?!]?\b/g});Prism.languages.insertBefore("ruby","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0},variable:/[@$]+\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g,symbol:/:\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g});;
// TODO:
// - Support for outline parameters
// - Support for tables
Prism.languages.gherkin={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|((#)|(\/\/)).*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,atrule:/\b(And|Given|When|Then|In order to|As an|I want to|As a)\b/g,keyword:/\b(Scenario Outline|Scenario|Feature|Background|Story)\b/g};;
Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/g,string:/@?("|')(\\?.)*?\1/g,preprocessor:/^\s*#.*/gm,number:/\b-?(0x)?\d*\.?\d+\b/g});;
Prism.languages.go=Prism.languages.extend("clike",{keyword:/\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g,builtin:/\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/g,"boolean":/\b(_|iota|nil|true|false)\b/g,operator:/([(){}\[\]]|[*\/%^!]=?|\+[=+]?|-[>=-]?|\|[=|]?|>[=>]?|<(<|[=-])?|==?|&(&|=|^=?)?|\.(\.\.)?|[,;]|:=?)/g,number:/\b(-?(0x[a-f\d]+|(\d+\.?\d*|\.\d+)(e[-+]?\d+)?)i?)\b/ig,string:/("|'|`)(\\?.|\r|\n)*?\1/g});delete Prism.languages.go["class-name"];;
/**
* Original by Jan T. Sott (http://github.com/idleberg)
*
* Includes all commands and plug-ins shipped with NSIS 3.0a2
*/Prism.languages.nsis={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])(#|;).*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,keyword:/\b(Abort|Add(BrandingImage|Size)|AdvSplash|Allow(RootDirInstall|SkipFiles)|AutoCloseWindow|Banner|BG(Font|Gradient|Image)|BrandingText|BringToFront|Call(\b|InstDLL)|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|Create(Directory|Font|ShortCut)|Delete(\b|INISec|INIStr|RegKey|RegValue)|Detail(Print|sButtonText)|Dialer|Dir(Text|Var|Verify)|EnableWindow|Enum(RegKey|RegValue)|Exch|Exec(\b|Shell|Wait)|ExpandEnvStrings|File(\b|BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|WriteUTF16LE|Seek|Write|WriteByte|WriteWord)|Find(Close|First|Next|Window)|FlushINI|Get(CurInstType|CurrentAddress|DlgItem|DLLVersion|DLLVersionLocal|ErrorLevel|FileTime|FileTimeLocal|FullPathName|Function(\b|Address|End)|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|Install(ButtonText|Colors|Dir|DirRegKey)|InstProgressFlags|Inst(Type|TypeGetText|TypeSetText)|Int(Cmp|CmpU|Fmt|Op)|IsWindow|Lang(DLL|String)|License(BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(Set|Text)|Manifest(DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|Name|Nop|ns(Dialogs|Exec)|NSISdl|OutFile|Page(\b|Callbacks)|Pop|Push|Quit|Read(EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|Section(\b|End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)|SendMessage|Set(AutoClose|BrandingImage|Compress|Compressor|CompressorDictSize|CtlColors|CurInstType|DatablockOptimize|DateSave|DetailsPrint|DetailsView|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(InstDetails|UninstDetails|Window)|Silent(Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(Cmp|CmpS|Cpy|Len)|SubCaption|System|Unicode|Uninstall(ButtonText|Caption|Icon|SubCaption|Text)|UninstPage|UnRegDLL|UserInfo|Var|VI(AddVersionKey|FileVersion|ProductVersion)|VPatch|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|Write(RegStr|Uninstaller)|XPStyle)\b/g,property:/\b(admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user|ARCHIVE|FILE_(ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(CR|CU|DD|LM|PD|U)|HKEY_(CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)\b/g,variable:/(\$(\(|\{)?[-_\w]+)(\)|\})?/i,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|<=?|>=?|={1,3}|(&){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,punctuation:/[{}[\];(),.:]/g,important:/\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)\b/gi};;
Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive tag":{pattern:/(<|<)%\s*@.*%>/gi,inside:{"page-directive tag":/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master|MasterType|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/ig,rest:Prism.languages.markup.tag.inside}},"directive tag":{pattern:/(<|<)%.*%>/gi,inside:{"directive tag":/(<|<)%\s*?[$=%#:]{0,2}|%>/gi,rest:Prism.languages.csharp}}});Prism.languages.insertBefore("inside","punctuation",{"directive tag":Prism.languages.aspnet["directive tag"]},Prism.languages.aspnet.tag.inside["attr-value"]);Prism.languages.insertBefore("aspnet","comment",{"asp comment":/<%--[\w\W]*?--%>/g});Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp script":{pattern:/(<|<)script(?=.*runat=['"]?server['"]?)[\w\W]*?(>|>)[\w\W]*?(<|<)\/script(>|>)/ig,inside:{tag:{pattern:/<\/?script\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,inside:Prism.languages.aspnet.tag.inside},rest:Prism.languages.csharp||{}}}});if(Prism.languages.aspnet.style){Prism.languages.aspnet.style.inside.tag.pattern=/<\/?style\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi;Prism.languages.aspnet.style.inside.tag.inside=Prism.languages.aspnet.tag.inside}if(Prism.languages.aspnet.script){Prism.languages.aspnet.script.inside.tag.pattern=Prism.languages.aspnet["asp script"].inside.tag.pattern;Prism.languages.aspnet.script.inside.tag.inside=Prism.languages.aspnet.tag.inside};
(function(){if(!window.Prism){return}function $$(a,b){return Array.prototype.slice.call((b||document).querySelectorAll(a))}function hasClass(a,b){b=" "+b+" ";return(" "+a.className+" ").replace(/[\n\t]/g," ").indexOf(b)>-1}var h=crlf=/\r?\n|\r/g;function highlightLines(a,b,c){var d=b.replace(/\s+/g,'').split(','),offset=+a.getAttribute('data-line-offset')||0;var e=parseFloat(getComputedStyle(a).lineHeight);for(var i=0,range;range=d[i++];){range=range.split('-');var f=+range[0],end=+range[1]||f;var g=document.createElement('div');g.textContent=Array(end-f+2).join(' \r\n');g.className=(c||'')+' line-highlight';if(!hasClass(a,'line-numbers')){g.setAttribute('data-start',f);if(end>f){g.setAttribute('data-end',end)}}g.style.top=(f-offset-1)*e+'px';if(hasClass(a,'line-numbers')){a.appendChild(g)}else{(a.querySelector('code')||a).appendChild(g)}}}function applyHash(){var b=location.hash.slice(1);$$('.temporary.line-highlight').forEach(function(a){a.parentNode.removeChild(a)});var c=(b.match(/\.([\d,-]+)$/)||[,''])[1];if(!c||document.getElementById(b)){return}var d=b.slice(0,b.lastIndexOf('.')),pre=document.getElementById(d);if(!pre){return}if(!pre.hasAttribute('data-line')){pre.setAttribute('data-line','')}highlightLines(pre,c,'temporary ');document.querySelector('.temporary.line-highlight').scrollIntoView()}var j=0;Prism.hooks.add('after-highlight',function(b){var c=b.element.parentNode;var d=c&&c.getAttribute('data-line');if(!c||!d||!/pre/i.test(c.nodeName)){return}clearTimeout(j);$$('.line-highlight',c).forEach(function(a){a.parentNode.removeChild(a)});highlightLines(c,d);j=setTimeout(applyHash,1)});addEventListener('hashchange',applyHash)})();
;
Prism.hooks.add("after-highlight",function(e){var t=e.element.parentNode;if(!t||!/pre/i.test(t.nodeName)||t.className.indexOf("line-numbers")===-1){return}var n=1+e.code.split("\n").length;var r;lines=new Array(n);lines=lines.join("<span></span>");r=document.createElement("span");r.className="line-numbers-rows";r.innerHTML=lines;if(t.hasAttribute("data-start")){t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)}e.element.appendChild(r)})
;
(function(){if(!window.Prism)return;for(var e in Prism.languages){var t=Prism.languages[e];t.tab=/\t/g;t.lf=/\n/g;t.cr=/\r/g}})();;
(function(){if(!self.Prism)return;var e=/\b([a-z]{3,7}:\/\/|tel:)[\w-+%~/.:]+/,t=/\b\S+@[\w.]+[a-z]{2}/,n=/\[([^\]]+)]\(([^)]+)\)/,r=["comment","url","attr-value","string"];for(var i in Prism.languages){var s=Prism.languages[i];Prism.languages.DFS(s,function(i,s){if(r.indexOf(i)>-1){s.pattern||(s=this[i]={pattern:s});s.inside=s.inside||{};i=="comment"&&(s.inside["md-link"]=n);s.inside["url-link"]=e;s.inside["email-link"]=t}});s["url-link"]=e;s["email-link"]=t}Prism.hooks.add("wrap",function(e){if(/-link$/.test(e.type)){e.tag="a";var t=e.content;if(e.type=="email-link")t="mailto:"+t;else if(e.type=="md-link"){var r=e.content.match(n);t=r[2];e.content=r[1]}e.attributes.href=t}})})();
;
(function(){function n(t){var n=t.toLowerCase();if(e.HTML[n])return"html";if(e.SVG[t])return"svg";if(e.MathML[t])return"mathml";if(e.HTML[n]!==0){var r=(document.createElement(t).toString().match(/\[object HTML(.+)Element\]/)||[])[1];if(r&&r!="Unknown"){e.HTML[n]=1;return"html"}}e.HTML[n]=0;if(e.SVG[t]!==0){var i=(document.createElementNS("http://www.w3.org/2000/svg",t).toString().match(/\[object SVG(.+)Element\]/)||[])[1];if(i&&i!="Unknown"){e.SVG[t]=1;return"svg"}}e.SVG[t]=0;if(e.MathML[t]!==0&&t.indexOf("m")===0){e.MathML[t]=1;return"mathml"}e.MathML[t]=0;return null}if(!self.Prism)return;if(Prism.languages.css){Prism.languages.css.atrule.inside["atrule-id"]=/^@[\w-]+/;if(Prism.languages.css.selector.pattern){Prism.languages.css.selector.inside["pseudo-class"]=/:[\w-]+/;Prism.languages.css.selector.inside["pseudo-element"]=/::[\w-]+/}else Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-class":/:[\w-]+/,"pseudo-element":/::[\w-]+/}}}if(Prism.languages.markup){Prism.languages.markup.tag.inside.tag.inside["tag-id"]=/[\w-]+/;var e={HTML:{a:1,abbr:1,acronym:1,b:1,basefont:1,bdo:1,big:1,blink:1,cite:1,code:1,dfn:1,em:1,kbd:1,i:1,rp:1,rt:1,ruby:1,s:1,samp:1,small:1,spacer:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1,wbr:1,noframes:1,summary:1,command:1,dt:1,dd:1,figure:1,figcaption:1,center:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,address:1,noscript:1,isIndex:1,main:1,mark:1,marquee:1,meter:1,menu:1},SVG:{animateColor:1,animateMotion:1,animateTransform:1,glyph:1,feBlend:1,feColorMatrix:1,feComponentTransfer:1,feFuncR:1,feFuncG:1,feFuncB:1,feFuncA:1,feComposite:1,feConvolveMatrix:1,feDiffuseLighting:1,feDisplacementMap:1,feFlood:1,feGaussianBlur:1,feImage:1,feMerge:1,feMergeNode:1,feMorphology:1,feOffset:1,feSpecularLighting:1,feTile:1,feTurbulence:1,feDistantLight:1,fePointLight:1,feSpotLight:1,linearGradient:1,radialGradient:1,altGlyph:1,textPath:1,tref:1,altglyph:1,textpath:1,tref:1,altglyphdef:1,altglyphitem:1,clipPath:1,"color-profile":1,cursor:1,"font-face":1,"font-face-format":1,"font-face-name":1,"font-face-src":1,"font-face-uri":1,foreignObject:1,glyph:1,glyphRef:1,hkern:1,vkern:1},MathML:{}}}var t;Prism.hooks.add("wrap",function(e){if((["tag-id"].indexOf(e.type)>-1||e.type=="property"&&e.content.indexOf("-")!=0||e.type=="atrule-id"&&e.content.indexOf("@-")!=0||e.type=="pseudo-class"&&e.content.indexOf(":-")!=0||e.type=="pseudo-element"&&e.content.indexOf("::-")!=0||e.type=="attr-name"&&e.content.indexOf("data-")!=0)&&e.content.indexOf("<")===-1){var r="w/index.php?fulltext&search=";e.tag="a";var i="http://docs.webplatform.org/";if(e.language=="css"){i+="wiki/css/";e.type=="property"?i+="properties/":e.type=="atrule-id"?i+="atrules/":e.type=="pseudo-class"?i+="selectors/pseudo-classes/":e.type=="pseudo-element"&&(i+="selectors/pseudo-elements/")}else if(e.language=="markup")if(e.type=="tag-id"){t=n(e.content)||t;t?i+="wiki/"+t+"/elements/":i+=r}else e.type=="attr-name"&&(t?i+="wiki/"+t+"/attributes/":i+=r);i+=e.content;e.attributes.href=i;e.attributes.target="_blank"}})})();;
(function(){if(!self.Prism||!self.document||!document.querySelector){return}var a={"js":"javascript","html":"markup","svg":"markup","xml":"markup","py":"python"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(c){var e=c.getAttribute("data-src");var g=(e.match(/\.(\w+)$/)||[,""])[1];var f=a[g]||g;var b=document.createElement("code");b.className="language-"+f;c.textContent="";b.textContent="Loading…";c.appendChild(b);var d=new XMLHttpRequest();d.open("GET",e,true);d.onreadystatechange=function(){if(d.readyState==4){if(d.status<400&&d.responseText){b.textContent=d.responseText;Prism.highlightElement(b)}else{if(d.status>=400){b.textContent="✖ Error "+d.status+" while fetching file: "+d.statusText}else{b.textContent="✖ Error: File does not exist or is empty"}}}};d.send(null)})})();;
(function(){if(!self.Prism){return}var e={csharp:"C#",cpp:"C++"};Prism.hooks.add("before-highlight",function(t){var n=e[t.language]||t.language;t.element.setAttribute("data-language",n)})})();
| hongkheng/cdnjs | ajax/libs/prism/0.0.1/prism.min.js | JavaScript | mit | 35,111 |
"use strict";
(function (window, document, bs, undefined) {
var socket = bs.socket;
var uiOptions = {
bs: {}
};
socket.on("ui:connection", function (options) {
uiOptions = options;
bs.socket.emit("ui:history:connected", {
href: window.location.href
});
});
socket.on("ui:element:remove", function (data) {
if (data.id) {
var elem = document.getElementById(data.id);
if (elem) {
removeElement(elem);
}
}
});
socket.on("highlight", function () {
var id = "__browser-sync-highlight__";
var elem = document.getElementById(id);
if (elem) {
return removeElement(elem);
}
(function (e) {
e.style.position = "fixed";
e.style.zIndex = "1000";
e.style.width = "100%";
e.style.height = "100%";
e.style.borderWidth = "5px";
e.style.borderColor = "red";
e.style.borderStyle = "solid";
e.style.top = "0";
e.style.left = "0";
e.setAttribute("id", id);
document.getElementsByTagName("body")[0].appendChild(e);
})(document.createElement("div"));
});
socket.on("ui:element:add", function (data) {
var elem = document.getElementById(data.id);
if (!elem) {
if (data.type === "css") {
return addCss(data);
}
if (data.type === "js") {
return addJs(data);
}
if (data.type === "dom") {
return addDomNode(data);
}
}
});
bs.addDomNode = addDomNode;
bs.addJs = addJs;
bs.addCss = addJs;
function addJs(data) {
(function (e) {
e.setAttribute("src", getAbsoluteUrl(data.src));
e.setAttribute("id", data.id);
document.getElementsByTagName("body")[0].appendChild(e);
})(document.createElement("script"));
}
function addCss(data) {
(function (e) {
e.setAttribute("rel", "stylesheet");
e.setAttribute("type", "text/css");
e.setAttribute("id", data.id);
e.setAttribute("media", "all");
e.setAttribute("href", getAbsoluteUrl(data.src));
document.getElementsByTagName("head")[0].appendChild(e);
})(document.createElement("link"));
}
function addDomNode(data) {
var elem = document.createElement(data.tagName);
for (var attr in data.attrs) {
elem.setAttribute(attr, data.attrs[attr]);
}
if (data.placement) {
document.getElementsByTagName(data.placement)[0].appendChild(elem);
} else {
document.getElementsByTagName("body")[0].appendChild(elem);
}
return elem;
}
function removeElement(element) {
if (element && element.parentNode) {
element.parentNode.removeChild(element);
}
}
function getAbsoluteUrl(path) {
if (path.match(/^h/)) {
return path;
}
return [window.location.protocol, "//", getHost(), path].join("");
}
function getHost () {
return uiOptions.bs.mode === "snippet" ? window.location.hostname + ":" + uiOptions.bs.port : window.location.host;
}
})(window, document, ___browserSync___); | lucasdesenna/generic-search-flow | node_modules/browser-sync-ui/lib/client-js.js | JavaScript | mit | 3,450 |
/* Taken from the popular Visual Studio Vibrant Ink Schema */
.cm-s-vibrant-ink { background: black; color: white; }
.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
.cm-s-vibrant-ink .CodeMirror-gutter { background: #002240; border-right: 1px solid #aaa; }
.cm-s-vibrant-ink .CodeMirror-gutter-text { color: #d0d0d0; }
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-vibrant-ink .cm-keyword { color: #CC7832; }
.cm-s-vibrant-ink .cm-atom { color: #FC0; }
.cm-s-vibrant-ink .cm-number { color: #FFEE98; }
.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #FFC66D }
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-cobalt span.cm-def { color: #FFC66D }
.cm-s-vibrant-ink .cm-operator { color: #888; }
.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
.cm-s-vibrant-ink .cm-string { color: #A5C25C }
.cm-s-vibrant-ink .cm-string-2 { color: red }
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
.cm-s-vibrant-ink .cm-link { color: blue; }
| MindfireTechnology/Merchello | src/Merchello.Web.UI/Umbraco_Client/CodeMirror/Js/Theme/vibrant-ink.css | CSS | mit | 1,390 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.