diff --git a/.gitignore b/.gitignore
index cfc3838ca..fe714a3ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
.DS_Store
public/*
-source/*
config.ini
latest-change.txt
*-ck.js
diff --git a/source/_data/_data.json b/source/_data/_data.json
new file mode 100644
index 000000000..3be1f4aca
--- /dev/null
+++ b/source/_data/_data.json
@@ -0,0 +1,93 @@
+{
+ "title" : "Pattern Lab",
+ "htmlClass": "pl",
+ "bodyClass": "body",
+ "img": {
+ "landscape-4x3": {
+ "src": "../../images/fpo_4x3.png",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "../../images/fpo_16x9.png",
+ "alt": "16x9 Image"
+ },
+ "square": {
+ "src": "../../images/fpo_square.png",
+ "alt": "Square Thumbnail"
+ },
+ "avatar" : {
+ "src" : "../../images/fpo_avatar.png",
+ "alt" : "Person Name"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/tech",
+ "alt": "Rectangle"
+ }
+ },
+ "headline" : {
+ "short" : "Lorem ipsum dolor sit (37 characters)",
+ "medium" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit. (72 characters)"
+ },
+ "excerpt" : {
+ "short" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam",
+ "medium" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
+ "long" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ },
+ "description" : "So, setting about it as methodically as men might smoke out a wasps' nest, the Martians spread this strange stifling vapour over the Londonward country. The horns of the crescent slowly moved apart, until at last they formed a line from Hanwell to Coombe and Malden. All night through their destructive tubes advanced.",
+ "url" : "#",
+ "name" : {
+ "first": "Lacy",
+ "firsti": "L",
+ "middle": "Tommie",
+ "middlei": "T",
+ "last": "Way",
+ "lasti": "W"
+ },
+ "year" : {
+ "long": "2013",
+ "short": "13"
+ },
+ "month" : {
+ "long": "February",
+ "short": "Feb",
+ "digit": "02"
+ },
+ "dayofweek" : {
+ "long": "Monday",
+ "short": "Mon"
+ },
+ "day" : {
+ "long": "10",
+ "short": "10",
+ "ordinal": "th"
+ },
+ "hour" : {
+ "long": "01",
+ "short": "1",
+ "military": "13",
+ "ampm": "pm"
+ },
+ "minute" : {
+ "long": "20",
+ "short": "20"
+ },
+ "seconds" : "31",
+ "author" : {
+ "first-name": "Author",
+ "last-name": "Name"
+ },
+ "hero": true,
+ "emergency" : false,
+ "touts" : [
+ { },
+ { },
+ { }
+ ],
+ "latest-posts" : [
+ { },
+ { },
+ { },
+ { },
+ { }
+ ]
+}
\ No newline at end of file
diff --git a/source/_data/_listitems.json b/source/_data/_listitems.json
new file mode 100644
index 000000000..114ed1f9b
--- /dev/null
+++ b/source/_data/_listitems.json
@@ -0,0 +1,878 @@
+{
+ "1": {
+ "title": "Nullizzle shizznit velizzle, hizzle, suscipit own yo', gravida vizzle, arcu.",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/people",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/nature",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/tech",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/tech",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/tech",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Lorizzle pimpin' dolizzle sit amet I",
+ "medium": "Rizzle adipiscing elizzle. Nullam sapien velizzle, shit volutpizzle, my"
+ },
+ "excerpt": {
+ "short": "Shizz fo shizzle mah nizzle fo rizzle, mah home g-dizzle, gravida vizzle, arcu. Pellentesque crunk tortizzle. Sed erizzle. Black izzle sheezy telliv.",
+ "medium": "Izzle crazy tempizzle sizzle. We gonna chung gangsta get down get down fo shizzle turpizzle. Away break it down black. Pellentesque bling bling rhoncus fo shizzle. In hac the bizzle platea dictumst. Black dapibizzle. Crackalackin.",
+ "long": "Curabitizzle fo shizzle diam quizzle nisi nizzle mollizzle. Suspendisse boofron. Morbi odio. Sure pizzle. Crazy orci. Shut the shizzle up maurizzle get down get down, check out this a, go to hizzle sit amizzle, malesuada izzle, pede. Pellentesque gravida. Vestibulizzle check it out mi, volutpat izzle, shiz sed, shiznit sempizzle, da bomb. Funky fresh in ipsum. Da bomb volutpat felis vizzle daahng dawg. Crizzle quis dope izzle fo shizzle my ni."
+ },
+ "description": "Fizzle crazy tortor. Sed rizzle. Ass pimpin' dolor dapibizzle turpis tempizzle fo shizzle my nizzle. Maurizzle pellentesque its fo rizzle izzle turpis. Get down get down we gonna chung nizzle. Shizzlin dizzle eleifend rhoncizzle break it down. In yo ghetto platea dictumst. Bling bling dapibizzle. Curabitur break yo neck, yall fo, pretizzle eu, go to hizzle dope, own yo' vitae, nunc. Bizzle suscipizzle. Ass semper velit sizzle fo.",
+ "url": "http://lorizzle.nl/",
+ "name": {
+ "first": "Junius",
+ "firsti": "J",
+ "middle": "Marius",
+ "middlei": "M",
+ "last": "Koolen",
+ "lasti": "K"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "January",
+ "short": "Jan",
+ "digit": "01"
+ },
+ "dayofweek": {
+ "long": "Sunday",
+ "short": "Sun"
+ },
+ "day": {
+ "long": "01",
+ "short": "1",
+ "ordinal": "st"
+ },
+ "hour": {
+ "long": "06",
+ "short": "6",
+ "military": "06",
+ "ampm": "am"
+ },
+ "minute": {
+ "long": "20",
+ "short": "20"
+ },
+ "seconds": "31"
+ },
+ "2": {
+ "title": "Veggies sunt bona vobis, proinde vos postulo",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/nature",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/tech",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/people",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/people",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/people",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Veggies sunt bona vobis, proinde vos",
+ "medium": "Postulo esse magis azuki bean burdock brussels sprout quandong komatsun"
+ },
+ "excerpt": {
+ "short": "A fava bean collard greens endive tomatillo lotus root okra winter purslane zucchini parsley spinach artichoke. Brussels sprout pea turnip catsear.",
+ "medium": "Bush tomato gumbo potato garbanzo ricebean burdock daikon coriander kale quandong. Bok choy celery leek avocado shallot horseradish aubergine parsley. Bok choy bell pepper kale celery desert raisin kakadu plum bok choy bunya nuts.",
+ "long": "Spinach tigernut. Corn cucumber grape black-eyed pea asparagus spinach avocado dulse bunya nuts epazote celery desert raisin celtuce burdock plantain yarrow napa cabbage. Plantain okra seakale endive tigernut pea sprouts asparagus corn chard peanut beet greens groundnut radicchio carrot coriander gumbo gram celtuce. Jícama nori bamboo shoot collard greens okra radicchio tomato. Catsear mustard corn tigernut celery kale water spinach bok choy."
+ },
+ "description": "Mung bean squash sorrel taro coriander collard greens gumbo bitterleaf tomato. Taro water chestnut celtuce turnip yarrow celery endive scallion black-eyed pea onion. Aubergine dulse turnip greens mustard salsify garlic soybean parsley bitterleaf desert raisin courgette.",
+ "url": "http://veggieipsum.com",
+ "name": {
+ "first": "Siguror",
+ "firsti": "S",
+ "middle": "Aron",
+ "middlei": "A",
+ "last": "Hanigan",
+ "lasti": "H"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "February",
+ "short": "Feb",
+ "digit": "02"
+ },
+ "dayofweek": {
+ "long": "Monday",
+ "short": "Mon"
+ },
+ "day": {
+ "long": "10",
+ "short": "10",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "01",
+ "short": "1",
+ "military": "13",
+ "ampm": "pm"
+ },
+ "minute": {
+ "long": "20",
+ "short": "20"
+ },
+ "seconds": "31"
+ },
+ "3": {
+ "title": "Bacon ipsum dolor sit amet turducken strip steak beef ribs shank",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/tech",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/people",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/nature",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/nature",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/nature",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Bacon ipsum dolor sit amet spare rib",
+ "medium": "Tongue pancetta short ribs bacon. Kielbasa ball tip cow bresaola, capic"
+ },
+ "excerpt": {
+ "short": "Tail jerky rump shoulder t-bone meatball meatloaf salami. Filet mignon shank t-bone venison, ham hock ribeye drumstick bresaola kielbasa. Frankfurter.",
+ "medium": "Doner biltong turducken leberkas. Rump swine pork loin ribeye ball tip meatloaf, pork chop ground round pig pancetta cow biltong brisket. Beef corned beef beef ribs, bacon pork belly sausage meatball boudin doner ham hock. Swine gro.",
+ "long": "Und round meatball, bacon pig leberkas corned beef tongue shoulder. Drumstick pork loin prosciutto ball tip shank pancetta spare ribs jowl pastrami. Frankfurter boudin filet mignon ribeye. Pig hamburger strip steak ham turducken prosciutto bresaola ground round pancetta frankfurter jowl. Frankfurter tongue brisket tenderloin, beef ribs pastrami biltong tail bresaola flank. Biltong pork chop beef boudin hamburger bacon. Capicola bresaola sausage."
+ },
+ "description": "Boudin sausage jerky pastrami ground round salami biltong. Sausage fatback strip steak doner pork loin, pork belly drumstick ham short loin hamburger shankle. Short ribs sirloin rump tri-tip beef biltong. Meatball pig salami, jowl pork loin fatback short loin drumstick andouille.",
+ "url": "http://baconipsum.com/",
+ "name": {
+ "first": "Teun",
+ "firsti": "T",
+ "middle": "Jodocus",
+ "middlei": "J",
+ "last": "Richard",
+ "lasti": "R"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "March",
+ "short": "Mar",
+ "digit": "03"
+ },
+ "dayofweek": {
+ "long": "Tuesday",
+ "short": "Tue"
+ },
+ "day": {
+ "long": "22",
+ "short": "22",
+ "ordinal": "nd"
+ },
+ "hour": {
+ "long": "04",
+ "short": "4",
+ "military": "16",
+ "ampm": "pm"
+ },
+ "minute": {
+ "long": "45",
+ "short": "45"
+ },
+ "seconds": "11"
+ },
+ "4": {
+ "title": "Whatever swag accusamus occupy, gentrify butcher tote bag",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/animals",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/arch",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/people/grayscale",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/people/greyscale",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/people/greyscale",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Nesciunt sunt cillum keytar Pitchfork",
+ "medium": "Tote bag mixtape PBR Helvetica scenester forage four loko. Irure Tonx"
+ },
+ "excerpt": {
+ "short": "Golf quis +1, Wes Anderson church-key lo-fi keffiyeh selvage culpa authentic Brooklyn fap chambray. Id synth yr, 3 wolf moon locavore +1 mixtape do.",
+ "medium": "Sed single-origin coffee anim eu. Bicycle rights Neutra Truffaut pop-up. Paleo hella irure meh Banksy, Wes Anderson typewriter VHS jean shorts yr. Eiusmod officia banjo Thundercats, odio laborum magna deep v cornhole nostrud kitsch.",
+ "long": "Tattooed Williamsburg. Jean shorts proident kogi laboris. Non tote bag pariatur elit slow-carb, Vice irure eu Echo Park ea aliqua chillwave. Cornhole Etsy quinoa Pinterest cardigan. Excepteur quis forage, Blue Bottle keffiyeh velit hoodie direct trade typewriter Etsy. Fingerstache squid non, sriracha drinking vinegar Shoreditch pork belly. Paleo sartorial mollit 3 wolf moon chambray whatever, sed tote bag small batch freegan. Master cleanse."
+ },
+ "description": "Fanny pack ullamco et veniam semiotics. Shoreditch PBR reprehenderit cliche, magna Tonx aesthetic. Narwhal photo booth DIY aute post-ironic anim. Vice cliche brunch est before they sold out fap, street art Odd Future fashion axe messenger bag nihil Tonx tattooed. Nihil hashtag incididunt, do eu art party Banksy jean shorts four loko typewriter.",
+ "url": "http://hipsteripsum.me/",
+ "name": {
+ "first": "Duane",
+ "firsti": "D",
+ "middle": "Edvin",
+ "middlei": "E",
+ "last": "Wilms",
+ "lasti": "W"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "April",
+ "short": "Apr",
+ "digit": "04"
+ },
+ "dayofweek": {
+ "long": "Wednesday",
+ "short": "Wed"
+ },
+ "day": {
+ "long": "13",
+ "short": "13",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "10",
+ "short": "10",
+ "military": "10",
+ "ampm": "am"
+ },
+ "minute": {
+ "long": "14",
+ "short": "14"
+ },
+ "seconds": "52"
+ },
+ "5": {
+ "title": "Marshall McLuhan Colbert bump backpack journalist vast wasteland Romenesko CPM",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/people/grayscale",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/animals",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/arch",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/arch",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/arch",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Blog meme masthead DocumentCloud Fou",
+ "medium": "Square tabloid Andy Carvin stupid commenters, Nick Denton mathewi semip"
+ },
+ "excerpt": {
+ "short": "I love the Weather & Opera section Groupon copyright in the slot, Journal Register open newsroom analytics future totally blowing up on Twitter AOL.",
+ "medium": "CTR mthomps Flipboard do what you do best and link to the rest Buttry media bias Journal Register RT, newspaper strike do what you do best and link to the rest semipermeable learnings cognitive surplus mathewi, Encyclo Google News.",
+ "long": "Pulse mathewi Project Thunderdome digital first. HuffPo social media optimization try PR dying the notion of the public monetization data visualization audience atomization overcome community, libel lawyer twitterati should isn't a business model fair use innovation Facebook AOL, Walter Cronkite died for your sins horse-race coverage crowdfunding Patch but what's the business model rubber cement horse-race coverage. Lucius Nieman content farm."
+ },
+ "description": "Like button audience atomization overcome Colbert bump Free Darko inverted pyramid we will make them pay, digital circulation strategy Like button totally blowing up on Twitter church of the savvy. Pictures of Goats section open source discuss Frontline analog thinking filters paidContent.",
+ "url": "http://www.niemanlab.org/journo-ipsum/",
+ "name": {
+ "first": "Frans",
+ "firsti": "F",
+ "middle": "Fabius",
+ "middlei": "F",
+ "last": "Keegan",
+ "lasti": "K"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "May",
+ "short": "May",
+ "digit": "05"
+ },
+ "dayofweek": {
+ "long": "Thursday",
+ "short": "Thu"
+ },
+ "day": {
+ "long": "26",
+ "short": "26",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "06",
+ "short": "6",
+ "military": "18",
+ "ampm": "pm"
+ },
+ "minute": {
+ "long": "37",
+ "short": "37"
+ },
+ "seconds": "24"
+ },
+ "6": {
+ "title": "Thunder, thunder, thundercats, Ho!",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/arch",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/animals",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/people/grayscale",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/people/grayscale",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/people/grayscale",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Hong Kong Phooey, number one super g",
+ "medium": "Hong Kong Phooey, quicker than the human eye. He's got style, a groovy"
+ },
+ "excerpt": {
+ "short": "Style, and a car that just won't stop. When the going gets tough, he's really rough, with a Hong Kong Phooey chop (Hi-Ya!). Hong Kong Phooey, number.",
+ "medium": "One super guy. Hong Kong Phooey, quicker than the human eye. Hong Kong Phooey, he's fan-riffic! One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one.",
+ "long": "It's a pretty story. Sharing everything with fun, that's the way to be. One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, can sound pretty corny. If you've got a problem chum, think how it could be. This is my boss, Jonathan Hart, a self-made millionaire, he's quite a guy. This is Mrs H., she's gorgeous, she's one lady who knows how to take care of herself."
+ },
+ "description": "Beats all you've ever saw, been in trouble with the law since the day they was born. Straight'nin' the curve, flat'nin' the hills. Someday the mountain might get 'em, but the law never will. Makin' their way, the only way they know how, that's just a little bit more than the law will allow. Just good ol' boys, wouldn't change if they could, fightin' the system like a true modern day Robin Hood.",
+ "url": "http://www.malevole.com/mv/misc/text/",
+ "name": {
+ "first": "Fergus",
+ "firsti": "F",
+ "middle": "Jon",
+ "middlei": "J",
+ "last": "Althuis",
+ "lasti": "A"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "June",
+ "short": "Jun",
+ "digit": "06"
+ },
+ "dayofweek": {
+ "long": "Friday",
+ "short": "Fri"
+ },
+ "day": {
+ "long": "08",
+ "short": "8",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "11",
+ "short": "11",
+ "military": "23",
+ "ampm": "pm"
+ },
+ "minute": {
+ "long": "37",
+ "short": "37"
+ },
+ "seconds": "33"
+ },
+ "7": {
+ "title": "Yeah, I like animals better than people sometimes",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/any",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/any",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/any",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/any",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/any",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Now that we know who you are, I know",
+ "medium": "Who I am. I'm not a mistake! It all makes sense! In a comic, you know"
+ },
+ "excerpt": {
+ "short": "How you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me.",
+ "medium": "The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amin.",
+ "long": "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb. Acid lysine. Unless they're."
+ },
+ "description": "Especially dogs. Dogs are the best. Every time you come home, they act like they haven't seen you in a year. And the good thing about dogs... is they got different dogs for different people. Like pit bulls. The dog of dogs. Pit bull can be the right man's best friend... or the wrong man's worst enemy. You going to give me a dog for a pet, give me a pit bull.",
+ "url": "http://slipsum.com/lite/",
+ "name": {
+ "first": "Bertil",
+ "firsti": "B",
+ "middle": "Pier",
+ "middlei": "P",
+ "last": "Aaij",
+ "lasti": "A"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "July",
+ "short": "Jul",
+ "digit": "07"
+ },
+ "dayofweek": {
+ "long": "Saturday",
+ "short": "Sat"
+ },
+ "day": {
+ "long": "22",
+ "short": "22",
+ "ordinal": "nd"
+ },
+ "hour": {
+ "long": "11",
+ "short": "11",
+ "military": "11",
+ "ampm": "am"
+ },
+ "minute": {
+ "long": "12",
+ "short": "12"
+ },
+ "seconds": "47"
+ },
+ "8": {
+ "title": "Webtwo ipsum dolor sit amet, eskobo chumby doostang bebo",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/any/grayscale",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/any/grayscale",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/any/grayscale",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/any/grayscale",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/any/grayscale",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Webtwo ipsum dolor sit amet, eskobo",
+ "medium": "Chumby doostang bebo. Wakoopa oooj geni zoho loopt eskobo sifteo chart"
+ },
+ "excerpt": {
+ "short": "Dropio, chumby waze dopplr plugg oooj yammer jibjab imvu yuntaa knewton, mobly trulia airbnb bitly chegg tivo empressr knewton. Plickers spock voxy.",
+ "medium": "Zooomr kippt voxy zinch appjet napster trulia, zappos wufoo zapier spotify mzinga jaiku fleck, disqus lijit voxy voki yoono. Dogster elgg jibjab xobni kazaa bebo udemy sifteo kiko, elgg knewton skype mog octopart zoodles kazaa udem.",
+ "long": "Appjet spock handango empressr lijit palantir weebly dropio jibjab revver kaboodle spotify orkut mobly chegg akismet, handango ebay woopra revver joukuu kosmix unigo oooooc wufoo zanga kno zinch spock knewton. Balihoo greplin bebo squidoo skype kaboodle meebo disqus joost gooru, zlio tumblr edmodo palantir eskobo shopify kiko gsnap. Greplin balihoo chartly plugg imeem diigo trulia plickers qeyno wikia akismet, palantir grockit prezi jabber zo."
+ },
+ "description": "Wufoo diigo grockit sifteo divvyshot, unigo zooomr revver. Edmodo appjet joyent skype bubbli jajah zoodles joukuu xobni hojoki edmodo appjet, mozy mzinga akismet yuntaa joost yuntaa geni tivo insala yoono chumby, grockit sococo loopt zanga etsy cloudera koofers empressr jiglu blippy. Omgpop lanyrd joukuu sococo zimbra airbnb movity jibjab, foodzie.",
+ "url": "http://web20ipsum.com",
+ "name": {
+ "first": "Freyr",
+ "firsti": "F",
+ "middle": "Ninian",
+ "middlei": "N",
+ "last": "Hines",
+ "lasti": "H"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "August",
+ "short": "Aug",
+ "digit": "08"
+ },
+ "dayofweek": {
+ "long": "Sunday",
+ "short": "Sun"
+ },
+ "day": {
+ "long": "31",
+ "short": "31",
+ "ordinal": "st"
+ },
+ "hour": {
+ "long": "03",
+ "short": "3",
+ "military": "15",
+ "ampm": "pm"
+ },
+ "minute": {
+ "long": "42",
+ "short": "42"
+ },
+ "seconds": "21"
+ },
+ "9": {
+ "title": "Rebel Mission to Ord Mantell",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/any/sepia",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/any/sepia",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/any/sepia",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/any/sepia",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/any/sepia",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "All right. Well, take care of yourself, Han",
+ "medium": "You don't believe in the Force, do you? The Force is strong with this one"
+ },
+ "excerpt": {
+ "short": "I'm trying not to, kid. I find your lack of faith disturbing. You are a part of the Rebel Alliance and a traitor! Take her away! I want to come with.",
+ "medium": "I'm surprised you had the courage to take the responsibility yourself. Don't be too proud of this technological terror you've constructed. The ability to destroy a planet is insignificant next to the power of the Force. You don't be.",
+ "long": "A tremor in the Force. The last time I felt it was in the presence of my old master. You don't believe in the Force, do you? I have traced the Rebel spies to her. Now she is my only link to finding their secret base. A tremor in the Force. The last time I felt it was in the presence of my old master. I'm trying not to, kid. The more you tighten your grip, Tarkin, the more star systems will slip through your fingers. There's nothing for me here."
+ },
+ "description": "I find your lack of faith disturbing. A tremor in the Force. The last time I felt it was in the presence of my old master. Don't act so surprised, Your Highness. You weren't on any mercy mission this time. Several transmissions were beamed to this ship by Rebel spies. I want to know what happened to the plans they sent you. The plans you refer to will soon be back in our hands.",
+ "url": "http://chrisvalleskey.com/fillerama/",
+ "name": {
+ "first": "Jacobus",
+ "firsti": "J",
+ "middle": "Domitianus",
+ "middlei": "D",
+ "last": "Sneiders",
+ "lasti": "S"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "September",
+ "short": "Sep",
+ "digit": "09"
+ },
+ "dayofweek": {
+ "long": "Monday",
+ "short": "Mon"
+ },
+ "day": {
+ "long": "04",
+ "short": "4",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "09",
+ "short": "9",
+ "military": "09",
+ "ampm": "am"
+ },
+ "minute": {
+ "long": "04",
+ "short": "4"
+ },
+ "seconds": "37"
+ },
+ "10": {
+ "title": "Help, help, I'm being repressed!",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/tech/grayscale",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/nature/grayscale",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/arch/grayscale",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/arch/grayscale",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/arch/grayscale",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "The swallow may fly south with the sun",
+ "medium": "On second thoughts, let's not go there. It is a silly place. You don't"
+ },
+ "excerpt": {
+ "short": "The swallow may fly south with the sun, and the house martin or the plover may seek warmer climes in winter, yet these are not strangers to our land.",
+ "medium": "The Knights Who Say Ni demand a sacrifice! Found them? In Mercia?! The coconut's tropical! Where'd you get the coconuts? Why do you think that she is a witch? I am your king. You don't vote for kings. But you are dressed as one. Oh, ow!",
+ "long": "Well, I didn't vote for you. Burn her! Be quiet! He hasn't got shit all over him. Where'd you get the coconuts? The swallow may fly south with the sun, and the house martin or the plover may seek warmer climes in winter, yet these are not strangers to our land. No! Yes, yes. A bit. But she's got a wart. Shut up! Will you shut up?! I have to push the pram a lot. Now, look here, my good man. Frighten us, English pig-dogs! Go and boil your bottoms."
+ },
+ "description": "The Knights Who Say Ni demand a sacrifice! …Are you suggesting that coconuts migrate? Knights of Ni, we are but simple travelers who seek the enchanter who lives beyond these woods. You don't frighten us, English pig-dogs! Go and boil your bottoms, sons of a silly person! I blow my nose at you, so-called Ah-thoor Keeng, you and all your silly English K-n-n-n-n-n-n-n-niggits!",
+ "url": "http://chrisvalleskey.com/fillerama/",
+ "name": {
+ "first": "Plinius",
+ "firsti": "P",
+ "middle": "Varinius",
+ "middlei": "V",
+ "last": "Sloane",
+ "lasti": "S"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "October",
+ "short": "Oct",
+ "digit": "10"
+ },
+ "dayofweek": {
+ "long": "Tuesday",
+ "short": "Tue"
+ },
+ "day": {
+ "long": "25",
+ "short": "25",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "03",
+ "short": "3",
+ "military": "03",
+ "ampm": "am"
+ },
+ "minute": {
+ "long": "51",
+ "short": "51"
+ },
+ "second": "19"
+ },
+ "11": {
+ "title": "Danish danish candy canes bonbon cheesecake danish marzipan",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/tech/sepia",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/animals/sepia",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/arch/sepia",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/arch/sepia",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/arch/sepia",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Carrot cake fruitcake dessert apple",
+ "medium": "Pie powder lemon drops sesame snaps cake brownie. Biscuit ice cream gin"
+ },
+ "excerpt": {
+ "short": "Bread cotton candy marzipan. Baker too go gingerbread topping cupcake donut. Fruitcake marzipan bear claw tart toffee candy cheesecake. Lemon drops.",
+ "medium": "Cupcake chupa chups pudding gummies. Unerdwear.com cupcake candy soufflé sesame snaps macaroon sesame snaps. Tart dragée muffin. Sweet roll gummi bears caramels fruitcake candy cake. Cotton candy carrot cake tart cotton candy. Jelly.",
+ "long": "Gingerbread candy icing pastry cake bonbon fruitcake donut. Powder liquorice dessert tart croissant cake. Dessert chocolate cake sweet roll candy candy sesame snaps tiramisu ice cream. Candy candy canes marzipan biscuit cupcake pie pudding. Donut cotton candy muffin. Pastry bear claw icing halvah. Gingerbread cotton candy sweet roll toffee chocolate jujubes. Wafer jujubes danish ice cream lemon drops wafer. Sesame snaps cupcake gummies browni."
+ },
+ "description": "Sugar plum wafer soufflé ice cream. Wafer topping biscuit pie gummi bears topping. Gummies toffee powder applicake oat cake cookie. Bear claw candy tootsie roll fruitcake danish applicake candy canes macaroon. Liquorice tiramisu danish cotton candy gummies. Tiramisu dessert gummi bears macaroon sweet roll jelly-o gummi bears marzipan.",
+ "url": "http://cupcakeipsum.com/",
+ "name": {
+ "first": "Matthias",
+ "firsti": "M",
+ "middle": "Brady",
+ "middlei": "B",
+ "last": "Macguinness",
+ "lasti": "M"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "November",
+ "short": "Nov",
+ "digit": "11"
+ },
+ "dayofweek": {
+ "long": "Wednesday",
+ "short": "Wed"
+ },
+ "day": {
+ "long": "19",
+ "short": "19",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "11",
+ "short": "11",
+ "military": "23",
+ "ampm": "pm"
+ },
+ "minute": {
+ "long": "55",
+ "short": "55"
+ },
+ "seconds": "12"
+ },
+ "12": {
+ "title": "Cottage cheese brie lancashire. Boursin when the cheese comes out.",
+ "img": {
+ "avatar": {
+ "src": "http://placeimg.com/100/100/people/sepia",
+ "alt": "Avatar"
+ },
+ "square": {
+ "src": "http://placeimg.com/300/300/people/sepia",
+ "alt": "Square"
+ },
+ "rectangle": {
+ "src": "http://placeimg.com/400/300/people/sepia",
+ "alt": "Rectangle"
+ },
+ "landscape-4x3": {
+ "src": "http://placeimg.com/400/300/people/sepia",
+ "alt": "4x3 Image"
+ },
+ "landscape-16x9": {
+ "src": "http://placeimg.com/640/360/people/sepia",
+ "alt": "16x9 Image"
+ }
+ },
+ "headline": {
+ "short": "Cauliflower cheese cream cheese baby",
+ "medium": "Lancashire cheesy feet rubber cheese cheese and wine gouda the big chee"
+ },
+ "excerpt": {
+ "short": "Queso fromage. Taleggio boursin bavarian bergkase cream cheese when the cheese comes out everybody's happy port-salut halloumi pecorino. Caerphilly cut the cheese manchego camembert de normandie goat melted cheese cheese and biscuit.",
+ "medium": "Pecorino queso lancashire. Manchego lancashire cheesy feet emmental babybel cheese strings dolcelatte bavarian bergkase. Ricotta cheese slices cheesy grin cow cheesecake smelly cheese mascarpone lancashire. Cow say cheese babybel do.",
+ "long": "Cheesy grin macaroni cheese airedale. Fromage frais airedale cheese and wine brie cow swiss swiss mozzarella. Emmental cheese triangles edam rubber cheese pepper jack ricotta airedale airedale. Brie parmesan smelly cheese cheese strings stinking bishop cheese strings taleggio. Bocconcini blue castello gouda. Everyone loves caerphilly rubber cheese halloumi smelly cheese melted cheese melted cheese bavarian bergkase. Rubber cheese ricotta emm."
+ },
+ "description": "Queso caerphilly cheesecake. Parmesan chalk and cheese port-salut port-salut babybel cottage cheese cheesy grin pepper jack. Croque monsieur paneer st. agur blue cheese emmental airedale monterey jack bavarian bergkase cheese triangles. Halloumi parmesan.",
+ "url": "http://www.cheeseipsum.co.uk/",
+ "name": {
+ "first": "Aquila",
+ "firsti": "A",
+ "middle": "Gaius",
+ "middlei": "G",
+ "last": "Achterkamp",
+ "lasti": "A"
+ },
+ "year": {
+ "long": "2013",
+ "short": "13"
+ },
+ "month": {
+ "long": "December",
+ "short": "Dec",
+ "digit": "12"
+ },
+ "dayofweek": {
+ "long": "Thursday",
+ "short": "Thu"
+ },
+ "day": {
+ "long": "28",
+ "short": "28",
+ "ordinal": "th"
+ },
+ "hour": {
+ "long": "08",
+ "short": "8",
+ "military": "08",
+ "ampm": "am"
+ },
+ "minute": {
+ "long": "34",
+ "short": "34"
+ },
+ "seconds": "56"
+ }
+}
\ No newline at end of file
diff --git a/source/_data/annotations.js b/source/_data/annotations.js
new file mode 100644
index 000000000..3919bced6
--- /dev/null
+++ b/source/_data/annotations.js
@@ -0,0 +1,34 @@
+var comments = {
+"comments" : [
+ {
+ "el": "header[role=banner]",
+ "title" : "Masthead",
+ "comment": "The main header of the site doesn't take up too much screen real estate in order to keep the focus on the core content. It's using a linear CSS gradient instead of a background image to give greater design flexibility and reduce HTTP requests."
+ },
+ {
+ "el": ".logo",
+ "title" : "Logo",
+ "comment": "The logo image is an SVG file, which ensures that the logo displays crisply even on high resolution displays. A PNG fallback is provided for browsers that don't support SVG images.
Further reading: Optimizing Web Experiences for High Resolution Screens
"
+ },
+ {
+ "el": "#nav",
+ "title" : "Navigation",
+ "comment": "Navigation for adaptive web experiences can be tricky. Top navigations are typical on desktop sites, but mobile screen sizes don't give us the luxury of space. We're dealing with this situation by creating a simple menu anchor that toggles the main navigation on small screens. This is just one method. Bagcheck and Contents Magazine add an anchor in the header that jumps users to the navigation which is placed in the footer. This solution works well because it doesn't require any Javascript in order to work. Other methods exist too. For example, ESPN's mobile navigation overlays the main content of the page.
The nav is only hidden when a certain level of javascript is supported in order to ensure that users with little/poor javascript support can still access the navigation. Once the screen size is large enough to accommodate the nav, we show the main navigation links and hide the menu anchor.
See also: Responsive Navigation Patterns
"
+ },
+ {
+ "el": ".search-form",
+ "title" : "Search",
+ "comment": "Search is an incredibly important priority, especially for mobile. It is a great idea to give users the ability to jump directly to what they are looking for without forcing them to wade through your site's navigation. Check out the Burton and Yelp mobile sites for great examples of experiences that prioritize search.
We're also using the HTML5 search input type , which is great for mobile devices that can bring up the appropriate virtual keyboard for many smartphones. And like the main header navigation, we're hiding the search form on small screens to save space. Clicking the search anchor toggles the form.
"
+ },
+ {
+ "el": ".article-header h1",
+ "title" : "Article Header",
+ "comment": "The article header should be no more than 140 characters.
"
+ },
+ {
+ "el": ".block-hero",
+ "title" : "Hero",
+ "comment": "The hero area highlights one major story using a large image and a captivating headline.
"
+ }
+]
+};
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/00-meta/_00-head.mustache b/source/_patterns/00-atoms/00-meta/_00-head.mustache
new file mode 100644
index 000000000..938c0d2db
--- /dev/null
+++ b/source/_patterns/00-atoms/00-meta/_00-head.mustache
@@ -0,0 +1,16 @@
+
+
+
+ {{ title }}
+
+
+
+
+
+
+ {% pattern-lab-head %}
+
+
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/00-meta/_01-foot.mustache b/source/_patterns/00-atoms/00-meta/_01-foot.mustache
new file mode 100644
index 000000000..5bd39a972
--- /dev/null
+++ b/source/_patterns/00-atoms/00-meta/_01-foot.mustache
@@ -0,0 +1,6 @@
+
+
+ {% pattern-lab-foot %}
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/01-theme/00-colors.mustache b/source/_patterns/00-atoms/01-theme/00-colors.mustache
new file mode 100644
index 000000000..7f2653f8d
--- /dev/null
+++ b/source/_patterns/00-atoms/01-theme/00-colors.mustache
@@ -0,0 +1,38 @@
+
+
+
+ #ff0000
+
+
+
+ #00ff00
+
+
+
+ #0000ff
+
+
+
+ #ffff00
+
+
+
+ #00ffff
+
+
+
+ #ff00ff
+
+
+
+ #ffffff
+
+
+
+ #808080
+
+
+
+ #000000
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/01-theme/01-fonts.mustache b/source/_patterns/00-atoms/01-theme/01-fonts.mustache
new file mode 100644
index 000000000..26b4b7bb5
--- /dev/null
+++ b/source/_patterns/00-atoms/01-theme/01-fonts.mustache
@@ -0,0 +1,6 @@
+Primary font: "HelveticaNeue", "Helvetica", "Arial", sans-serif;
+Primary font italic: "HelveticaNeue", "Helvetica", "Arial", sans-serif;
+Primary font bold: "HelveticaNeue", "Helvetica", "Arial", sans-serif;
+Secondary font: Georgia, Times, "Times New Roman", serif;
+Secondary font italic: Georgia, Times, "Times New Roman", serif;
+Secondary font bold: Georgia, Times, "Times New Roman", serif;
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/02-headings/00-headings.mustache b/source/_patterns/00-atoms/02-headings/00-headings.mustache
new file mode 100644
index 000000000..43f648c7f
--- /dev/null
+++ b/source/_patterns/00-atoms/02-headings/00-headings.mustache
@@ -0,0 +1,6 @@
+Heading Level 1
+Heading Level 2
+Heading Level 3
+Heading Level 4
+Heading Level 5
+Heading Level 6
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/03-lists/00-unordered.mustache b/source/_patterns/00-atoms/03-lists/00-unordered.mustache
new file mode 100644
index 000000000..3f9de349f
--- /dev/null
+++ b/source/_patterns/00-atoms/03-lists/00-unordered.mustache
@@ -0,0 +1,14 @@
+
+
+ This is a list item in an unordered list
+ An unordered list is a list in which the sequence of items is not important. Sometimes, an unordered list is a bulleted list. And this is a long list item in an unordered list that can wrap onto a new line.
+
+ Lists can be nested inside of each other
+
+ This is a nested list item
+ This is another nested list item in an unordered list
+
+
+ This is the last list item
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/03-lists/01-ordered.mustache b/source/_patterns/00-atoms/03-lists/01-ordered.mustache
new file mode 100644
index 000000000..e206c7b10
--- /dev/null
+++ b/source/_patterns/00-atoms/03-lists/01-ordered.mustache
@@ -0,0 +1,14 @@
+
+
+ This is a list item in an ordered list
+ An ordered list is a list in which the sequence of items is important. An ordered list does not necessarily contain sequence characters.
+
+ Lists can be nested inside of each other
+
+ This is a nested list item
+ This is another nested list item in an ordered list
+
+
+ This is the last list item
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/03-lists/02-definition.mustache b/source/_patterns/00-atoms/03-lists/02-definition.mustache
new file mode 100644
index 000000000..0488e0812
--- /dev/null
+++ b/source/_patterns/00-atoms/03-lists/02-definition.mustache
@@ -0,0 +1,10 @@
+
+ Definition List
+ A number of connected items or names written or printed consecutively, typically one below the other.
+ This is a term.
+ This is the definition of that term, which both live in a dl.
+ Here is another term.
+ And it gets a definition too, which is this line.
+ Here is term that shares a definition with the term below.
+ And it gets a definition too, which is this line.
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/00-logo.mustache b/source/_patterns/00-atoms/04-images/00-logo.mustache
new file mode 100644
index 000000000..c0f431f98
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/00-logo.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/01-landscape-4x3.mustache b/source/_patterns/00-atoms/04-images/01-landscape-4x3.mustache
new file mode 100644
index 000000000..cf874ee9d
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/01-landscape-4x3.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/02-landscape-16x9.mustache b/source/_patterns/00-atoms/04-images/02-landscape-16x9.mustache
new file mode 100644
index 000000000..9efc5eeb3
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/02-landscape-16x9.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/03-square.mustache b/source/_patterns/00-atoms/04-images/03-square.mustache
new file mode 100644
index 000000000..805cce5f2
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/03-square.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/04-avatar.mustache b/source/_patterns/00-atoms/04-images/04-avatar.mustache
new file mode 100644
index 000000000..6b79ad0c5
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/04-avatar.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/05-icons.mustache b/source/_patterns/00-atoms/04-images/05-icons.mustache
new file mode 100644
index 000000000..4e2512348
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/05-icons.mustache
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/06-loading-icon.mustache b/source/_patterns/00-atoms/04-images/06-loading-icon.mustache
new file mode 100644
index 000000000..9a10165ab
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/06-loading-icon.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/04-images/07-favicon.mustache b/source/_patterns/00-atoms/04-images/07-favicon.mustache
new file mode 100644
index 000000000..07e985d37
--- /dev/null
+++ b/source/_patterns/00-atoms/04-images/07-favicon.mustache
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/05-forms/00-text-fields.mustache b/source/_patterns/00-atoms/05-forms/00-text-fields.mustache
new file mode 100644
index 000000000..644ab826c
--- /dev/null
+++ b/source/_patterns/00-atoms/05-forms/00-text-fields.mustache
@@ -0,0 +1,38 @@
+
+
+
+ Password
+
+
+
+ Web Address
+
+
+
+ Email Address
+
+
+
+ Search
+
+
+
+
+ Textarea
+
+
+
+ Error Input
+
+
+
+ Valid
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/05-forms/01-select-menu.mustache b/source/_patterns/00-atoms/05-forms/01-select-menu.mustache
new file mode 100644
index 000000000..760c9199a
--- /dev/null
+++ b/source/_patterns/00-atoms/05-forms/01-select-menu.mustache
@@ -0,0 +1,12 @@
+
+
+ Select
+
+
+ Option One
+ Option Two
+ Option Three
+
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/05-forms/02-checkbox.mustache b/source/_patterns/00-atoms/05-forms/02-checkbox.mustache
new file mode 100644
index 000000000..017a8dc5c
--- /dev/null
+++ b/source/_patterns/00-atoms/05-forms/02-checkbox.mustache
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/05-forms/03-radio-buttons.mustache b/source/_patterns/00-atoms/05-forms/03-radio-buttons.mustache
new file mode 100644
index 000000000..68c83eaeb
--- /dev/null
+++ b/source/_patterns/00-atoms/05-forms/03-radio-buttons.mustache
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/05-forms/04-html5-inputs.mustache b/source/_patterns/00-atoms/05-forms/04-html5-inputs.mustache
new file mode 100644
index 000000000..99c22cce7
--- /dev/null
+++ b/source/_patterns/00-atoms/05-forms/04-html5-inputs.mustache
@@ -0,0 +1,10 @@
+
+ Color input
+ Number input
+ Range input
+ Date input
+ Month input
+ Week input
+ Datetime input
+ Datetime-local input
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/06-buttons/00-buttons.mustache b/source/_patterns/00-atoms/06-buttons/00-buttons.mustache
new file mode 100644
index 000000000..bdbeec360
--- /dev/null
+++ b/source/_patterns/00-atoms/06-buttons/00-buttons.mustache
@@ -0,0 +1,4 @@
+Button
+Alternate Button
+Disabled Button
+Text Button
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/07-tables/00-table.mustache b/source/_patterns/00-atoms/07-tables/00-table.mustache
new file mode 100644
index 000000000..53153d519
--- /dev/null
+++ b/source/_patterns/00-atoms/07-tables/00-table.mustache
@@ -0,0 +1,50 @@
+
+
+
+ Table Heading 1
+ Table Heading 2
+ Table Heading 3
+ Table Heading 4
+ Table Heading 5
+
+
+
+
+ Table Footer 1
+ Table Footer 2
+ Table Footer 3
+ Table Footer 4
+ Table Footer 5
+
+
+
+
+ Table Cell 1
+ Table Cell 2
+ Table Cell 3
+ Table Cell 4
+ Table Cell 5
+
+
+ Table Cell 1
+ Table Cell 2
+ Table Cell 3
+ Table Cell 4
+ Table Cell 5
+
+
+ Table Cell 1
+ Table Cell 2
+ Table Cell 3
+ Table Cell 4
+ Table Cell 5
+
+
+ Table Cell 1
+ Table Cell 2
+ Table Cell 3
+ Table Cell 4
+ Table Cell 5
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/08-media/_00-video.mustache b/source/_patterns/00-atoms/08-media/_00-video.mustache
new file mode 100644
index 000000000..f28fcd7fc
--- /dev/null
+++ b/source/_patterns/00-atoms/08-media/_00-video.mustache
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/08-media/_01-audio.mustache b/source/_patterns/00-atoms/08-media/_01-audio.mustache
new file mode 100644
index 000000000..91c82135e
--- /dev/null
+++ b/source/_patterns/00-atoms/08-media/_01-audio.mustache
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/09-text/00-paragraph.mustache b/source/_patterns/00-atoms/09-text/00-paragraph.mustache
new file mode 100644
index 000000000..4ed3f6c01
--- /dev/null
+++ b/source/_patterns/00-atoms/09-text/00-paragraph.mustache
@@ -0,0 +1 @@
+A paragraph (from the Greek paragraphos, "to write beside" or "written beside") is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/09-text/01-inline-elements.mustache b/source/_patterns/00-atoms/09-text/01-inline-elements.mustache
new file mode 100644
index 000000000..47aaa8928
--- /dev/null
+++ b/source/_patterns/00-atoms/09-text/01-inline-elements.mustache
@@ -0,0 +1,41 @@
+
+
This is a text link
+
+
Strong is used to indicate strong importance
+
+
This text has added emphasis
+
+
The b element is stylistically different text from normal text, without any special importance
+
+
The i element is text that is set off from the normal text
+
+
The u element is text with an unarticulated, though explicitly rendered, non-textual annotation
+
+
This text is deleted and This text is inserted
+
+
This text has a strikethrough
+
+
Superscript®
+
+
Subscript for things like H2 O
+
+
This small text is small for for fine print, etc.
+
+
Abbreviation: HTML
+
+
Keybord input: Cmd
+
+
This text is a short inline quotation
+
+
This is a citation
+
+
The dfn element indicates a definition.
+
+
The mark element indicates a highlight
+
+
This is what inline code looks like.
+
+
This is sample output from a computer program
+
+
The variable element , such as x = y
+
diff --git a/source/_patterns/00-atoms/09-text/02-blockquote.mustache b/source/_patterns/00-atoms/09-text/02-blockquote.mustache
new file mode 100644
index 000000000..2f11319b3
--- /dev/null
+++ b/source/_patterns/00-atoms/09-text/02-blockquote.mustache
@@ -0,0 +1,3 @@
+
+ A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text, and typically distinguished visually using indentation and a different typeface or smaller size quotation.
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/09-text/03-time.mustache b/source/_patterns/00-atoms/09-text/03-time.mustache
new file mode 100644
index 000000000..26cecc136
--- /dev/null
+++ b/source/_patterns/00-atoms/09-text/03-time.mustache
@@ -0,0 +1 @@
+2 weeks ago
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/09-text/04-hr.mustache b/source/_patterns/00-atoms/09-text/04-hr.mustache
new file mode 100644
index 000000000..1d6667d2e
--- /dev/null
+++ b/source/_patterns/00-atoms/09-text/04-hr.mustache
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/_patterns/00-atoms/09-text/05-links.mustache b/source/_patterns/00-atoms/09-text/05-links.mustache
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/css/scss/base/_animation.scss b/source/css/scss/base/_animation.scss
new file mode 100644
index 000000000..d28bc9136
--- /dev/null
+++ b/source/css/scss/base/_animation.scss
@@ -0,0 +1,13 @@
+.animate-fade {
+ @include transition(opacity, 0.3s, ease-out);
+
+ &:hover {
+ opacity: 0;
+ }
+}
+
+.animate-move {
+ > .demo-shape {
+ @include transition(all, 0.8s, ease-in-out);
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/base/_forms.scss b/source/css/scss/base/_forms.scss
new file mode 100644
index 000000000..1c02c6a83
--- /dev/null
+++ b/source/css/scss/base/_forms.scss
@@ -0,0 +1,111 @@
+/*------------------------------------*\
+ $FORMS
+\*------------------------------------*/
+form ol, form ul {
+ list-style: none;
+ margin-left: 0;
+}
+
+fieldset {
+ border: 0;
+ padding: 0;
+ margin: 0;
+}
+
+label {
+ display: block;
+ padding-bottom: $space-half;
+}
+
+button, input, select, textarea {
+ font-family: inherit;
+ font-size: 100%;
+ margin: 0 1px 0;
+}
+
+input, textarea {
+ width: 100%;
+ border: 1px solid $gray;
+ padding: $pad-half 0.65rem;
+}
+
+input[type=text], input[type=search], input[type=url], input[type=number], textarea {
+ -webkit-appearance: none;
+}
+
+button, input[type="submit"] {
+ padding: $pad-half;
+ background: $gray-dark;
+ border: 1px solid $gray;
+ cursor: pointer;
+}
+
+input[type="checkbox"],
+input[type="radio"] {
+ width: auto;
+ margin-right: 0.3em;
+}
+
+input[type="search"] {
+ -webkit-appearance: none;
+ border-radius: 0;
+}
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+//Form Field Container
+.field-container {
+ margin-bottom: $space;
+}
+
+.inline-form {
+ fieldset, .inline-container {
+ position: relative;
+ }
+
+ input[type=submit], button, .btn {
+ font-size: $font-size-small-2;
+ padding: 0.65rem 1.3rem;
+ background: $gray-dark;
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 1;
+ width: auto;
+
+ &:hover, &:focus {
+ background: $gray;
+ color: $white;
+ }
+ }
+}
+
+/* Validation */
+.has-error {
+ border-color: $error;
+}
+.is-valid {
+ border-color: $valid;
+}
+
+
+
+
+/*------------------------------------*\
+ $SPECIFIC FORMS
+\*------------------------------------*/
+
+/* Search Form */
+.search-field {
+ padding-right: 3em;
+}
+.inline-form .search-submit {
+ background: none;
+ padding: 0.78em 1em;
+ border: 0;
+ border-left: 1px solid $gray;
+ color: $gray;
+}
diff --git a/source/css/scss/base/_global-classes.scss b/source/css/scss/base/_global-classes.scss
new file mode 100644
index 000000000..2e13f8858
--- /dev/null
+++ b/source/css/scss/base/_global-classes.scss
@@ -0,0 +1,104 @@
+/*------------------------------------*\
+ $GLOBAL CLASSES
+\*------------------------------------*/
+
+/* Clearfix */
+.cf {
+ *zoom: 1;
+}
+.cf:before, .cf:after {
+ content: " "; /* 1 */
+ display: table; /* 2 */
+}
+
+.cf:after {
+ clear: both;
+}
+
+/* Completely remove from the flow and screen readers. */
+.is-hidden {
+ display: none !important;
+ visibility: hidden !important;
+}
+
+/* Completely remove from the flow but leave available to screen readers. */
+.is-vishidden {
+ position: absolute !important;
+ overflow: hidden;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ border: 0;
+ clip: rect(1px, 1px, 1px, 1px);
+}
+
+/* Floats */
+.right {
+ float: right;
+ padding: 0 0 $pad $pad;
+}
+
+.right-search {
+ float: right;
+ padding: 0 0 $pad 0;
+}
+
+.left {
+ float: left;
+ padding: 0 $pad $pad 0;
+}
+
+/* Text-Align */
+.align-right {
+ text-align: right;
+}
+
+.align-center {
+ text-align: center;
+}
+
+.align-left {
+ text-align: left;
+}
+
+/* Display Classes */
+.hide-small {
+ @media all and (max-width: $bp-med) {
+ display: none;
+ }
+}
+
+.hide-med {
+ @media all and (min-width: $bp-med) and (max-width: $bp-large) {
+ display: none;
+ }
+}
+
+.hide-large {
+ @media all and (min-width: $bp-large) {
+ display: none;
+ }
+}
+
+//States
+.valid {
+ color: $valid;
+}
+
+.error {
+ color: $error;
+}
+
+.warning {
+ color: $warning;
+}
+
+.information {
+ color: $information;
+}
+
+.font-secondary {
+ font-family: $font-secondary;
+}
+
+
diff --git a/source/css/scss/base/_headings.scss b/source/css/scss/base/_headings.scss
new file mode 100644
index 000000000..5f2433645
--- /dev/null
+++ b/source/css/scss/base/_headings.scss
@@ -0,0 +1,31 @@
+/* Headings */
+/*Further Reading: http:/csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/ */
+h1, .alpha {
+ line-height: 1.2;
+}
+
+h2, .beta {
+ line-height: 1.2;
+}
+
+h3, .gamma {
+ line-height: 1.2;
+}
+
+h4, .delta {
+
+}
+
+h5, .epsilon {
+
+}
+
+h6, .zeta {
+
+}
+
+/* Subheadings */
+.subheading {
+ font-family: $font-secondary;
+ font-weight: normal;
+}
diff --git a/source/css/scss/base/_links.scss b/source/css/scss/base/_links.scss
new file mode 100644
index 000000000..d70545d76
--- /dev/null
+++ b/source/css/scss/base/_links.scss
@@ -0,0 +1,10 @@
+/* Links */
+a {
+ color: $gray-dark;
+ text-decoration: none;
+ outline: 0;
+
+ &:hover, &:focus {
+ color: $gray;
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/base/_lists.scss b/source/css/scss/base/_lists.scss
new file mode 100644
index 000000000..4ceb7cf5c
--- /dev/null
+++ b/source/css/scss/base/_lists.scss
@@ -0,0 +1,19 @@
+ol, ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+/* Definition Lists */
+dl {
+ overflow: hidden;
+ margin: 0 0 $space;
+}
+
+dt {
+ font-weight: bold;
+}
+
+dd {
+ margin-left: 0;
+}
\ No newline at end of file
diff --git a/source/css/scss/base/_main.scss b/source/css/scss/base/_main.scss
new file mode 100644
index 000000000..f92fd1b34
--- /dev/null
+++ b/source/css/scss/base/_main.scss
@@ -0,0 +1,6 @@
+body {
+ background: $white;
+ font: 100%/1.5 $font;
+ -webkit-text-size-adjust: 100%;
+ color: $gray-dark;
+}
\ No newline at end of file
diff --git a/source/css/scss/base/_media.scss b/source/css/scss/base/_media.scss
new file mode 100644
index 000000000..ec74c8ffc
--- /dev/null
+++ b/source/css/scss/base/_media.scss
@@ -0,0 +1,23 @@
+/*------------------------------------*\
+ $MEDIA ELEMENTS
+\*------------------------------------*/
+
+/* Flexible Media */
+img, video, object {
+ max-width: 100%;
+ height: auto;
+}
+
+iframe {
+ margin-bottom: $space;
+}
+
+figure {
+ margin-bottom: $space;
+ img {
+ margin-bottom: $space-half;
+ }
+}
+figcaption {
+ font-style: italic;
+}
\ No newline at end of file
diff --git a/source/css/scss/base/_tables.scss b/source/css/scss/base/_tables.scss
new file mode 100644
index 000000000..1b2a2b2c4
--- /dev/null
+++ b/source/css/scss/base/_tables.scss
@@ -0,0 +1,18 @@
+/*------------------------------------*\
+ $Table
+\*------------------------------------*/
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ border: 1px solid $gray;
+ width: 100%;
+}
+th {
+ text-align: left;
+ border: 1px solid $gray;
+ padding: 0.2em;
+}
+td {
+ border: 1px solid $gray;
+ padding: 0.2em;
+}
\ No newline at end of file
diff --git a/source/css/scss/base/_text.scss b/source/css/scss/base/_text.scss
new file mode 100644
index 000000000..de17e3ec6
--- /dev/null
+++ b/source/css/scss/base/_text.scss
@@ -0,0 +1,26 @@
+/* Text-Related Elements */
+p {
+ margin-bottom: $space;
+}
+
+/* Blockquote */
+blockquote {
+ font-style:italic;
+ border-left: 1px solid $gray;
+ color: $gray;
+ padding-left: $pad;
+ margin-bottom: $space;
+}
+
+/* Horizontal Rule */
+hr {
+ border: 0;
+ height: 2px;
+ background: $gray-light-2;
+ margin: $space-double 0;
+}
+
+abbr {
+ border-bottom: 1px dotted $gray;
+ cursor: help;
+}
\ No newline at end of file
diff --git a/source/css/scss/generic/_mixins.scss b/source/css/scss/generic/_mixins.scss
new file mode 100644
index 000000000..14d8a2a3d
--- /dev/null
+++ b/source/css/scss/generic/_mixins.scss
@@ -0,0 +1,23 @@
+/*------------------------------------*\
+ $MIXINS
+\*------------------------------------*/
+
+/* CSS Transition
+ Usage: @include transition(width,0.3s,ease-out);
+ */
+@mixin transition($transition-property, $transition-time, $method) {
+ -webkit-transition: $transition-property $transition-time $method;
+ -moz-transition: $transition-property $transition-time $method;
+ -ms-transition: $transition-property $transition-time $method;
+ -o-transition: $transition-property $transition-time $method;
+ transition: $transition-property $transition-time $method;
+}
+
+/* Rem Unit font sizes with relative fallback http:/seesparkbox.com/foundry/scss_rem_mixin_now_with_a_better_fallback
+ Usage: @include font-size(1, large);
+*/
+@mixin font-size( $decimal-size, $keyword: null ) {
+ @if $keyword{ font-size: $keyword; }
+ @else { font-size: $decimal-size * $base-font-multiplier * 16px;}
+ font-size: $decimal-size * 1rem;
+}
\ No newline at end of file
diff --git a/source/css/scss/generic/_reset.scss b/source/css/scss/generic/_reset.scss
new file mode 100644
index 000000000..e7807ec72
--- /dev/null
+++ b/source/css/scss/generic/_reset.scss
@@ -0,0 +1,17 @@
+/*------------------------------------*\
+ $RESET
+\*------------------------------------*/
+
+/* Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/ */
+* {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+html, body, div, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, ol, ul, li, form, legend, label, table, header, footer, nav, section, figure {
+ margin: 0;
+ padding: 0;
+}
+header, footer, nav, section, article, hgroup, figure {
+ display: block;
+}
\ No newline at end of file
diff --git a/source/css/scss/generic/_variables.scss b/source/css/scss/generic/_variables.scss
new file mode 100644
index 000000000..3e7ccbcba
--- /dev/null
+++ b/source/css/scss/generic/_variables.scss
@@ -0,0 +1,65 @@
+/*------------------------------------*\
+ $VARIABLES
+\*------------------------------------*/
+
+//Colors
+$gray : #808080;
+$gray-light : #f9f9f9;
+$gray-light-2 : #eee;
+$gray-light-3 : #ddd;
+$gray-med : #666;
+$gray-dark : #333;
+$gray-dark-2 : #131313;
+$white : #fff;
+$black : #000;
+$dim : rgba(0,0,0,0.5);
+$error : #f00;
+$valid : #089e00;
+$warning : #fff664;
+$information : #000db5;
+
+
+//Typography
+$font : "HelveticaNeue", "Helvetica", "Arial", sans-serif;
+$font-secondary : Georgia, Times, "Times New Roman", serif;
+
+$font-size-small : 0.75em;
+$font-size-small-2 : 0.875em;
+$font-size-med : 1em;
+$font-size-med-2: 1.0625em;
+$font-size-large : 1.4375em;
+
+
+//Layout
+$max-width: 72em;
+
+//Defaults
+$space : 1em;
+$space-and-half : $space*1.5;
+$space-double : $space*2;
+$space-quad : $space*4;
+$space-half : $space/2;
+$pad : 1em;
+$pad-and-half : $pad*1.5;
+$pad-double : $pad*2;
+$pad-half : $pad/2;
+$pad-quarter :$pad/4;
+
+//Borders
+$border-med: 3px;
+$border-thick: 7px;
+
+
+//Breakpoints
+$bp-small : 24em;
+$bp-small-2 : 29.75em;
+$bp-small-3 : 39.8em;
+$bp-med : 46.8em;
+$bp-med-2 : 48em;
+$bp-large : 50em;
+$bp-large-2 : 66em;
+$bp-xl : 73em;
+$bp-xxl : 89em;
+$bp-xxxl : 93em;
+
+//
\ No newline at end of file
diff --git a/source/css/scss/objects/_accordion.scss b/source/css/scss/objects/_accordion.scss
new file mode 100644
index 000000000..3423544c9
--- /dev/null
+++ b/source/css/scss/objects/_accordion.scss
@@ -0,0 +1,33 @@
+.accordion {
+ margin-bottom: $space;
+}
+
+.acc-handle {
+ background: $gray-dark-2;
+ color: $white;
+ font-family: $font-secondary;
+ font-weight: bold;
+ display: block;
+ position: relative;
+ padding: $pad-half;
+ border-bottom: 1px solid $gray-light-3;
+
+ &:after {
+ content:"+";
+ float: right;
+ }
+
+ &:hover {
+ color: $white;
+ background: $gray-dark;
+
+ }
+
+ &.active {
+ background: $gray-dark;
+
+ &:after {
+ content:"-";
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_article.scss b/source/css/scss/objects/_article.scss
new file mode 100644
index 000000000..55387309e
--- /dev/null
+++ b/source/css/scss/objects/_article.scss
@@ -0,0 +1,34 @@
+//Article
+.article-header {
+ h1 {
+ font-size: 2.5em;
+ }
+}
+
+.byline {
+ font-size: $font-size-small-2;
+ font-style: italic;
+ margin-bottom: $space-half;
+}
+
+//Social Share
+.social-share {
+ overflow: hidden;
+ margin-bottom: $space;
+
+ li {
+ float: left;
+ margin-right: $space-half;
+ }
+
+ a {
+ background: $gray-dark;
+ color: $white;
+ display: block;
+ padding: $pad-half;
+
+ &:hover {
+ background: $gray;
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_blocks.scss b/source/css/scss/objects/_blocks.scss
new file mode 100644
index 000000000..160963bd6
--- /dev/null
+++ b/source/css/scss/objects/_blocks.scss
@@ -0,0 +1,138 @@
+/* Generic Placeholder Brick: REMOVE FOR PRODUCTION */
+.brick {
+ background: #dcdddc;
+ padding: $pad-double;
+ text-align: center;
+ font-weight: bold;
+ border-bottom: 1px solid $gray-light-2;
+}
+
+/* Block */
+.block {
+ overflow: hidden;
+
+ p:last-child {
+ margin-bottom: 0;
+ }
+}
+
+.headline {
+ line-height: 1.2;
+}
+
+/* Hero Block */
+.block-hero {
+ margin-bottom: $space-half;
+
+ .b-thumb {
+ img {
+ display: block;
+ }
+ }
+
+ @media all and (min-width: $bp-large) {
+ position: relative;
+
+ .b-text {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ background: $dim;
+ color: $white;
+ padding: $pad-and-half;
+ }
+ }
+}
+
+/* Block Thumbnail with Headline */
+.block-thumb {
+ display: table;
+ width: 100%;
+ border-collapse: collapse;
+
+ .b-inner {
+ display: table-row;
+ vertical-align: top;
+ overflow: hidden;
+ }
+
+ .b-thumb {
+ @media all and (min-width: $bp-small-2) {
+ display: table-cell;
+ vertical-align: top;
+ width: 30%;
+ max-width: 10em;
+
+ img {
+ display: block;
+ width: 100%;
+ height: auto;
+ }
+ }
+ }
+
+ .b-text {
+ @media all and (min-width: $bp-small-2) {
+ display: table-cell;
+ width: 70%;
+ padding: 0 $pad;
+ }
+ }
+}
+
+
+/* Block Headline Summary */
+.block-headline-summary {
+ a {
+ display: block;
+ padding: $pad-half;
+ }
+}
+
+/* Block Inset */
+.block-inset {
+ position: relative;
+
+ .b-thumb {
+ position: relative;
+ z-index: 0;
+
+ img {
+ display: block;
+ }
+ }
+}
+
+/* Hero Block */
+.block-inset {
+ margin-bottom: $space-half;
+ position: relative;
+
+ .headline {
+ font-size: 1.1em;
+ }
+
+ .b-text {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ background: $dim;
+ color: $white;
+ padding: $pad-half;
+ }
+}
+
+/* Block Thumb with Summary */
+.block-thumb-summary {
+ .b-thumb {
+ float: left;
+ width: 50%;
+ }
+
+ .b-text {
+ margin-left: 50%;
+ padding: $pad-half;
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_buttons.scss b/source/css/scss/objects/_buttons.scss
new file mode 100644
index 000000000..0ae2805e1
--- /dev/null
+++ b/source/css/scss/objects/_buttons.scss
@@ -0,0 +1,40 @@
+/*------------------------------------*\
+ $BUTTONS
+\*------------------------------------*/
+.btn {
+ display: inline-block;
+ background: $gray-dark;
+ color: $white;
+ line-height: 1;
+ font-weight: bold;
+ padding: $pad;
+ border: 0;
+ text-align: center;
+
+ &:hover, &:focus {
+ background: $gray;
+ color: $white;
+ }
+
+ &.disabled {
+ background: $gray-light-2;
+ color: $gray;
+ }
+}
+
+.btn-small {
+ padding: $pad-half;
+}
+
+.btn-large {
+ padding: $pad-half;
+ text-transform: uppercase;
+ background: $gray;
+ font-size: 1.4rem;
+ font-weight: normal;
+}
+
+
+.text-btn {
+ font-style: italic;
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_carousels.scss b/source/css/scss/objects/_carousels.scss
new file mode 100644
index 000000000..77e3f197b
--- /dev/null
+++ b/source/css/scss/objects/_carousels.scss
@@ -0,0 +1,38 @@
+/* Horizontal Carousel */
+.carousel-horizontal {
+ margin-bottom: $space;
+ overflow: hidden;
+ position: relative;
+}
+
+.carousel-island-container {
+ overflow: hidden;
+}
+
+.carousel-container {
+ position: relative;
+}
+
+.carousel-list {
+
+}
+
+.carousel-controls {
+ display: table;
+ width: 100%;
+ margin: (-$space-half) 0 $space;
+
+ a, div {
+ display: table-cell;
+ padding: $pad-half;
+ }
+
+ .carousel-pagination {
+ text-align: center;
+ }
+
+ .carousel-next {
+ text-align: right;
+ }
+
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_comments.scss b/source/css/scss/objects/_comments.scss
new file mode 100644
index 000000000..9959b7abf
--- /dev/null
+++ b/source/css/scss/objects/_comments.scss
@@ -0,0 +1,30 @@
+.comments {
+ li {
+ margin-bottom: $space;
+ }
+}
+
+.comment-container {
+ overflow: hidden;
+ margin-bottom: $space;
+ list-style: none;
+}
+
+.comment-meta {
+ float: left;
+ width: 6.5em;
+
+ img {
+ display: block;
+ border: 1px solid $gray-light-2;
+ margin-bottom: $space-half;
+ }
+}
+
+.comment-name {
+ font-size: $font-size-small;
+}
+
+.comment-text {
+ margin-left: 9em;
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_footer.scss b/source/css/scss/objects/_footer.scss
new file mode 100644
index 000000000..850f94bf4
--- /dev/null
+++ b/source/css/scss/objects/_footer.scss
@@ -0,0 +1,39 @@
+/*------------------------------------*\
+ $FOOTER
+\*------------------------------------*/
+.footer {
+ clear: both;
+ overflow: hidden;
+ background: $gray-dark-2;
+ color: $white;
+ line-height: 1.2;
+
+ a {
+ color: $gray-light;
+ }
+}
+
+//Footer Nav
+.nav-footer {
+ margin: (-$pad) (-$pad) $space;
+
+ li {
+ border-bottom: 1px solid $gray-dark;
+
+ @media all and (min-width: $bp-med) {
+ border: 0;
+ float: left;
+ }
+ }
+
+ a {
+ display: block;
+ padding: $pad;
+ }
+}
+
+.copyright {
+ @media all and (min-width: $bp-med) {
+ float: right;
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_header.scss b/source/css/scss/objects/_header.scss
new file mode 100644
index 000000000..8fb78d7ce
--- /dev/null
+++ b/source/css/scss/objects/_header.scss
@@ -0,0 +1,45 @@
+.header {
+ background: $white;
+ padding: 0;
+ border-bottom: 1px solid #dbdbdb;
+ @extend .lc;
+}
+
+.logo {
+ float: left;
+ max-width: 8rem;
+ margin: 0.4rem;
+
+ @media all and (min-width: $bp-med) {
+ max-width: 9rem;
+ }
+}
+
+.nav-toggle {
+ float: right;
+ display: block;
+ padding: 0.9rem 1rem 0.7rem;
+ font-size: 1.3rem;
+ line-height: 1;
+ border-left: 1px solid #dbdbdb;
+
+ @media all and (min-width: $bp-med) {
+ display: none;
+ }
+
+ @media all and (max-width: 17em) {
+ padding-left: 0.2rem;
+ padding-right: 0.2rem;
+ }
+}
+
+.search-form {
+ overflow: hidden;
+ max-height: 0;
+
+ @media all and (min-width: $bp-med) {
+ float: right;
+ max-height: none;
+ margin: 0.65em 0.5em 0 0;
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_icons.scss b/source/css/scss/objects/_icons.scss
new file mode 100644
index 000000000..cacbf1fbd
--- /dev/null
+++ b/source/css/scss/objects/_icons.scss
@@ -0,0 +1,125 @@
+
+/* Icon Font */
+@font-face {
+ font-family: 'icons';
+ src:url('../fonts/icons.eot');
+ src:url('../fonts/icons.eot?#iefix') format('embedded-opentype'),
+ url('../fonts/icons.woff') format('woff'),
+ url('../fonts/icons.ttf') format('truetype'),
+ url('../fonts/icons.svg#icons') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+
+/* Use the following CSS code if you want to use data attributes for inserting your icons */
+[data-icon]:before {
+ font-family: 'icons';
+ content: attr(data-icon);
+ speak: none;
+ font-weight: normal;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+}
+
+.icon-twitter:before, .icon-stumbleupon:before, .icon-pinterest:before, .icon-linkedin:before, .icon-google-plus:before, .icon-search:before, .icon-play:before, .icon-menu:before, .icon-arrow-left:before, .icon-arrow-right:before, .icon-bubble:before, .icon-facebook:before, .icon-feed:before, .icon-youtube:before, .icon-tag:before, .icon-tumblr:before, .icon-instagram, .icon-podcast, .icon-apple,.icon-android, .icon-arrow:after, .icon-envelope:before {
+ font-family: 'icons';
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+}
+.icon-twitter:before {
+ content: "\74";
+}
+.icon-stumbleupon:before {
+ content: "\75";
+}
+.icon-pinterest:before {
+ content: "\70";
+}
+.icon-linkedin:before {
+ content: "\69";
+}
+.icon-google-plus:before {
+ content: "\67";
+}
+.icon-search:before {
+ content: "\73";
+}
+.icon-play:before {
+ content: "\61";
+}
+.icon-menu:before {
+ content: "\21";
+}
+.icon-arrow-left:before {
+ content: "\23";
+}
+.icon-arrow-right:before {
+ content: "\24";
+}
+.icon-bubble:before {
+ content: "\25";
+}
+.icon-facebook:before {
+ content: "\66";
+}
+.icon-feed:before {
+ content: "\27";
+}
+.icon-youtube:before {
+ content: "\79";
+}
+.icon-tag:before {
+ content: "\28";
+}
+.icon-tumblr:before {
+ content: "\6d";
+}
+.icon-instagram:before {
+ content: "\22";
+}
+.icon-podcast:before {
+ content: "\26";
+}
+.icon-android:before {
+ content: "\29";
+}
+.icon-apple:before {
+ content: "\2a";
+}
+.icon-envelope:before {
+ content: "\2b";
+}
+
+
+.icon-arrow:after {
+ content: "\61";
+ display: inline-block;
+ -webkit-transform: rotate(90deg);
+ -moz-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ -o-transform: rotate(90deg);
+ transform: rotate(90deg);
+}
+
+.icon-play:before {
+ font-size: 0.7rem;
+ padding-left: 0.2em;
+}
+
+.icon-play-box {
+ display: block;
+ margin-left: $pad-double;
+}
+
+.icon-play-box:before {
+ padding: $pad-quarter;
+ background: $gray;
+ color: $white;
+ margin-left: -1.7rem;
+ margin-right: $pad-half;
+}
diff --git a/source/css/scss/objects/_layout.scss b/source/css/scss/objects/_layout.scss
new file mode 100644
index 000000000..4929d28e3
--- /dev/null
+++ b/source/css/scss/objects/_layout.scss
@@ -0,0 +1,288 @@
+/*------------------------------------*\
+ $LAYOUT
+\*------------------------------------*/
+
+/* Layout Container */
+.lc {
+ max-width: $max-width;
+ margin: 0 auto;
+ padding: $pad-half;
+}
+
+/*------------------------------------*\
+ $TEMPLATES
+\*------------------------------------*/
+
+/* Two Column Layout */
+.l-two-col {
+ @extend .cf;
+
+ .l-main {
+ @media all and (min-width: $bp-large) {
+ float: left;
+ width: 70%;
+ padding-right: $pad;
+ }
+ }
+
+ .l-sidebar {
+ @media all and (max-width: $bp-large) {
+ clear: both;
+ }
+
+ @media all and (min-width: $bp-large) {
+ float: left;
+ width: 30%;
+ padding: 0 0 0 $pad;
+ }
+ }
+}
+
+
+/*------------------------------------*\
+ $GRIDS
+\*------------------------------------*/
+
+/* Grid Container */
+.g {
+ overflow: hidden;
+ margin: 0 (-$pad-half);
+}
+
+/* Grid Item */
+.gi {
+ padding: $pad-half;
+
+ img {
+ display: block;
+ }
+
+ @media all and (min-width: $bp-med) {
+ float: left;
+ }
+}
+
+/* Grid 1up */
+.g-1up {
+ .gi {
+ width: 100%;
+ }
+}
+
+/* Grid 2up */
+.g-2up {
+ @media all and (min-width: $bp-med) {
+ > .gi {
+ float: left;
+ width: 50%;
+
+ &:nth-of-type(odd) {
+ clear: left;
+ }
+ }
+ }
+}
+
+/* Grid Half (Always displayed side by side) */
+.g-half {
+ > .gi {
+ float: left;
+ width: 50%;
+
+ &:nth-of-type(odd) {
+ clear: left;
+ }
+ }
+}
+
+/* Grid 3up */
+.g-3up {
+ @media all and (min-width: $bp-med) {
+ > .gi {
+ float: left;
+ width: 50%;
+
+ &:nth-of-type(2n+1) {
+ clear: left;
+ }
+ }
+ }
+
+ @media all and (min-width: $bp-large) {
+ > .gi {
+ width: 33.3333333%;
+
+ &:nth-of-type(2n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(3n+1) {
+ clear: left;
+ }
+ }
+ }
+}
+
+/* Grid 4up */
+.g-4up {
+ @media all and (min-width: $bp-med) {
+ >.gi {
+ float: left;
+ width: 50%;
+
+ &:nth-of-type(2n+1) {
+ clear: both;
+ }
+ }
+ }
+
+ @media all and (min-width: $bp-large) {
+ >.gi {
+ width: 25%;
+
+ &:nth-of-type(2n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(4n+1) {
+ clear: left;
+ }
+ }
+ }
+}
+
+/* Grid Quarter (Always displayed side by side) */
+.g-quarter {
+ > .gi {
+ float: left;
+ width: 24%;
+
+ &:nth-of-type(4n+1) {
+ clear: left;
+ }
+ }
+}
+
+.g-max4 {
+
+ @media all and (min-width: $bp-small-2) {
+ >.gi {
+ float: left;
+ width: 50%;
+
+ &:nth-of-type(2n+1) {
+ clear: both;
+ }
+ }
+ }
+
+ @media all and (min-width: $bp-small-3) {
+ >.gi {
+ width: 33.3333333%;
+
+ &:nth-of-type(2n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(3n+1) {
+ clear: left;
+ }
+ }
+ }
+
+ @media all and (min-width: $bp-large) {
+ >.gi {
+ width: 25%;
+
+ &:nth-of-type(3n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(4n+1) {
+ clear: left;
+ }
+ }
+ }
+}
+
+/* Grid 5up */
+.g-max5 {
+
+ >.gi {
+ float: left;
+ width: 50%;
+
+ &:nth-of-type(2n+1) {
+ clear: both;
+ }
+ }
+
+ @media all and (min-width: $bp-small-3) {
+ >.gi {
+ width: 33.3333333%;
+
+ &:nth-of-type(2n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(3n+1) {
+ clear: left;
+ }
+ }
+ }
+
+ @media all and (min-width: $bp-med) {
+ >.gi {
+ width: 25%;
+
+ &:nth-of-type(3n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(4n+1) {
+ clear: left;
+ }
+ }
+ }
+
+ @media all and (min-width: $bp-med-2) {
+ >.gi {
+ width: 20%;
+
+ &:nth-of-type(4n+1) {
+ clear: none;
+ }
+
+ &:nth-of-type(5n+1) {
+ clear: left;
+ }
+ }
+ }
+}
+
+/* Grid 2/3 */
+.gi-2-3 {
+ @media all and (min-width: $bp-med) {
+ float: left;
+ width: 66.666666%;
+ }
+}
+
+.gi-1-3 {
+ @media all and (min-width: $bp-med) {
+ float: left;
+ width: 33.333333%;
+ }
+}
+
+/* Grid 4up block */
+.g-opposites {
+ .gi {
+ float: left;
+
+ &:last-child {
+ float: right;
+ text-align: right;
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_lists.scss b/source/css/scss/objects/_lists.scss
new file mode 100644
index 000000000..0c4e8beaa
--- /dev/null
+++ b/source/css/scss/objects/_lists.scss
@@ -0,0 +1,63 @@
+.inline-list {
+ li {
+ display: inline-block;
+ }
+}
+
+/* Social List */
+.social-list {
+ li {
+ margin: 0 0.4rem $space 0;
+ }
+
+ a {
+ font-size: 1.6em;
+ }
+}
+
+
+/* Headline List */
+.headline-list {
+ margin-bottom: $space;
+
+ &.flush {
+ margin: 0;
+ }
+
+ h4 {
+ font-weight: normal;
+ }
+
+ li {
+ padding: $pad-quarter 0;
+ border-top: 1px solid $gray-light-3;
+ }
+}
+
+/* Post List */
+.post-list {
+ li {
+ margin-bottom: $space;
+ }
+}
+
+/* Bullet List */
+.bullet-list {
+ list-style: square;
+ margin: 0 0 1em 1.2em;
+ line-height: 1.3;
+
+ li {
+ margin-bottom: $space;
+ }
+}
+
+/* Text List */
+.text-list {
+ margin: 0 0 1em;
+ line-height: 1.3;
+
+ li {
+ margin-bottom: $space;
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_main.scss b/source/css/scss/objects/_main.scss
new file mode 100644
index 000000000..592c01dea
--- /dev/null
+++ b/source/css/scss/objects/_main.scss
@@ -0,0 +1,9 @@
+/*------------------------------------*\
+ $MAIN CONTENT AREA
+\*------------------------------------*/
+[role=main] {
+ padding: $pad-half $pad-half $pad-double;
+ overflow: hidden;
+ @extend .lc;
+ @extend .cf;
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_messaging.scss b/source/css/scss/objects/_messaging.scss
new file mode 100644
index 000000000..a2d31a92e
--- /dev/null
+++ b/source/css/scss/objects/_messaging.scss
@@ -0,0 +1,18 @@
+/*------------------------------------*\
+ $MESSAGING
+\*------------------------------------*/
+
+// Alerts
+.alert {
+ text-align: center;
+ padding: $pad;
+ margin-bottom: $space-half;
+ border: 1px solid $gray;
+ background: $gray-light;
+}
+
+.alert-error {
+ color: $error;
+ border-color: $error;
+ background: #ffbebe;
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_nav.scss b/source/css/scss/objects/_nav.scss
new file mode 100644
index 000000000..b98e3300e
--- /dev/null
+++ b/source/css/scss/objects/_nav.scss
@@ -0,0 +1,52 @@
+/*------------------------------------*\
+ $NAVIGATION
+\*------------------------------------*/
+
+.nav {
+ clear: both;
+ overflow: hidden;
+ max-height: 0;
+
+ a {
+ display: block;
+ padding: $pad;
+ border-top: 1px solid $gray-light-2;
+ }
+
+ &.active {
+ max-height: 40em;
+ }
+
+ @media all and (min-width: $bp-med) {
+ max-height: none;
+ float: right;
+ clear: none;
+
+ li {
+ float: left;
+ }
+
+ a {
+ border: 0;
+ }
+
+ }
+}
+
+//Pagination
+.pagination {
+ overflow: hidden;
+
+ li {
+ float: left;
+ border-right: 1px solid $gray-light-2;
+
+ &:last-child {
+ border: 0;
+ }
+ }
+
+ a {
+ padding: $pad;
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_sections.scss b/source/css/scss/objects/_sections.scss
new file mode 100644
index 000000000..7235af263
--- /dev/null
+++ b/source/css/scss/objects/_sections.scss
@@ -0,0 +1,7 @@
+.section {
+ margin: 0 0 $space;
+}
+
+.section-title {
+ margin-bottom: $space-half;
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_tabs.scss b/source/css/scss/objects/_tabs.scss
new file mode 100644
index 000000000..b22ca7438
--- /dev/null
+++ b/source/css/scss/objects/_tabs.scss
@@ -0,0 +1,33 @@
+.tabs {
+ overflow: hidden;
+
+ ul {
+ display: table;
+ width: 100%;
+ }
+
+ li {
+ display: table-cell;
+ text-align: center;
+ border-right: 1px solid $gray-light-3;
+
+ &:last-child {
+ border-right: 0;
+ }
+ }
+
+ a {
+ display: block;
+ padding: $pad-half;
+ background: $gray;
+
+ &:hover, &:focus {
+ background: $gray-light-3;
+ }
+
+ &.active {
+ background: $gray-dark;
+ color: $white;
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/css/scss/objects/_text.scss b/source/css/scss/objects/_text.scss
new file mode 100644
index 000000000..1d421a0d4
--- /dev/null
+++ b/source/css/scss/objects/_text.scss
@@ -0,0 +1,41 @@
+//Intro text
+.intro {
+ font-size: $font-size-med-2;
+ font-weight: bold;
+}
+
+//Pullquote
+.pullquote {
+ font-family: $font-secondary;
+ font-size: $font-size-large;
+}
+
+//Caption
+.caption {
+ font-style: italic;
+}
+
+//Passages of text
+.text {
+ a {
+ text-decoration: underline;
+ }
+
+ ul {
+ list-style: none;
+ margin: 0 0 $space 1.2em;
+
+ ul {
+ margin-bottom: 0;
+ }
+ }
+
+ ol {
+ list-style: decimal;
+ margin: 0 0 $space 1.5em;
+
+ ol {
+ margin-bottom: 0;
+ }
+ }
+}
diff --git a/source/css/scss/objects/_tooltip.scss b/source/css/scss/objects/_tooltip.scss
new file mode 100644
index 000000000..e0fdd95da
--- /dev/null
+++ b/source/css/scss/objects/_tooltip.scss
@@ -0,0 +1,42 @@
+.tooltip-container {
+ display: inline-block;
+ position: relative;
+
+ &:hover {
+ .tooltip {
+ display: block;
+ }
+ }
+}
+
+.tooltip-link {
+ background: $gray-light;
+}
+
+.tooltip {
+ display: none;
+ position: absolute;
+ top: 1.5em;
+ left: 0;
+ width: 18em;
+ padding: $pad;
+ background: $white;
+ border: 1px solid $gray;
+ box-shadow: 0.3em 0.3em 1em 0 rgba(0,0,0,0.2);
+
+ h2 {
+ margin-top: 0;
+ }
+
+ @media all and (min-width: $bp-small) {
+ width: 22em;
+ }
+
+ @media all and (min-width: $bp-small-2) {
+ width: 27em;
+ }
+
+ @media all and (min-width: $bp-small-3) {
+ width: 30em;
+ }
+}
\ No newline at end of file
diff --git a/source/css/style.css b/source/css/style.css
new file mode 100644
index 000000000..4d3382c95
--- /dev/null
+++ b/source/css/style.css
@@ -0,0 +1,94 @@
+/*------------------------------------* $TABLE OF CONTENTS
+ based generally on Harry Roberts excellent CSS Guidelines http://cssguidelin.es/
+\*------------------------------------*/
+/**
+ * VARIABLES..............................Declarations of Sass variables
+ * .....Colors
+ * .....Typography
+ * .....Layout
+ * .....Defaults
+ * .....Breakpoints
+ * MIXINS.................................Sass mixins
+ * RESET..................................Set reset defaults
+ * GLOBAL CLASSES.........................Set reset defaults
+ * GLOBAL ELEMENTS........................Establish global styles
+ * .....Main
+ * .....Headings
+ * .....Text-related elements (p, blockquote, lists)
+ * .....Defaults
+ * .....Breakpoints
+ * TYPOGRAPHY------------------------------
+ * MEDIA------------------------------
+ * LAYOUT------------------------------
+ * NAVIGATION------------------------------
+ * TOC To Be Continued
+ */
+/*------------------------------------* $BASE
+\*------------------------------------*/
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline; }
+
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block; }
+
+body {
+ line-height: 1; }
+
+ol, ul {
+ list-style: none; }
+
+blockquote, q {
+ quotes: none; }
+
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none; }
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0; }
+
+/*------------------------------------* $LAYOUT
+\*------------------------------------*/
+/*------------------------------------* $VARIABLES
+\*------------------------------------*/
+/*------------------------------------* $GLOBAL ATOMS
+\*------------------------------------*/
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-family: Arial;
+ font-size: 16px;
+ line-height: 1em;
+ margin: 0 0;
+ color: red; }
+
+/*------------------------------------* $COMPONENTS
+\*------------------------------------*/
diff --git a/source/favicon.ico b/source/favicon.ico
new file mode 100644
index 000000000..eee4aa78f
Binary files /dev/null and b/source/favicon.ico differ
diff --git a/source/fonts/icons.dev.svg b/source/fonts/icons.dev.svg
new file mode 100644
index 000000000..ca8e49e3a
--- /dev/null
+++ b/source/fonts/icons.dev.svg
@@ -0,0 +1,103 @@
+
+
+
+
+This is a custom SVG font generated by IcoMoon.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/fonts/icons.eot b/source/fonts/icons.eot
new file mode 100644
index 000000000..81a314b08
Binary files /dev/null and b/source/fonts/icons.eot differ
diff --git a/source/fonts/icons.svg b/source/fonts/icons.svg
new file mode 100644
index 000000000..3c64026b6
--- /dev/null
+++ b/source/fonts/icons.svg
@@ -0,0 +1,103 @@
+
+
+
+
+This is a custom SVG font generated by IcoMoon.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/fonts/icons.ttf b/source/fonts/icons.ttf
new file mode 100644
index 000000000..e6bff0814
Binary files /dev/null and b/source/fonts/icons.ttf differ
diff --git a/source/fonts/icons.woff b/source/fonts/icons.woff
new file mode 100644
index 000000000..10e663234
Binary files /dev/null and b/source/fonts/icons.woff differ
diff --git a/source/gulpfile.js b/source/gulpfile.js
new file mode 100644
index 000000000..30a33d50f
--- /dev/null
+++ b/source/gulpfile.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var gulp = require('gulp');
+var sass = require('gulp-sass');
+
+
+gulp.task('default', function() {
+ // place code for your default task here
+});
+
+
+gulp.task('sass', function () {
+ return gulp.src('sass/style.scss')
+ .pipe(sass().on('error', sass.logError))
+ .pipe(gulp.dest('css'));
+});
+
+gulp.task('sass:watch', function () {
+ gulp.watch('sass/*.scss', ['sass']);
+ gulp.watch('sass/**/*.scss', ['sass']);
+ gulp.watch('sass/**/**/*.scss', ['sass']);
+ gulp.watch('sass/**/**/**/*.scss', ['sass']);
+ gulp.watch('sass/**/**/**/**/*.scss', ['sass']);
+});
\ No newline at end of file
diff --git a/source/images/ajax-loader.gif b/source/images/ajax-loader.gif
new file mode 100644
index 000000000..f2a1bc0c6
Binary files /dev/null and b/source/images/ajax-loader.gif differ
diff --git a/source/images/favicon_16x16.jpg b/source/images/favicon_16x16.jpg
new file mode 100644
index 000000000..05e744965
Binary files /dev/null and b/source/images/favicon_16x16.jpg differ
diff --git a/source/images/favicon_32x32.jpg b/source/images/favicon_32x32.jpg
new file mode 100644
index 000000000..0970980b7
Binary files /dev/null and b/source/images/favicon_32x32.jpg differ
diff --git a/source/images/fpo_16x9.png b/source/images/fpo_16x9.png
new file mode 100644
index 000000000..013949dcc
Binary files /dev/null and b/source/images/fpo_16x9.png differ
diff --git a/source/images/fpo_4x3.png b/source/images/fpo_4x3.png
new file mode 100644
index 000000000..7ff84b81b
Binary files /dev/null and b/source/images/fpo_4x3.png differ
diff --git a/source/images/fpo_avatar.png b/source/images/fpo_avatar.png
new file mode 100644
index 000000000..e666a40ed
Binary files /dev/null and b/source/images/fpo_avatar.png differ
diff --git a/source/images/fpo_square.png b/source/images/fpo_square.png
new file mode 100644
index 000000000..ce8a1e4e6
Binary files /dev/null and b/source/images/fpo_square.png differ
diff --git a/source/images/logo.png b/source/images/logo.png
new file mode 100644
index 000000000..93db733d2
Binary files /dev/null and b/source/images/logo.png differ
diff --git a/source/js/fitvids.js b/source/js/fitvids.js
new file mode 100644
index 000000000..e2c5fbe7f
--- /dev/null
+++ b/source/js/fitvids.js
@@ -0,0 +1,77 @@
+/*global jQuery */
+/*!
+* FitVids 1.0
+*
+* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
+* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
+* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
+*
+* Date: Thu Sept 01 18:00:00 2011 -0500
+*/
+
+(function( $ ){
+
+ $.fn.fitVids = function( options ) {
+ var settings = {
+ customSelector: null
+ }
+
+ var div = document.createElement('div'),
+ ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
+
+ div.className = 'fit-vids-style';
+ div.innerHTML = '';
+
+ ref.parentNode.insertBefore(div,ref);
+
+ if ( options ) {
+ $.extend( settings, options );
+ }
+
+ return this.each(function(){
+ var selectors = [
+ "iframe[src*='player.vimeo.com']",
+ "iframe[src*='www.youtube.com']",
+ "iframe[src*='www.kickstarter.com']",
+ "object",
+ "embed"
+ ];
+
+ if (settings.customSelector) {
+ selectors.push(settings.customSelector);
+ }
+
+ var $allVideos = $(this).find(selectors.join(','));
+
+ $allVideos.each(function(){
+ var $this = $(this);
+ if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
+ var height = ( this.tagName.toLowerCase() == 'object' || $this.attr('height') ) ? $this.attr('height') : $this.height(),
+ width = $this.attr('width') ? $this.attr('width') : $this.width(),
+ aspectRatio = height / width;
+ if(!$this.attr('id')){
+ var videoID = 'fitvid' + Math.floor(Math.random()*999999);
+ $this.attr('id', videoID);
+ }
+ $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
+ $this.removeAttr('height').removeAttr('width');
+ });
+ });
+ }
+})( jQuery );
\ No newline at end of file
diff --git a/source/js/init.js b/source/js/init.js
new file mode 100644
index 000000000..fe973aa86
--- /dev/null
+++ b/source/js/init.js
@@ -0,0 +1,26 @@
+(function(w){
+ var sw = document.body.clientWidth,
+ sh = document.body.clientHeight;
+
+ $(w).resize(function(){ //Update dimensions on resize
+ sw = document.body.clientWidth;
+ sh = document.body.clientHeight;
+
+ //updateAds();
+ });
+
+
+ //Navigation toggle
+ $('.nav-toggle-menu').click(function(e) {
+ e.preventDefault();
+ $(this).toggleClass('active');
+ $('.nav').toggleClass('active');
+ });
+
+ //Navigation toggle
+ $('.nav-toggle-search').click(function(e) {
+ e.preventDefault();
+ $(this).toggleClass('active');
+ $('.header .search-form').toggleClass('active');
+ });
+})(this);
\ No newline at end of file
diff --git a/source/js/jquery-2.0.0b2.js b/source/js/jquery-2.0.0b2.js
new file mode 100644
index 000000000..af8b3b87a
--- /dev/null
+++ b/source/js/jquery-2.0.0b2.js
@@ -0,0 +1,8690 @@
+/*!
+ * jQuery JavaScript Library v2.0.0b2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-3-1
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // Support: IE9
+ // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+ core_strundefined = typeof undefined,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ location = window.location,
+ document = window.document,
+ docElem = document.documentElement,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // [[Class]] -> type pairs
+ class2type = {},
+
+ // List of deleted data cache ids, so we can reuse them
+ core_deletedIds = [],
+
+ core_version = "2.0.0b2",
+
+ // Save a reference to some core methods
+ core_concat = core_deletedIds.concat,
+ core_push = core_deletedIds.push,
+ core_slice = core_deletedIds.slice,
+ core_indexOf = core_deletedIds.indexOf,
+ core_toString = class2type.toString,
+ core_hasOwn = class2type.hasOwnProperty,
+ core_trim = core_version.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+ // Used for splitting on whitespace
+ core_rnotwhite = /\S+/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ },
+
+ // The ready event handler and self cleanup method
+ completed = function() {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+ jQuery.ready();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: core_version,
+
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // scripts is true for back-compat
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return String( obj );
+ }
+ // Support: Safari <=5.1 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ core_toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ isPlainObject: function( obj ) {
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Support: Firefox >16
+ // The try/catch suppresses exceptions thrown when attempting to access
+ // the "constructor" property of certain host objects, ie. |window.location|
+ try {
+ if ( obj.constructor &&
+ !core_hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
+ return false;
+ }
+ } catch ( e ) {
+ return false;
+ }
+
+ // If the function hasn't returned already, we're confident that
+ // |obj| is a plain object, created by {} or constructed with new Object
+ return true;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // keepScripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+ },
+
+ parseJSON: JSON.parse,
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ globalEval: function( data ) {
+ var indirect = eval;
+ if ( jQuery.trim( data ) ) {
+ indirect( data + ";" );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ trim: function( text ) {
+ return text == null ? "" : core_trim.call( text );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ core_push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : core_indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return core_concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ length = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < length; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: Date.now
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || type !== "function" &&
+ ( length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( list && ( !fired || stack ) ) {
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function( support ) {
+ var input = document.createElement("input"),
+ fragment = document.createDocumentFragment(),
+ div = document.createElement("div"),
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
+
+ // Finish early in limited environments
+ if ( !input.type ) {
+ return support;
+ }
+
+ input.type = "checkbox";
+
+ // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
+ support.checkOn = input.value === "";
+
+ // Must access the parent to make an option select properly
+ // Support: IE9, IE10
+ support.optSelected = opt.selected;
+
+ // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+ support.boxModel = document.compatMode === "CSS1Compat";
+
+ // Will be defined later
+ support.reliableMarginRight = true;
+ support.boxSizingReliable = true;
+ support.pixelPosition = false;
+
+ // Make sure checked status is properly cloned
+ // Support: IE9, IE10
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Check if an input maintains its value after becoming a radio
+ // Support: IE9, IE10, Opera
+ input = document.createElement("input");
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "checked", "t" );
+ input.setAttribute( "name", "t" );
+
+ fragment.appendChild( input );
+
+ // old WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: Firefox 17+
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+ support.focusinBubbles = "onfocusin" in window;
+
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, marginDiv,
+ divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+ body = document.getElementsByTagName("body")[ 0 ];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+ // Check box-sizing and margin behavior
+ body.appendChild( container ).appendChild( div );
+ div.innerHTML = "";
+ div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+
+ support.boxSizing = div.offsetWidth === 4;
+ support.doesNotIncludeMarginInBodyOffset = body.offsetTop !== 1;
+
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = div.appendChild( document.createElement("div") );
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ body.removeChild( container );
+ });
+
+ return support;
+})( {} );
+
+/*
+ Implementation Summary
+
+ 1. Enforce API surface and semantic compatibility with 1.9.x branch
+ 2. Improve the module's maintainability by reducing the storage
+ paths to a single mechanism.
+ 3. Use the same single mechanism to support "private" and "user" data.
+ 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+ 5. Avoid exposing implementation details on user objects (eg. expando properties)
+ 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+*/
+var data_user, data_priv,
+ rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function Data() {
+ this.cache = {};
+ this.expando = jQuery.expando + Math.random();
+}
+
+Data.uid = 1;
+
+Data.prototype = {
+ key: function( owner ) {
+ var descriptor = {},
+ // Check if the owner object already has a cache key
+ unlock = owner[ this.expando ];
+
+ // If not, create one
+ if ( !unlock ) {
+ unlock = Data.uid++;
+ descriptor[ this.expando ] = { value: unlock };
+
+ // Secure it in a non-enumerable, non-writable property
+ try {
+ Object.defineProperties( owner, descriptor );
+
+ // Support: Android<4
+ // Fallback to a less secure definition
+ } catch ( e ) {
+ descriptor[ this.expando ] = unlock;
+ jQuery.extend( owner, descriptor );
+ }
+ }
+
+ // Ensure the cache object
+ if ( !this.cache[ unlock ] ) {
+ this.cache[ unlock ] = {};
+ }
+
+ return unlock;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ // There may be an unlock assigned to this node,
+ // if there is no entry for this "owner", create one inline
+ // and set the unlock as though an owner entry had always existed
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+ // Support an expectation from the old data system where plain
+ // objects used to initialize would be set to the cache by
+ // reference, instead of having properties and values copied.
+ // Note, this will kill the connection between
+ // "this.cache[ unlock ]" and "cache"
+ if ( jQuery.isEmptyObject( cache ) ) {
+ this.cache[ unlock ] = data;
+ // Otherwise, copy the properties one-by-one to the cache object
+ } else {
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ }
+
+ return this;
+ },
+ get: function( owner, key ) {
+ // Either a valid cache is found, or will be created.
+ // New caches will be created and the unlock returned,
+ // allowing direct access to the newly created
+ // empty data object.
+ var cache = this.cache[ this.key( owner ) ];
+
+ return key === undefined ?
+ cache : cache[ key ];
+ },
+ access: function( owner, key, value ) {
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ((key && typeof key === "string") && value === undefined) ) {
+ return this.get( owner, key );
+ }
+
+ // [*]When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name,
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ if ( key === undefined ) {
+ this.cache[ unlock ] = {};
+ } else {
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key ];
+ } else {
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = jQuery.camelCase( key );
+ name = name in cache ?
+ [ name ] : ( name.match( core_rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete cache[ name[i] ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ return !jQuery.isEmptyObject(
+ this.cache[ this.key( owner ) ]
+ );
+ },
+ discard: function( owner ) {
+ delete this.cache[ this.key( owner ) ];
+ }
+};
+
+// This will be used by remove()/cleanData() in manipulation to sever
+// remaining references to node objects. One day we'll replace the dual
+// arrays with a WeakMap and this won't be an issue.
+// (Splices the data objects out of the internal cache arrays)
+function data_discard( owner ) {
+ data_user.discard( owner );
+ data_priv.discard( owner );
+}
+
+// These may be used throughout the jQuery core codebase
+data_user = new Data();
+data_priv = new Data();
+
+
+jQuery.extend({
+ // This is no longer relevant to jQuery core, but must remain
+ // supported for the sake of jQuery 1.9.x API surface compatibility.
+ acceptData: function() {
+ return true;
+ },
+
+ hasData: function( elem ) {
+ return data_user.hasData( elem ) || data_priv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return data_user.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ return data_user.remove( elem, name );
+ },
+
+ // TODO: Replace all calls to _data and _removeData with direct
+ // calls to
+ //
+ // data_priv.access( elem, name, data );
+ //
+ // data_priv.remove( elem, name );
+ //
+ _data: function( elem, name, data ) {
+ return data_priv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ return data_priv.remove( elem, name );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var attrs, name,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = data_user.get( elem );
+
+ if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ attrs = elem.attributes;
+ for ( ; i < attrs.length; i++ ) {
+ name = attrs[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.substring(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ data_priv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ data_user.set( this, key );
+ });
+ }
+
+ return jQuery.access( this, function( value ) {
+ var data,
+ camelKey = jQuery.camelCase( key );
+
+ // Get the Data...
+ if ( value === undefined ) {
+
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = data_user.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, key, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // As a last resort, attempt to find
+ // the data by checking AGAIN, but with
+ // a camelCased key.
+ data = data_user.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return undefined;
+ }
+
+ // Set the data...
+ this.each(function() {
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = data_user.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ data_user.set( this, camelKey, value );
+
+ // *... In the case of properties that might ACTUALLY
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( /-/.test( key ) && data !== undefined ) {
+ data_user.set( this, key, value );
+ }
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ data_user.remove( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ?
+ JSON.parse( data ) : data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ data_user.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ hooks.cur = fn;
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery._removeData( elem, type + "queue" );
+ jQuery._removeData( elem, key );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook,
+ rclass = /[\t\r\n]/g,
+ rreturn = /\r/g,
+ rfocusable = /^(?:input|select|textarea|button|object)$/i,
+ rclickable = /^(?:a|area)$/i,
+ rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+ elem.className = jQuery.trim( cur );
+
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = arguments.length === 0 || typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( cur ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.match( core_rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ // Toggle whole class name
+ } else if ( type === core_strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed "false",
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val,
+ self = jQuery(this);
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ attr: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === core_strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ // In IE9+, Flash objects don't have .getAttribute (#12945)
+ // Support: IE9+
+ if ( typeof elem.getAttribute !== core_strundefined ) {
+ ret = elem.getAttribute( name );
+ }
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( core_rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ // Set corresponding property to false for boolean attributes
+ if ( rboolean.test( name ) ) {
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to default in case type is set after value during creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ return elem.getAttribute( name ) !== null ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+
+// IE9/10 do not see a selected option inside an optgroup unless you access it
+// Support: IE9, IE10
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ }
+ });
+}
+var rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery._removeData( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = core_hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = core_slice.call( arguments ),
+ handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Chrome 23+, Safari?
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ }
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== document.activeElement && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === document.activeElement && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 10+
+ if ( event.result !== undefined ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && e.preventDefault ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// Support: Chrome 15+
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// Create "bubbling" focus and blur events
+// Support: Firefox 10+
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2013 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var i,
+ cachedruns,
+ Expr,
+ getText,
+ isXML,
+ compile,
+ outermostContext,
+ recompare,
+ sortInput,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsXML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + -(new Date()),
+ preferredDoc = window.document,
+ support = {},
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ hasDuplicate = false,
+ sortOrder = function() { return 0; },
+
+ // General-purpose constants
+ strundefined = typeof undefined,
+ MAX_NEGATIVE = 1 << 31,
+
+ // Array methods
+ 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;
+ },
+
+
+ // 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
+ operators = "([*^$|!~]?=)",
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:" + operators + 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 + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "NAME": new RegExp( "^\\[name=['\"]?(" + 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" ),
+ // 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" )
+ },
+
+ rsibling = /[\x20\t\r\n\f]*[+~]/,
+
+ rnative = /^[^{]+\{\s*\[native code/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rescape = /'|\\/g,
+ rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
+ funescape = function( _, escaped ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ return high !== high ?
+ escaped :
+ // BMP codepoint
+ high < 0 ?
+ 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;
+ }
+ };
+}
+
+/**
+ * For feature detection
+ * @param {Function} fn The function to test for native support
+ */
+function isNative( fn ) {
+ return rnative.test( fn + "" );
+}
+
+/**
+ * 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 cache,
+ keys = [];
+
+ return (cache = function( 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);
+ });
+}
+
+/**
+ * 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 {
+ // release memory in IE
+ div = null;
+ }
+}
+
+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 ( !documentIsXML && !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 #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.getByClassName && context.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && !rbuggyQSA.test(selector) ) {
+ old = true;
+ nid = 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 ) && 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 );
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+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 doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // 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
+ documentIsXML = isXML( doc );
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.tagNameNoComments = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Check if attributes should be retrieved by attribute nodes
+ support.attributes = assert(function( div ) {
+ div.innerHTML = " ";
+ var type = typeof div.lastChild.getAttribute("multiple");
+ // IE8 returns a string for some attributes even when not present
+ return type !== "boolean" && type !== "string";
+ });
+
+ // Check if getElementsByClassName can be trusted
+ support.getByClassName = assert(function( div ) {
+ // Opera can't find a second classname (in 9.6)
+ div.innerHTML = "
";
+ if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+ return false;
+ }
+
+ // Safari 3.2 caches class attributes and doesn't catch changes
+ div.lastChild.className = "e";
+ return div.getElementsByClassName("e").length === 2;
+ });
+
+ // Check if getElementsByName privileges form controls or returns elements by ID
+ // If so, assume (for broader support) that getElementById returns elements by name
+ support.getByName = assert(function( div ) {
+ // Inject content
+ div.id = expando + 0;
+ // Support: Windows 8 Native Apps
+ // Assigning innerHTML with "name" attributes throws uncatchable exceptions
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx
+ div.appendChild( document.createElement("a") ).setAttribute( "name", expando );
+ div.appendChild( document.createElement("i") ).setAttribute( "name", expando );
+ docElem.appendChild( div );
+
+ // Test
+ var pass = doc.getElementsByName &&
+ // buggy browsers will return fewer than the correct 2
+ doc.getElementsByName( expando ).length === 2 +
+ // buggy browsers will return more than the correct 0
+ doc.getElementsByName( expando + 0 ).length;
+
+ // Cleanup
+ docElem.removeChild( div );
+
+ return pass;
+ });
+
+ // Support: Webkit<537.32
+ // Detached nodes confoundingly follow *each other*
+ support.sortDetached = assert(function( div1 ) {
+ return div1.compareDocumentPosition &&
+ // Should return 1, but Webkit returns 4 (following)
+ (div1.compareDocumentPosition( document.createElement("div") ) & 1);
+ });
+
+ // IE6/7 return modified attributes
+ Expr.attrHandle = assert(function( div ) {
+ div.innerHTML = " ";
+ return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+ div.firstChild.getAttribute("href") === "#";
+ }) ?
+ {} :
+ {
+ "href": function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ },
+ "type": function( elem ) {
+ return elem.getAttribute("type");
+ }
+ };
+
+ // ID find and filter
+ if ( support.getByName ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
+ 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 {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
+ var m = context.getElementById( id );
+
+ return m ?
+ m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+ [m] :
+ undefined :
+ [];
+ }
+ };
+ 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.tagNameNoComments ?
+ 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;
+ };
+
+ // Name
+ Expr.find["NAME"] = support.getByName && function( tag, context ) {
+ if ( typeof context.getElementsByName !== strundefined ) {
+ return context.getElementsByName( name );
+ }
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21),
+ // no need to also add to buggyMatches since matches checks buggyQSA
+ // A support test would require too much code (would include document ready)
+ rbuggyQSA = [ ":focus" ];
+
+ if ( (support.qsa = isNative(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 explictly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = " ";
+
+ // IE8 - Some boolean attributes are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+ }
+
+ // 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 ) {
+
+ // Opera 10-12/IE8 - ^= $= *= and empty values
+ // Should not select anything
+ div.innerHTML = " ";
+ if ( div.querySelectorAll("[i^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + 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 = isNative( (matches = docElem.matchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.webkitMatchesSelector ||
+ 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 = new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
+ 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;
+ };
+
+ // Document order sorting
+ sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+ if ( compare ) {
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (recompare && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ }
+
+ // Not directly comparable, sort on existence of method
+ return a.compareDocumentPosition ? -1 : 1;
+ } :
+ function( a, b ) {
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Parentless nodes are either documents or disconnected
+ } else if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ 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 document;
+};
+
+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']" );
+
+ // rbuggyQSA always contains :focus, so no need for an existence check
+ if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !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 ) {
+ var val;
+
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ if ( !documentIsXML ) {
+ name = name.toLowerCase();
+ }
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
+ }
+ if ( documentIsXML || support.attributes ) {
+ return elem.getAttribute( name );
+ }
+ return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
+ name :
+ val && val.specified ? val.value : null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ // Compensate for sort limitations
+ recompare = !support.sortDetached;
+ 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 );
+ }
+ }
+
+ return results;
+};
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns Returns -1 if a precedes b, 1 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && ( ~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
+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
+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
+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]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * 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
+ for ( ; (node = elem[i]); 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 (see #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,
+
+ 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[4] ) {
+ 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( nodeName ) {
+ if ( nodeName === "*" ) {
+ return function() { return true; };
+ }
+
+ nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
+ return 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( 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 identifider
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsXML ?
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
+ elem.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 only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+ 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;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+ },
+
+ // 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;
+ })
+ }
+};
+
+// 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 );
+}
+
+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 data, cache, outerCache,
+ dirkey = 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 ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+ if ( (data = cache[1]) === true || data === cachedruns ) {
+ return data === true;
+ }
+ } else {
+ cache = outerCache[ dir ] = [ dirkey ];
+ cache[1] = matcher( elem, context, xml ) || cachedruns;
+ if ( cache[1] === true ) {
+ 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 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( tokens.slice( 0, i - 1 ) ).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 ) {
+ // A counter to specify which element is currently being matched
+ var matcherCachedRuns = 0,
+ bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = matcherCachedRuns;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ for ( ; (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;
+ cachedruns = ++matcherCachedRuns;
+ }
+ }
+
+ // 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, group /* 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 ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector );
+
+ if ( !seed ) {
+ // Try to minimize operations if there is 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" &&
+ context.nodeType === 9 && !documentIsXML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+ }
+
+ 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 ) && 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
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ documentIsXML,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Check sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Initialize with the default document
+setDocument();
+
+// Always assume the presence of duplicates if sort doesn't
+// pass them to our comparison function (as in Google Chrome).
+[0, 0].sort( sortOrder );
+support.detectDuplicates = hasDuplicate;
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+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;
+
+
+})( window );
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var self, matched, i,
+ l = this.length;
+
+ if ( typeof selector !== "string" ) {
+ self = this;
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < l; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ matched = [];
+ for ( i = 0; i < l; i++ ) {
+ jQuery.find( selector, this[ i ], matched );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ matched = this.pushStack( l > 1 ? jQuery.unique( matched ) : matched );
+ matched.selector = ( this.selector ? this.selector + " " : "" ) + selector;
+ return matched;
+ },
+
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter(function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false) );
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true) );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ rneedsContext.test( selector ) ?
+ jQuery( selector, this.context ).index( this[ 0 ] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = ( rneedsContext.test( selectors ) || typeof selectors !== "string" ) ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ cur = matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return core_indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return core_indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( jQuery.unique(all) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.unique( matched );
+ }
+
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector( elems[ 0 ], expr ) ? [ elems[ 0 ] ] : [] :
+ jQuery.find.matches( expr, elems );
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ var filtered;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem ) {
+ return ( elem === qualifier ) === keep;
+ });
+ }
+
+ if ( typeof qualifier === "string" ) {
+ filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, filtered, !keep );
+ }
+
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+
+ return jQuery.grep(elements, function( elem ) {
+ return ( core_indexOf.call( qualifier, elem ) >= 0 ) === keep;
+ });
+}
+var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rhtml = /<|?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+
+ // Support: IE 9
+ option: [ 1, "", " " ],
+
+ thead: [ 1, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+
+ _default: [ 0, "", "" ]
+ };
+
+// Support: IE 9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.col = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip(arguments, false, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip(arguments, false, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ i = 0,
+ l = this.length;
+
+ for ( ; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0,
+ l = this.length;
+
+ for ( ; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1>$2>" );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function( value ) {
+ var isFunction = jQuery.isFunction( value );
+
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( !isFunction && typeof value !== "string" ) {
+ value = jQuery( value ).not( this ).detach();
+ }
+
+ return value !== "" ?
+ this.domManip( [ value ], true, function( elem ) {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ if ( parent ) {
+ jQuery( this ).remove();
+ parent.insertBefore( elem, next );
+ }
+ }) :
+ this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+
+ // Flatten any nested arrays
+ args = core_concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, table ? self.html() : undefined );
+ }
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call(
+ table && jQuery.nodeName( this[ i ], "table" ) ?
+ findOrAppend( this[ i ], "tbody" ) :
+ this[ i ],
+ node,
+ i
+ );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Hope ajax is available...
+ jQuery.ajax({
+ url: node.src,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because core_push.apply(_, arraylike) throws
+ core_push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Support: IE >=9
+ // Fix Cloning issues
+ if ( !jQuery.support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var elem, tmp, tag, wrap, contains, j,
+ i = 0,
+ l = elems.length,
+ fragment = context.createDocumentFragment(),
+ nodes = [];
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>$2>" ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.firstChild;
+ }
+
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Fixes #12346
+ // Support: Webkit, IE
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var data, elem, type,
+ l = elems.length,
+ i = 0,
+ special = jQuery.event.special;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ data = data_priv.access( elem );
+
+ if ( data ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+ }
+ // Discard any remaining `private` and `user` data
+ data_discard( elem );
+ }
+ }
+});
+
+function findOrAppend( elem, tag ) {
+ return elem.getElementsByTagName( tag )[ 0 ] || elem.appendChild( elem.ownerDocument.createElement(tag) );
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ var attr = elem.getAttributeNode("type");
+ elem.type = ( attr && attr.specified ) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute("type");
+ }
+
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var l = elems.length,
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ data_priv.set(
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( data_priv.hasData( src ) ) {
+ pdataOld = data_priv.access( src );
+ pdataCur = jQuery.extend( {}, pdataOld );
+ events = pdataOld.events;
+
+ data_priv.set( dest, pdataCur );
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( data_user.hasData( src ) ) {
+ udataOld = data_user.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ data_user.set( dest, udataCur );
+ }
+}
+
+
+function getAll( context, tag ) {
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+// Support: IE >= 9
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+var curCSS, iframe,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+function getStyles( elem ) {
+ return window.getComputedStyle( elem, null );
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+
+ if ( !values[ index ] ) {
+ hidden = isHidden( elem );
+
+ if ( display && display !== "none" || !hidden ) {
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ var bool = typeof state === "boolean";
+
+ return this.each(function() {
+ if ( bool ? state : isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Fixes #8908, it can be done more correctly by specifying setters in cssHooks,
+ // but it would mean to define eight (for every problematic property) identical functions
+ if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ style[ name ] = value;
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+curCSS = function( elem, name, _computed ) {
+ var width, minWidth, maxWidth,
+ computed = _computed || getStyles( elem ),
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+ style = elem.style;
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: Chrome <17, Safari 5.1
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+};
+
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+ // Use the already-created iframe if possible
+ iframe = ( iframe ||
+ jQuery("")
+ .css( "cssText", "display:block !important" )
+ ).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+ doc.write("");
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+ display = jQuery.css( elem[0], "display" );
+ elem.remove();
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function(){
+ var type = this.type;
+ // Use .is(":disabled") so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !manipulation_rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.hover = function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+};
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ ajax_nonce = jQuery.now(),
+
+ ajax_rquery = /\?/,
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+ // Keep a copy of the old load method
+ _load = jQuery.fn.load,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = url.slice( off, url.length );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+ jQuery.fn[ type ] = function( fn ){
+ return this.on( type, fn );
+ };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ }
+});
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery("
+
+```
+
+In the browser, you can attach the forEach method to any object.
+
+```html
+
+
+
+```
+
+## The General Idea (Why I thought this was worth sharing)
+
+The idea is to allow the callback to decide _at runtime_ whether the loop will be synchronous or asynchronous. By using `this` in a creative way (in situations where that value isn't already spoken for), an entire control API can be offered without over-complicating function signatures.
+
+```javascript
+forEach(arr, function(item, index) {
+ // Synchronous.
+});
+
+forEach(arr, function(item, index) {
+ // Only when `this.async` is called does iteration becomes asynchronous. The
+ // loop won't be continued until the `done` function is executed.
+ var done = this.async();
+ // Continue in one second.
+ setTimeout(done, 1000);
+});
+
+forEach(arr, function(item, index) {
+ // Break out of synchronous iteration early by returning false.
+ return index !== 1;
+});
+
+forEach(arr, function(item, index) {
+ // Break out of asynchronous iteration early...
+ var done = this.async();
+ // ...by passing false to the done function.
+ setTimeout(function() {
+ done(index !== 1);
+ });
+});
+```
+
+## Examples
+See the unit tests for more examples.
+
+```javascript
+// Generic "done" callback.
+function allDone(notAborted, arr) {
+ console.log("done", notAborted, arr);
+}
+
+// Synchronous.
+forEach(["a", "b", "c"], function(item, index, arr) {
+ console.log("each", item, index, arr);
+}, allDone);
+// logs:
+// each a 0 ["a", "b", "c"]
+// each b 1 ["a", "b", "c"]
+// each c 2 ["a", "b", "c"]
+// done true ["a", "b", "c"]
+
+// Synchronous with early abort.
+forEach(["a", "b", "c"], function(item, index, arr) {
+ console.log("each", item, index, arr);
+ if (item === "b") { return false; }
+}, allDone);
+// logs:
+// each a 0 ["a", "b", "c"]
+// each b 1 ["a", "b", "c"]
+// done false ["a", "b", "c"]
+
+// Asynchronous.
+forEach(["a", "b", "c"], function(item, index, arr) {
+ console.log("each", item, index, arr);
+ var done = this.async();
+ setTimeout(function() {
+ done();
+ }, 500);
+}, allDone);
+// logs:
+// each a 0 ["a", "b", "c"]
+// each b 1 ["a", "b", "c"]
+// each c 2 ["a", "b", "c"]
+// done true ["a", "b", "c"]
+
+// Asynchronous with early abort.
+forEach(["a", "b", "c"], function(item, index, arr) {
+ console.log("each", item, index, arr);
+ var done = this.async();
+ setTimeout(function() {
+ done(item !== "b");
+ }, 500);
+}, allDone);
+// logs:
+// each a 0 ["a", "b", "c"]
+// each b 1 ["a", "b", "c"]
+// done false ["a", "b", "c"]
+
+// Not actually asynchronous.
+forEach(["a", "b", "c"], function(item, index, arr) {
+ console.log("each", item, index, arr);
+ var done = this.async()
+ done();
+}, allDone);
+// logs:
+// each a 0 ["a", "b", "c"]
+// each b 1 ["a", "b", "c"]
+// each c 2 ["a", "b", "c"]
+// done true ["a", "b", "c"]
+
+// Not actually asynchronous with early abort.
+forEach(["a", "b", "c"], function(item, index, arr) {
+ console.log("each", item, index, arr);
+ var done = this.async();
+ done(item !== "b");
+}, allDone);
+// logs:
+// each a 0 ["a", "b", "c"]
+// each b 1 ["a", "b", "c"]
+// done false ["a", "b", "c"]
+```
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
+
+_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "lib" subdirectory!_
+
+## Release History
+
+04/29/2013
+v0.1.3
+Removed hard Node.js version dependency.
+
+11/17/2011
+v0.1.2
+Adding sparse array support.
+Invalid length properties are now sanitized.
+This closes issue #1 (like a boss).
+
+11/11/2011
+v0.1.1
+Refactored code to be much simpler. Yay for unit tests!
+
+11/11/2011
+v0.1.0
+Initial Release.
+
+## License
+Copyright (c) 2012 "Cowboy" Ben Alman
+Licensed under the MIT license.
+
diff --git a/source/node_modules/async-foreach/dist/ba-foreach.js b/source/node_modules/async-foreach/dist/ba-foreach.js
new file mode 100644
index 000000000..64c6eb8ff
--- /dev/null
+++ b/source/node_modules/async-foreach/dist/ba-foreach.js
@@ -0,0 +1,58 @@
+/* JavaScript Sync/Async forEach - v0.1.2 - 1/10/2012
+ * http://github.com/cowboy/javascript-sync-async-foreach
+ * Copyright (c) 2012 "Cowboy" Ben Alman; Licensed MIT */
+
+(function(exports) {
+
+ // Iterate synchronously or asynchronously.
+ exports.forEach = function(arr, eachFn, doneFn) {
+ var i = -1;
+ // Resolve array length to a valid (ToUint32) number.
+ var len = arr.length >>> 0;
+
+ // This IIFE is called once now, and then again, by name, for each loop
+ // iteration.
+ (function next(result) {
+ // This flag will be set to true if `this.async` is called inside the
+ // eachFn` callback.
+ var async;
+ // Was false returned from the `eachFn` callback or passed to the
+ // `this.async` done function?
+ var abort = result === false;
+
+ // Increment counter variable and skip any indices that don't exist. This
+ // allows sparse arrays to be iterated.
+ do { ++i; } while (!(i in arr) && i !== len);
+
+ // Exit if result passed to `this.async` done function or returned from
+ // the `eachFn` callback was false, or when done iterating.
+ if (abort || i === len) {
+ // If a `doneFn` callback was specified, invoke that now. Pass in a
+ // boolean value representing "not aborted" state along with the array.
+ if (doneFn) {
+ doneFn(!abort, arr);
+ }
+ return;
+ }
+
+ // Invoke the `eachFn` callback, setting `this` inside the callback to a
+ // custom object that contains one method, and passing in the array item,
+ // index, and the array.
+ result = eachFn.call({
+ // If `this.async` is called inside the `eachFn` callback, set the async
+ // flag and return a function that can be used to continue iterating.
+ async: function() {
+ async = true;
+ return next;
+ }
+ }, arr[i], i, arr);
+
+ // If the async flag wasn't set, continue by calling `next` synchronously,
+ // passing in the result of the `eachFn` callback.
+ if (!async) {
+ next(result);
+ }
+ }());
+ };
+
+}(typeof exports === "object" && exports || this));
\ No newline at end of file
diff --git a/source/node_modules/async-foreach/dist/ba-foreach.min.js b/source/node_modules/async-foreach/dist/ba-foreach.min.js
new file mode 100644
index 000000000..c218a9157
--- /dev/null
+++ b/source/node_modules/async-foreach/dist/ba-foreach.min.js
@@ -0,0 +1,4 @@
+/* JavaScript Sync/Async forEach - v0.1.2 - 1/10/2012
+ * http://github.com/cowboy/javascript-sync-async-foreach
+ * Copyright (c) 2012 "Cowboy" Ben Alman; Licensed MIT */
+(function(a){a.forEach=function(a,b,c){var d=-1,e=a.length>>>0;(function f(g){var h,j=g===!1;do++d;while(!(d in a)&&d!==e);if(j||d===e){c&&c(!j,a);return}g=b.call({async:function(){return h=!0,f}},a[d],d,a),h||f(g)})()}})(typeof exports=="object"&&exports||this)
\ No newline at end of file
diff --git a/source/node_modules/async-foreach/grunt.js b/source/node_modules/async-foreach/grunt.js
new file mode 100644
index 000000000..079a23afd
--- /dev/null
+++ b/source/node_modules/async-foreach/grunt.js
@@ -0,0 +1,48 @@
+/*global config:true, task:true*/
+config.init({
+ pkg: '
',
+ meta: {
+ title: 'JavaScript Sync/Async forEach',
+ license: ['MIT'],
+ copyright: 'Copyright (c) 2012 "Cowboy" Ben Alman',
+ banner: '/* {{meta.title}} - v{{pkg.version}} - {{today "m/d/yyyy"}}\n' +
+ ' * {{pkg.homepage}}\n' +
+ ' * {{{meta.copyright}}}; Licensed {{join meta.license}} */'
+ },
+ concat: {
+ 'dist/ba-foreach.js': ['', '']
+ },
+ min: {
+ 'dist/ba-foreach.min.js': ['', 'dist/ba-foreach.js']
+ },
+ test: {
+ files: ['test/**/*.js']
+ },
+ lint: {
+ files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
+ },
+ watch: {
+ files: '',
+ tasks: 'lint:files test:files'
+ },
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ eqnull: true
+ },
+ globals: {
+ exports: true
+ }
+ },
+ uglify: {}
+});
+
+// Default task.
+task.registerTask('default', 'lint:files test:files concat min');
diff --git a/source/node_modules/async-foreach/lib/foreach.js b/source/node_modules/async-foreach/lib/foreach.js
new file mode 100644
index 000000000..9ee98b001
--- /dev/null
+++ b/source/node_modules/async-foreach/lib/foreach.js
@@ -0,0 +1,63 @@
+/*!
+ * Sync/Async forEach
+ * https://github.com/cowboy/javascript-sync-async-foreach
+ *
+ * Copyright (c) 2012 "Cowboy" Ben Alman
+ * Licensed under the MIT license.
+ * http://benalman.com/about/license/
+ */
+
+(function(exports) {
+
+ // Iterate synchronously or asynchronously.
+ exports.forEach = function(arr, eachFn, doneFn) {
+ var i = -1;
+ // Resolve array length to a valid (ToUint32) number.
+ var len = arr.length >>> 0;
+
+ // This IIFE is called once now, and then again, by name, for each loop
+ // iteration.
+ (function next(result) {
+ // This flag will be set to true if `this.async` is called inside the
+ // eachFn` callback.
+ var async;
+ // Was false returned from the `eachFn` callback or passed to the
+ // `this.async` done function?
+ var abort = result === false;
+
+ // Increment counter variable and skip any indices that don't exist. This
+ // allows sparse arrays to be iterated.
+ do { ++i; } while (!(i in arr) && i !== len);
+
+ // Exit if result passed to `this.async` done function or returned from
+ // the `eachFn` callback was false, or when done iterating.
+ if (abort || i === len) {
+ // If a `doneFn` callback was specified, invoke that now. Pass in a
+ // boolean value representing "not aborted" state along with the array.
+ if (doneFn) {
+ doneFn(!abort, arr);
+ }
+ return;
+ }
+
+ // Invoke the `eachFn` callback, setting `this` inside the callback to a
+ // custom object that contains one method, and passing in the array item,
+ // index, and the array.
+ result = eachFn.call({
+ // If `this.async` is called inside the `eachFn` callback, set the async
+ // flag and return a function that can be used to continue iterating.
+ async: function() {
+ async = true;
+ return next;
+ }
+ }, arr[i], i, arr);
+
+ // If the async flag wasn't set, continue by calling `next` synchronously,
+ // passing in the result of the `eachFn` callback.
+ if (!async) {
+ next(result);
+ }
+ }());
+ };
+
+}(typeof exports === "object" && exports || this));
\ No newline at end of file
diff --git a/source/node_modules/async-foreach/package.json b/source/node_modules/async-foreach/package.json
new file mode 100644
index 000000000..84cfc94ed
--- /dev/null
+++ b/source/node_modules/async-foreach/package.json
@@ -0,0 +1,77 @@
+{
+ "_args": [
+ [
+ "async-foreach@^0.1.3",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass"
+ ]
+ ],
+ "_from": "async-foreach@>=0.1.3 <0.2.0",
+ "_id": "async-foreach@0.1.3",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/async-foreach",
+ "_npmUser": {
+ "email": "cowboy@rj3.net",
+ "name": "cowboy"
+ },
+ "_npmVersion": "1.1.70",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "async-foreach",
+ "raw": "async-foreach@^0.1.3",
+ "rawSpec": "^0.1.3",
+ "scope": null,
+ "spec": ">=0.1.3 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/node-sass"
+ ],
+ "_resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
+ "_shasum": "36121f845c0578172de419a97dbeb1d16ec34542",
+ "_shrinkwrap": null,
+ "_spec": "async-foreach@^0.1.3",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass",
+ "author": {
+ "name": "\"Cowboy\" Ben Alman",
+ "url": "http://benalman.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/cowboy/javascript-sync-async-foreach/issues"
+ },
+ "dependencies": {},
+ "description": "An optionally-asynchronous forEach with an interesting interface.",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "36121f845c0578172de419a97dbeb1d16ec34542",
+ "tarball": "http://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "homepage": "http://github.com/cowboy/javascript-sync-async-foreach",
+ "keywords": [
+ "array",
+ "async",
+ "foreach",
+ "loop",
+ "sync"
+ ],
+ "main": "lib/foreach",
+ "maintainers": [
+ {
+ "name": "cowboy",
+ "email": "cowboy@rj3.net"
+ }
+ ],
+ "name": "async-foreach",
+ "optionalDependencies": {},
+ "readme": "# JavaScript Sync/Async forEach\n\nAn optionally-asynchronous forEach with an interesting interface.\n\n## Getting Started\n\nThis code should work just fine in Node.js:\n\nFirst, install the module with: `npm install async-foreach`\n\n```javascript\nvar forEach = require('async-foreach').forEach;\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n});\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// each c 2 [\"a\", \"b\", \"c\"]\n```\n\nOr in the browser:\n\n```html\n\n\n```\n\nIn the browser, you can attach the forEach method to any object.\n\n```html\n\n\n\n```\n\n## The General Idea (Why I thought this was worth sharing)\n\nThe idea is to allow the callback to decide _at runtime_ whether the loop will be synchronous or asynchronous. By using `this` in a creative way (in situations where that value isn't already spoken for), an entire control API can be offered without over-complicating function signatures.\n\n```javascript\nforEach(arr, function(item, index) {\n // Synchronous.\n});\n\nforEach(arr, function(item, index) {\n // Only when `this.async` is called does iteration becomes asynchronous. The\n // loop won't be continued until the `done` function is executed.\n var done = this.async();\n // Continue in one second.\n setTimeout(done, 1000);\n});\n\nforEach(arr, function(item, index) {\n // Break out of synchronous iteration early by returning false.\n return index !== 1;\n});\n\nforEach(arr, function(item, index) {\n // Break out of asynchronous iteration early...\n var done = this.async();\n // ...by passing false to the done function.\n setTimeout(function() {\n done(index !== 1);\n });\n});\n```\n\n## Examples\nSee the unit tests for more examples.\n\n```javascript\n// Generic \"done\" callback.\nfunction allDone(notAborted, arr) {\n console.log(\"done\", notAborted, arr);\n}\n\n// Synchronous.\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n}, allDone);\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// each c 2 [\"a\", \"b\", \"c\"]\n// done true [\"a\", \"b\", \"c\"]\n\n// Synchronous with early abort.\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n if (item === \"b\") { return false; }\n}, allDone);\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// done false [\"a\", \"b\", \"c\"]\n\n// Asynchronous.\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n var done = this.async();\n setTimeout(function() {\n done();\n }, 500);\n}, allDone);\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// each c 2 [\"a\", \"b\", \"c\"]\n// done true [\"a\", \"b\", \"c\"]\n\n// Asynchronous with early abort.\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n var done = this.async();\n setTimeout(function() {\n done(item !== \"b\");\n }, 500);\n}, allDone);\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// done false [\"a\", \"b\", \"c\"]\n\n// Not actually asynchronous.\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n var done = this.async()\n done();\n}, allDone);\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// each c 2 [\"a\", \"b\", \"c\"]\n// done true [\"a\", \"b\", \"c\"]\n\n// Not actually asynchronous with early abort.\nforEach([\"a\", \"b\", \"c\"], function(item, index, arr) {\n console.log(\"each\", item, index, arr);\n var done = this.async();\n done(item !== \"b\");\n}, allDone);\n// logs:\n// each a 0 [\"a\", \"b\", \"c\"]\n// each b 1 [\"a\", \"b\", \"c\"]\n// done false [\"a\", \"b\", \"c\"]\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).\n\n_Also, please don't edit files in the \"dist\" subdirectory as they are generated via grunt. You'll find source code in the \"lib\" subdirectory!_\n\n## Release History\n\n04/29/2013\nv0.1.3\nRemoved hard Node.js version dependency.\n\n11/17/2011\nv0.1.2\nAdding sparse array support.\nInvalid length properties are now sanitized.\nThis closes issue #1 (like a boss).\n\n11/11/2011\nv0.1.1\nRefactored code to be much simpler. Yay for unit tests!\n\n11/11/2011\nv0.1.0\nInitial Release.\n\n## License\nCopyright (c) 2012 \"Cowboy\" Ben Alman \nLicensed under the MIT license. \n \n",
+ "readmeFilename": "README.md",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/cowboy/javascript-sync-async-foreach.git"
+ },
+ "version": "0.1.3"
+}
diff --git a/source/node_modules/async-foreach/test/foreach_test.js b/source/node_modules/async-foreach/test/foreach_test.js
new file mode 100644
index 000000000..be18c43ac
--- /dev/null
+++ b/source/node_modules/async-foreach/test/foreach_test.js
@@ -0,0 +1,200 @@
+/*global require:true, setTimeout:true */
+var forEach = require('../lib/foreach').forEach;
+
+exports['foreach'] = {
+ setUp: function(done) {
+ this.order = [];
+ this.track = function() {
+ [].push.apply(this.order, arguments);
+ };
+ done();
+ },
+ 'Synchronous': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ });
+
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "each", "c", 2, arr
+ ], "should call eachFn for each array item, in order.");
+ test.done();
+ },
+ 'Synchronous, done': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ }, function(notAborted, arr) {
+ that.track("done", notAborted, arr);
+ });
+
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "each", "c", 2, arr,
+ "done", true, arr
+ ], "should call eachFn for each array item, in order, followed by doneFn.");
+ test.done();
+ },
+ 'Synchronous, early abort': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ if (item === "b") { return false; }
+ }, function(notAborted, arr) {
+ that.track("done", notAborted, arr);
+ });
+
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "done", false, arr
+ ], "should call eachFn for each array item, in order, followed by doneFn.");
+ test.done();
+ },
+ 'Asynchronous': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ var done = this.async();
+ setTimeout(done, 10);
+ });
+
+ setTimeout(function() {
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "each", "c", 2, arr
+ ], "should call eachFn for each array item, in order.");
+ test.done();
+ }, 100);
+ },
+ 'Asynchronous, done': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ var done = this.async();
+ setTimeout(done, 10);
+ }, function(notAborted, arr) {
+ that.track("done", notAborted, arr);
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "each", "c", 2, arr,
+ "done", true, arr
+ ], "should call eachFn for each array item, in order, followed by doneFn.");
+ test.done();
+ });
+ },
+ 'Asynchronous, early abort': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ var done = this.async();
+ setTimeout(function() {
+ done(item !== "b");
+ }, 10);
+ }, function(notAborted, arr) {
+ that.track("done", notAborted, arr);
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "done", false, arr
+ ], "should call eachFn for each array item, in order, followed by doneFn.");
+ test.done();
+ });
+ },
+ 'Not actually asynchronous': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ var done = this.async();
+ done();
+ }, function(notAborted, arr) {
+ that.track("done", notAborted, arr);
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "each", "c", 2, arr,
+ "done", true, arr
+ ], "should call eachFn for each array item, in order, followed by doneFn.");
+ test.done();
+ });
+ },
+ 'Not actually asynchronous, early abort': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = ["a", "b", "c"];
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ var done = this.async();
+ done(item !== "b");
+ }, function(notAborted, arr) {
+ that.track("done", notAborted, arr);
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "b", 1, arr,
+ "done", false, arr
+ ], "should call eachFn for each array item, in order, followed by doneFn.");
+ test.done();
+ });
+ },
+ 'Sparse array support': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var arr = [];
+ arr[0] = "a";
+ arr[9] = "z";
+
+ forEach(arr, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ });
+
+ test.deepEqual(that.order, [
+ "each", "a", 0, arr,
+ "each", "z", 9, arr
+ ], "should skip nonexistent array items.");
+ test.done();
+ },
+ 'Invalid length sanitization': function(test) {
+ test.expect(1);
+ var that = this;
+
+ var obj = {length: 4294967299, 0: "a", 2: "b", 3: "c" };
+
+ forEach(obj, function(item, index, arr) {
+ that.track("each", item, index, arr);
+ });
+
+ test.deepEqual(that.order, [
+ "each", "a", 0, obj,
+ "each", "b", 2, obj
+ ], "should sanitize length property (ToUint32).");
+ test.done();
+ }
+};
diff --git a/source/node_modules/async/CHANGELOG.md b/source/node_modules/async/CHANGELOG.md
new file mode 100644
index 000000000..f15e08121
--- /dev/null
+++ b/source/node_modules/async/CHANGELOG.md
@@ -0,0 +1,125 @@
+# v1.5.2
+- Allow using `"consructor"` as an argument in `memoize` (#998)
+- Give a better error messsage when `auto` dependency checking fails (#994)
+- Various doc updates (#936, #956, #979, #1002)
+
+# v1.5.1
+- Fix issue with `pause` in `queue` with concurrency enabled (#946)
+- `while` and `until` now pass the final result to callback (#963)
+- `auto` will properly handle concurrency when there is no callback (#966)
+- `auto` will now properly stop execution when an error occurs (#988, #993)
+- Various doc fixes (#971, #980)
+
+# v1.5.0
+
+- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
+- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873)
+- `auto` now accepts an optional `concurrency` argument to limit the number of running tasks (#637)
+- Added `queue#workersList()`, to retrieve the list of currently running tasks. (#891)
+- Various code simplifications (#896, #904)
+- Various doc fixes :scroll: (#890, #894, #903, #905, #912)
+
+# v1.4.2
+
+- Ensure coverage files don't get published on npm (#879)
+
+# v1.4.1
+
+- Add in overlooked `detectLimit` method (#866)
+- Removed unnecessary files from npm releases (#861)
+- Removed usage of a reserved word to prevent :boom: in older environments (#870)
+
+# v1.4.0
+
+- `asyncify` now supports promises (#840)
+- Added `Limit` versions of `filter` and `reject` (#836)
+- Add `Limit` versions of `detect`, `some` and `every` (#828, #829)
+- `some`, `every` and `detect` now short circuit early (#828, #829)
+- Improve detection of the global object (#804), enabling use in WebWorkers
+- `whilst` now called with arguments from iterator (#823)
+- `during` now gets called with arguments from iterator (#824)
+- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
+
+
+# v1.3.0
+
+New Features:
+- Added `constant`
+- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806)
+- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800)
+- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793)
+- `async` should work better in Web Workers due to better `root` detection (#804)
+- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642)
+- Various internal updates (#786, #801, #802, #803)
+- Various doc fixes (#790, #794)
+
+Bug Fixes:
+- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783)
+
+
+# v1.2.1
+
+Bug Fix:
+
+- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
+
+
+# v1.2.0
+
+New Features:
+
+- Added `timesLimit` (#743)
+- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772)
+
+Bug Fixes:
+
+- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777)
+
+
+# v1.1.1
+
+Bug Fix:
+
+- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
+
+
+# v1.1.0
+
+New Features:
+
+- `cargo` now supports all of the same methods and event callbacks as `queue`.
+- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769)
+- Optimized `map`, `eachOf`, and `waterfall` families of functions
+- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667).
+- The callback is now optional for the composed results of `compose` and `seq`. (#618)
+- Reduced file size by 4kb, (minified version by 1kb)
+- Added code coverage through `nyc` and `coveralls` (#768)
+
+Bug Fixes:
+
+- `forever` will no longer stack overflow with a synchronous iterator (#622)
+- `eachLimit` and other limit functions will stop iterating once an error occurs (#754)
+- Always pass `null` in callbacks when there is no error (#439)
+- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668)
+- `each` and family will properly handle an empty array (#578)
+- `eachSeries` and family will finish if the underlying array is modified during execution (#557)
+- `queue` will throw if a non-function is passed to `q.push()` (#593)
+- Doc fixes (#629, #766)
+
+
+# v1.0.0
+
+No known breaking changes, we are simply complying with semver from here on out.
+
+Changes:
+
+- Start using a changelog!
+- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321)
+- Detect deadlocks in `auto` (#663)
+- Better support for require.js (#527)
+- Throw if queue created with concurrency `0` (#714)
+- Fix unneeded iteration in `queue.resume()` (#758)
+- Guard against timer mocking overriding `setImmediate` (#609 #611)
+- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729)
+- Use single noop function internally (#546)
+- Optimize internal `_each`, `_map` and `_keys` functions.
diff --git a/source/node_modules/async/LICENSE b/source/node_modules/async/LICENSE
new file mode 100644
index 000000000..8f2969858
--- /dev/null
+++ b/source/node_modules/async/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010-2014 Caolan McMahon
+
+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.
diff --git a/source/node_modules/async/README.md b/source/node_modules/async/README.md
new file mode 100644
index 000000000..316c40505
--- /dev/null
+++ b/source/node_modules/async/README.md
@@ -0,0 +1,1877 @@
+# Async.js
+
+[](https://travis-ci.org/caolan/async)
+[](https://www.npmjs.org/package/async)
+[](https://coveralls.io/r/caolan/async?branch=master)
+[](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+
+Async is a utility module which provides straight-forward, powerful functions
+for working with asynchronous JavaScript. Although originally designed for
+use with [Node.js](http://nodejs.org) and installable via `npm install async`,
+it can also be used directly in the browser.
+
+Async is also installable via:
+
+- [bower](http://bower.io/): `bower install async`
+- [component](https://github.com/component/component): `component install
+ caolan/async`
+- [jam](http://jamjs.org/): `jam install async`
+- [spm](http://spmjs.io/): `spm install async`
+
+Async provides around 20 functions that include the usual 'functional'
+suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns
+for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these
+functions assume you follow the Node.js convention of providing a single
+callback as the last argument of your `async` function.
+
+
+## Quick Examples
+
+```javascript
+async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+
+async.filter(['file1','file2','file3'], fs.exists, function(results){
+ // results now equals an array of the existing files
+});
+
+async.parallel([
+ function(){ ... },
+ function(){ ... }
+], callback);
+
+async.series([
+ function(){ ... },
+ function(){ ... }
+]);
+```
+
+There are many more functions available so take a look at the docs below for a
+full list. This module aims to be comprehensive, so if you feel anything is
+missing please create a GitHub issue for it.
+
+## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js)
+### Synchronous iteration functions
+
+If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop.
+
+This can also arise by accident if you callback early in certain cases:
+
+```js
+async.eachSeries(hugeArray, function iterator(item, callback) {
+ if (inCache(item)) {
+ callback(null, cache[item]); // if many items are cached, you'll overflow
+ } else {
+ doSomeIO(item, callback);
+ }
+}, function done() {
+ //...
+});
+```
+
+Just change it to:
+
+```js
+async.eachSeries(hugeArray, function iterator(item, callback) {
+ if (inCache(item)) {
+ async.setImmediate(function () {
+ callback(null, cache[item]);
+ });
+ } else {
+ doSomeIO(item, callback);
+ //...
+```
+
+Async guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral.
+
+If JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works.
+
+
+### Multiple callbacks
+
+Make sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases.
+
+```js
+async.waterfall([
+ function (callback) {
+ getSomething(options, function (err, result) {
+ if (err) {
+ callback(new Error("failed getting something:" + err.message));
+ // we should return here
+ }
+ // since we did not return, this callback still will be called and
+ // `processData` will be called twice
+ callback(null, result);
+ });
+ },
+ processData
+], done)
+```
+
+It is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function.
+
+
+### Binding a context to an iterator
+
+This section is really about `bind`, not about `async`. If you are wondering how to
+make `async` execute your iterators in a given context, or are confused as to why
+a method of another library isn't working as an iterator, study this example:
+
+```js
+// Here is a simple object with an (unnecessarily roundabout) squaring method
+var AsyncSquaringLibrary = {
+ squareExponent: 2,
+ square: function(number, callback){
+ var result = Math.pow(number, this.squareExponent);
+ setTimeout(function(){
+ callback(null, result);
+ }, 200);
+ }
+};
+
+async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
+ // result is [NaN, NaN, NaN]
+ // This fails because the `this.squareExponent` expression in the square
+ // function is not evaluated in the context of AsyncSquaringLibrary, and is
+ // therefore undefined.
+});
+
+async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
+ // result is [1, 4, 9]
+ // With the help of bind we can attach a context to the iterator before
+ // passing it to async. Now the square function will be executed in its
+ // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
+ // will be as expected.
+});
+```
+
+## Download
+
+The source is available for download from
+[GitHub](https://github.com/caolan/async/blob/master/lib/async.js).
+Alternatively, you can install using Node Package Manager (`npm`):
+
+ npm install async
+
+As well as using Bower:
+
+ bower install async
+
+__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
+
+## In the Browser
+
+So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.
+
+Usage:
+
+```html
+
+
+```
+
+## Documentation
+
+Some functions are also available in the following forms:
+* `Series` - the same as `` but runs only a single async operation at a time
+* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time
+
+### Collections
+
+* [`each`](#each), `eachSeries`, `eachLimit`
+* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit`
+* [`map`](#map), `mapSeries`, `mapLimit`
+* [`filter`](#filter), `filterSeries`, `filterLimit`
+* [`reject`](#reject), `rejectSeries`, `rejectLimit`
+* [`reduce`](#reduce), [`reduceRight`](#reduceRight)
+* [`detect`](#detect), `detectSeries`, `detectLimit`
+* [`sortBy`](#sortBy)
+* [`some`](#some), `someLimit`
+* [`every`](#every), `everyLimit`
+* [`concat`](#concat), `concatSeries`
+
+### Control Flow
+
+* [`series`](#seriestasks-callback)
+* [`parallel`](#parallel), `parallelLimit`
+* [`whilst`](#whilst), [`doWhilst`](#doWhilst)
+* [`until`](#until), [`doUntil`](#doUntil)
+* [`during`](#during), [`doDuring`](#doDuring)
+* [`forever`](#forever)
+* [`waterfall`](#waterfall)
+* [`compose`](#compose)
+* [`seq`](#seq)
+* [`applyEach`](#applyEach), `applyEachSeries`
+* [`queue`](#queue), [`priorityQueue`](#priorityQueue)
+* [`cargo`](#cargo)
+* [`auto`](#auto)
+* [`retry`](#retry)
+* [`iterator`](#iterator)
+* [`times`](#times), `timesSeries`, `timesLimit`
+
+### Utils
+
+* [`apply`](#apply)
+* [`nextTick`](#nextTick)
+* [`memoize`](#memoize)
+* [`unmemoize`](#unmemoize)
+* [`ensureAsync`](#ensureAsync)
+* [`constant`](#constant)
+* [`asyncify`](#asyncify)
+* [`wrapSync`](#wrapSync)
+* [`log`](#log)
+* [`dir`](#dir)
+* [`noConflict`](#noConflict)
+
+## Collections
+
+
+
+### each(arr, iterator, [callback])
+
+Applies the function `iterator` to each item in `arr`, in parallel.
+The `iterator` is called with an item from the list, and a callback for when it
+has finished. If the `iterator` passes an error to its `callback`, the main
+`callback` (for the `each` function) is immediately called with the error.
+
+Note, that since this function applies `iterator` to each item in parallel,
+there is no guarantee that the iterator functions will complete in order.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err)` which must be called once it has
+ completed. If no error has occurred, the `callback` should be run without
+ arguments or with an explicit `null` argument. The array index is not passed
+ to the iterator. If you need the index, use [`forEachOf`](#forEachOf).
+* `callback(err)` - *Optional* A callback which is called when all `iterator` functions
+ have finished, or an error occurs.
+
+__Examples__
+
+
+```js
+// assuming openFiles is an array of file names and saveFile is a function
+// to save the modified contents of that file:
+
+async.each(openFiles, saveFile, function(err){
+ // if any of the saves produced an error, err would equal that error
+});
+```
+
+```js
+// assuming openFiles is an array of file names
+
+async.each(openFiles, function(file, callback) {
+
+ // Perform operation on file here.
+ console.log('Processing file ' + file);
+
+ if( file.length > 32 ) {
+ console.log('This file name is too long');
+ callback('File name too long');
+ } else {
+ // Do work to process file here
+ console.log('File processed');
+ callback();
+ }
+}, function(err){
+ // if any of the file processing produced an error, err would equal that error
+ if( err ) {
+ // One of the iterations produced an error.
+ // All processing will now stop.
+ console.log('A file failed to process');
+ } else {
+ console.log('All files have been processed successfully');
+ }
+});
+```
+
+__Related__
+
+* eachSeries(arr, iterator, [callback])
+* eachLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+
+
+### forEachOf(obj, iterator, [callback])
+
+Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator.
+
+__Arguments__
+
+* `obj` - An object or array to iterate over.
+* `iterator(item, key, callback)` - A function to apply to each item in `obj`.
+The `key` is the item's key, or index in the case of an array. The iterator is
+passed a `callback(err)` which must be called once it has completed. If no
+error has occurred, the callback should be run without arguments or with an
+explicit `null` argument.
+* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs.
+
+__Example__
+
+```js
+var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
+var configs = {};
+
+async.forEachOf(obj, function (value, key, callback) {
+ fs.readFile(__dirname + value, "utf8", function (err, data) {
+ if (err) return callback(err);
+ try {
+ configs[key] = JSON.parse(data);
+ } catch (e) {
+ return callback(e);
+ }
+ callback();
+ })
+}, function (err) {
+ if (err) console.error(err.message);
+ // configs is now a map of JSON data
+ doSomethingWith(configs);
+})
+```
+
+__Related__
+
+* forEachOfSeries(obj, iterator, [callback])
+* forEachOfLimit(obj, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### map(arr, iterator, [callback])
+
+Produces a new array of values by mapping each value in `arr` through
+the `iterator` function. The `iterator` is called with an item from `arr` and a
+callback for when it has finished processing. Each of these callback takes 2 arguments:
+an `error`, and the transformed item from `arr`. If `iterator` passes an error to its
+callback, the main `callback` (for the `map` function) is immediately called with the error.
+
+Note, that since this function applies the `iterator` to each item in parallel,
+there is no guarantee that the `iterator` functions will complete in order.
+However, the results array will be in the same order as the original `arr`.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err, transformed)` which must be called once
+ it has completed with an error (which can be `null`) and a transformed item.
+* `callback(err, results)` - *Optional* A callback which is called when all `iterator`
+ functions have finished, or an error occurs. Results is an array of the
+ transformed items from the `arr`.
+
+__Example__
+
+```js
+async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+```
+
+__Related__
+* mapSeries(arr, iterator, [callback])
+* mapLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+
+### filter(arr, iterator, [callback])
+
+__Alias:__ `select`
+
+Returns a new array of all the values in `arr` which pass an async truth test.
+_The callback for each `iterator` call only accepts a single argument of `true` or
+`false`; it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like `fs.exists`. This operation is
+performed in parallel, but the results array will be in the same order as the
+original.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
+ The `iterator` is passed a `callback(truthValue)`, which must be called with a
+ boolean argument once it has completed.
+* `callback(results)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished.
+
+__Example__
+
+```js
+async.filter(['file1','file2','file3'], fs.exists, function(results){
+ // results now equals an array of the existing files
+});
+```
+
+__Related__
+
+* filterSeries(arr, iterator, [callback])
+* filterLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### reject(arr, iterator, [callback])
+
+The opposite of [`filter`](#filter). Removes values that pass an `async` truth test.
+
+__Related__
+
+* rejectSeries(arr, iterator, [callback])
+* rejectLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### reduce(arr, memo, iterator, [callback])
+
+__Aliases:__ `inject`, `foldl`
+
+Reduces `arr` into a single value using an async `iterator` to return
+each successive step. `memo` is the initial state of the reduction.
+This function only operates in series.
+
+For performance reasons, it may make sense to split a call to this function into
+a parallel map, and then use the normal `Array.prototype.reduce` on the results.
+This function is for situations where each step in the reduction needs to be async;
+if you can get the data before reducing it, then it's probably a good idea to do so.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `memo` - The initial state of the reduction.
+* `iterator(memo, item, callback)` - A function applied to each item in the
+ array to produce the next step in the reduction. The `iterator` is passed a
+ `callback(err, reduction)` which accepts an optional error as its first
+ argument, and the state of the reduction as the second. If an error is
+ passed to the callback, the reduction is stopped and the main `callback` is
+ immediately called with the error.
+* `callback(err, result)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished. Result is the reduced value.
+
+__Example__
+
+```js
+async.reduce([1,2,3], 0, function(memo, item, callback){
+ // pointless async:
+ process.nextTick(function(){
+ callback(null, memo + item)
+ });
+}, function(err, result){
+ // result is now equal to the last value of memo, which is 6
+});
+```
+
+---------------------------------------
+
+
+### reduceRight(arr, memo, iterator, [callback])
+
+__Alias:__ `foldr`
+
+Same as [`reduce`](#reduce), only operates on `arr` in reverse order.
+
+
+---------------------------------------
+
+
+### detect(arr, iterator, [callback])
+
+Returns the first value in `arr` that passes an async truth test. The
+`iterator` is applied in parallel, meaning the first iterator to return `true` will
+fire the detect `callback` with that result. That means the result might not be
+the first item in the original `arr` (in terms of order) that passes the test.
+
+If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
+ The iterator is passed a `callback(truthValue)` which must be called with a
+ boolean argument once it has completed. **Note: this callback does not take an error as its first argument.**
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `true`, or after all the `iterator` functions have finished. Result will be
+ the first item in the array that passes the truth test (iterator) or the
+ value `undefined` if none passed. **Note: this callback does not take an error as its first argument.**
+
+__Example__
+
+```js
+async.detect(['file1','file2','file3'], fs.exists, function(result){
+ // result now equals the first file in the list that exists
+});
+```
+
+__Related__
+
+* detectSeries(arr, iterator, [callback])
+* detectLimit(arr, limit, iterator, [callback])
+
+---------------------------------------
+
+
+### sortBy(arr, iterator, [callback])
+
+Sorts a list by the results of running each `arr` value through an async `iterator`.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err, sortValue)` which must be called once it
+ has completed with an error (which can be `null`) and a value to use as the sort
+ criteria.
+* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished, or an error occurs. Results is the items from
+ the original `arr` sorted by the values returned by the `iterator` calls.
+
+__Example__
+
+```js
+async.sortBy(['file1','file2','file3'], function(file, callback){
+ fs.stat(file, function(err, stats){
+ callback(err, stats.mtime);
+ });
+}, function(err, results){
+ // results is now the original array of files sorted by
+ // modified date
+});
+```
+
+__Sort Order__
+
+By modifying the callback parameter the sorting order can be influenced:
+
+```js
+//ascending order
+async.sortBy([1,9,3,5], function(x, callback){
+ callback(null, x);
+}, function(err,result){
+ //result callback
+} );
+
+//descending order
+async.sortBy([1,9,3,5], function(x, callback){
+ callback(null, x*-1); //<- x*-1 instead of x, turns the order around
+}, function(err,result){
+ //result callback
+} );
+```
+
+---------------------------------------
+
+
+### some(arr, iterator, [callback])
+
+__Alias:__ `any`
+
+Returns `true` if at least one element in the `arr` satisfies an async test.
+_The callback for each iterator call only accepts a single argument of `true` or
+`false`; it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like `fs.exists`. Once any iterator
+call returns `true`, the main `callback` is immediately called.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in the array
+ in parallel. The iterator is passed a `callback(truthValue)`` which must be
+ called with a boolean argument once it has completed.
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `true`, or after all the iterator functions have finished. Result will be
+ either `true` or `false` depending on the values of the async tests.
+
+ **Note: the callbacks do not take an error as their first argument.**
+__Example__
+
+```js
+async.some(['file1','file2','file3'], fs.exists, function(result){
+ // if result is true then at least one of the files exists
+});
+```
+
+__Related__
+
+* someLimit(arr, limit, iterator, callback)
+
+---------------------------------------
+
+
+### every(arr, iterator, [callback])
+
+__Alias:__ `all`
+
+Returns `true` if every element in `arr` satisfies an async test.
+_The callback for each `iterator` call only accepts a single argument of `true` or
+`false`; it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like `fs.exists`.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A truth test to apply to each item in the array
+ in parallel. The iterator is passed a `callback(truthValue)` which must be
+ called with a boolean argument once it has completed.
+* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
+ `false`, or after all the iterator functions have finished. Result will be
+ either `true` or `false` depending on the values of the async tests.
+
+ **Note: the callbacks do not take an error as their first argument.**
+
+__Example__
+
+```js
+async.every(['file1','file2','file3'], fs.exists, function(result){
+ // if result is true then every file exists
+});
+```
+
+__Related__
+
+* everyLimit(arr, limit, iterator, callback)
+
+---------------------------------------
+
+
+### concat(arr, iterator, [callback])
+
+Applies `iterator` to each item in `arr`, concatenating the results. Returns the
+concatenated list. The `iterator`s are called in parallel, and the results are
+concatenated as they return. There is no guarantee that the results array will
+be returned in the original order of `arr` passed to the `iterator` function.
+
+__Arguments__
+
+* `arr` - An array to iterate over.
+* `iterator(item, callback)` - A function to apply to each item in `arr`.
+ The iterator is passed a `callback(err, results)` which must be called once it
+ has completed with an error (which can be `null`) and an array of results.
+* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`
+ functions have finished, or an error occurs. Results is an array containing
+ the concatenated results of the `iterator` function.
+
+__Example__
+
+```js
+async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
+ // files is now a list of filenames that exist in the 3 directories
+});
+```
+
+__Related__
+
+* concatSeries(arr, iterator, [callback])
+
+
+## Control Flow
+
+
+### series(tasks, [callback])
+
+Run the functions in the `tasks` array in series, each one running once the previous
+function has completed. If any functions in the series pass an error to its
+callback, no more functions are run, and `callback` is immediately called with the value of the error.
+Otherwise, `callback` receives an array of results when `tasks` have completed.
+
+It is also possible to use an object instead of an array. Each property will be
+run as a function, and the results will be passed to the final `callback` as an object
+instead of an array. This can be a more readable way of handling results from
+[`series`](#series).
+
+**Note** that while many implementations preserve the order of object properties, the
+[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
+explicitly states that
+
+> The mechanics and order of enumerating the properties is not specified.
+
+So if you rely on the order in which your series of functions are executed, and want
+this to work on all platforms, consider using an array.
+
+__Arguments__
+
+* `tasks` - An array or object containing functions to run, each function is passed
+ a `callback(err, result)` it must call on completion with an error `err` (which can
+ be `null`) and an optional `result` value.
+* `callback(err, results)` - An optional callback to run once all the functions
+ have completed. This function gets a results array (or object) containing all
+ the result arguments passed to the `task` callbacks.
+
+__Example__
+
+```js
+async.series([
+ function(callback){
+ // do some stuff ...
+ callback(null, 'one');
+ },
+ function(callback){
+ // do some more stuff ...
+ callback(null, 'two');
+ }
+],
+// optional callback
+function(err, results){
+ // results is now equal to ['one', 'two']
+});
+
+
+// an example using an object instead of an array
+async.series({
+ one: function(callback){
+ setTimeout(function(){
+ callback(null, 1);
+ }, 200);
+ },
+ two: function(callback){
+ setTimeout(function(){
+ callback(null, 2);
+ }, 100);
+ }
+},
+function(err, results) {
+ // results is now equal to: {one: 1, two: 2}
+});
+```
+
+---------------------------------------
+
+
+### parallel(tasks, [callback])
+
+Run the `tasks` array of functions in parallel, without waiting until the previous
+function has completed. If any of the functions pass an error to its
+callback, the main `callback` is immediately called with the value of the error.
+Once the `tasks` have completed, the results are passed to the final `callback` as an
+array.
+
+**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded.
+
+It is also possible to use an object instead of an array. Each property will be
+run as a function and the results will be passed to the final `callback` as an object
+instead of an array. This can be a more readable way of handling results from
+[`parallel`](#parallel).
+
+
+__Arguments__
+
+* `tasks` - An array or object containing functions to run. Each function is passed
+ a `callback(err, result)` which it must call on completion with an error `err`
+ (which can be `null`) and an optional `result` value.
+* `callback(err, results)` - An optional callback to run once all the functions
+ have completed successfully. This function gets a results array (or object) containing all
+ the result arguments passed to the task callbacks.
+
+__Example__
+
+```js
+async.parallel([
+ function(callback){
+ setTimeout(function(){
+ callback(null, 'one');
+ }, 200);
+ },
+ function(callback){
+ setTimeout(function(){
+ callback(null, 'two');
+ }, 100);
+ }
+],
+// optional callback
+function(err, results){
+ // the results array will equal ['one','two'] even though
+ // the second function had a shorter timeout.
+});
+
+
+// an example using an object instead of an array
+async.parallel({
+ one: function(callback){
+ setTimeout(function(){
+ callback(null, 1);
+ }, 200);
+ },
+ two: function(callback){
+ setTimeout(function(){
+ callback(null, 2);
+ }, 100);
+ }
+},
+function(err, results) {
+ // results is now equals to: {one: 1, two: 2}
+});
+```
+
+__Related__
+
+* parallelLimit(tasks, limit, [callback])
+
+---------------------------------------
+
+
+### whilst(test, fn, callback)
+
+Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,
+or an error occurs.
+
+__Arguments__
+
+* `test()` - synchronous truth test to perform before each execution of `fn`.
+* `fn(callback)` - A function which is called each time `test` passes. The function is
+ passed a `callback(err)`, which must be called once it has completed with an
+ optional `err` argument.
+* `callback(err, [results])` - A callback which is called after the test
+ function has failed and repeated execution of `fn` has stopped. `callback`
+ will be passed an error and any arguments passed to the final `fn`'s callback.
+
+__Example__
+
+```js
+var count = 0;
+
+async.whilst(
+ function () { return count < 5; },
+ function (callback) {
+ count++;
+ setTimeout(function () {
+ callback(null, count);
+ }, 1000);
+ },
+ function (err, n) {
+ // 5 seconds have passed, n = 5
+ }
+);
+```
+
+---------------------------------------
+
+
+### doWhilst(fn, test, callback)
+
+The post-check version of [`whilst`](#whilst). To reflect the difference in
+the order of operations, the arguments `test` and `fn` are switched.
+
+`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
+
+---------------------------------------
+
+
+### until(test, fn, callback)
+
+Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,
+or an error occurs. `callback` will be passed an error and any arguments passed
+to the final `fn`'s callback.
+
+The inverse of [`whilst`](#whilst).
+
+---------------------------------------
+
+
+### doUntil(fn, test, callback)
+
+Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.
+
+---------------------------------------
+
+
+### during(test, fn, callback)
+
+Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error.
+
+__Example__
+
+```js
+var count = 0;
+
+async.during(
+ function (callback) {
+ return callback(null, count < 5);
+ },
+ function (callback) {
+ count++;
+ setTimeout(callback, 1000);
+ },
+ function (err) {
+ // 5 seconds have passed
+ }
+);
+```
+
+---------------------------------------
+
+
+### doDuring(fn, test, callback)
+
+The post-check version of [`during`](#during). To reflect the difference in
+the order of operations, the arguments `test` and `fn` are switched.
+
+Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function.
+
+---------------------------------------
+
+
+### forever(fn, [errback])
+
+Calls the asynchronous function `fn` with a callback parameter that allows it to
+call itself again, in series, indefinitely.
+
+If an error is passed to the callback then `errback` is called with the
+error, and execution stops, otherwise it will never be called.
+
+```js
+async.forever(
+ function(next) {
+ // next is suitable for passing to things that need a callback(err [, whatever]);
+ // it will result in this function being called again.
+ },
+ function(err) {
+ // if next is called with a value in its first parameter, it will appear
+ // in here as 'err', and execution will stop.
+ }
+);
+```
+
+---------------------------------------
+
+
+### waterfall(tasks, [callback])
+
+Runs the `tasks` array of functions in series, each passing their results to the next in
+the array. However, if any of the `tasks` pass an error to their own callback, the
+next function is not executed, and the main `callback` is immediately called with
+the error.
+
+__Arguments__
+
+* `tasks` - An array of functions to run, each function is passed a
+ `callback(err, result1, result2, ...)` it must call on completion. The first
+ argument is an error (which can be `null`) and any further arguments will be
+ passed as arguments in order to the next task.
+* `callback(err, [results])` - An optional callback to run once all the functions
+ have completed. This will be passed the results of the last task's callback.
+
+
+
+__Example__
+
+```js
+async.waterfall([
+ function(callback) {
+ callback(null, 'one', 'two');
+ },
+ function(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+ },
+ function(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+ }
+], function (err, result) {
+ // result now equals 'done'
+});
+```
+Or, with named functions:
+
+```js
+async.waterfall([
+ myFirstFunction,
+ mySecondFunction,
+ myLastFunction,
+], function (err, result) {
+ // result now equals 'done'
+});
+function myFirstFunction(callback) {
+ callback(null, 'one', 'two');
+}
+function mySecondFunction(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+}
+function myLastFunction(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+}
+```
+
+Or, if you need to pass any argument to the first function:
+
+```js
+async.waterfall([
+ async.apply(myFirstFunction, 'zero'),
+ mySecondFunction,
+ myLastFunction,
+], function (err, result) {
+ // result now equals 'done'
+});
+function myFirstFunction(arg1, callback) {
+ // arg1 now equals 'zero'
+ callback(null, 'one', 'two');
+}
+function mySecondFunction(arg1, arg2, callback) {
+ // arg1 now equals 'one' and arg2 now equals 'two'
+ callback(null, 'three');
+}
+function myLastFunction(arg1, callback) {
+ // arg1 now equals 'three'
+ callback(null, 'done');
+}
+```
+
+---------------------------------------
+
+### compose(fn1, fn2...)
+
+Creates a function which is a composition of the passed asynchronous
+functions. Each function consumes the return value of the function that
+follows. Composing functions `f()`, `g()`, and `h()` would produce the result of
+`f(g(h()))`, only this version uses callbacks to obtain the return values.
+
+Each function is executed with the `this` binding of the composed function.
+
+__Arguments__
+
+* `functions...` - the asynchronous functions to compose
+
+
+__Example__
+
+```js
+function add1(n, callback) {
+ setTimeout(function () {
+ callback(null, n + 1);
+ }, 10);
+}
+
+function mul3(n, callback) {
+ setTimeout(function () {
+ callback(null, n * 3);
+ }, 10);
+}
+
+var add1mul3 = async.compose(mul3, add1);
+
+add1mul3(4, function (err, result) {
+ // result now equals 15
+});
+```
+
+---------------------------------------
+
+### seq(fn1, fn2...)
+
+Version of the compose function that is more natural to read.
+Each function consumes the return value of the previous function.
+It is the equivalent of [`compose`](#compose) with the arguments reversed.
+
+Each function is executed with the `this` binding of the composed function.
+
+__Arguments__
+
+* `functions...` - the asynchronous functions to compose
+
+
+__Example__
+
+```js
+// Requires lodash (or underscore), express3 and dresende's orm2.
+// Part of an app, that fetches cats of the logged user.
+// This example uses `seq` function to avoid overnesting and error
+// handling clutter.
+app.get('/cats', function(request, response) {
+ var User = request.models.User;
+ async.seq(
+ _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
+ function(user, fn) {
+ user.getCats(fn); // 'getCats' has signature (callback(err, data))
+ }
+ )(req.session.user_id, function (err, cats) {
+ if (err) {
+ console.error(err);
+ response.json({ status: 'error', message: err.message });
+ } else {
+ response.json({ status: 'ok', message: 'Cats found', data: cats });
+ }
+ });
+});
+```
+
+---------------------------------------
+
+### applyEach(fns, args..., callback)
+
+Applies the provided arguments to each function in the array, calling
+`callback` after all functions have completed. If you only provide the first
+argument, then it will return a function which lets you pass in the
+arguments as if it were a single function call.
+
+__Arguments__
+
+* `fns` - the asynchronous functions to all call with the same arguments
+* `args...` - any number of separate arguments to pass to the function
+* `callback` - the final argument should be the callback, called when all
+ functions have completed processing
+
+
+__Example__
+
+```js
+async.applyEach([enableSearch, updateSchema], 'bucket', callback);
+
+// partial application example:
+async.each(
+ buckets,
+ async.applyEach([enableSearch, updateSchema]),
+ callback
+);
+```
+
+__Related__
+
+* applyEachSeries(tasks, args..., [callback])
+
+---------------------------------------
+
+
+### queue(worker, [concurrency])
+
+Creates a `queue` object with the specified `concurrency`. Tasks added to the
+`queue` are processed in parallel (up to the `concurrency` limit). If all
+`worker`s are in progress, the task is queued until one becomes available.
+Once a `worker` completes a `task`, that `task`'s callback is called.
+
+__Arguments__
+
+* `worker(task, callback)` - An asynchronous function for processing a queued
+ task, which must call its `callback(err)` argument when finished, with an
+ optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`.
+* `concurrency` - An `integer` for determining how many `worker` functions should be
+ run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown.
+
+__Queue objects__
+
+The `queue` object returned by this function has the following properties and
+methods:
+
+* `length()` - a function returning the number of items waiting to be processed.
+* `started` - a function returning whether or not any items have been pushed and processed by the queue
+* `running()` - a function returning the number of items currently being processed.
+* `workersList()` - a function returning the array of items currently being processed.
+* `idle()` - a function returning false if there are items waiting or being processed, or true if not.
+* `concurrency` - an integer for determining how many `worker` functions should be
+ run in parallel. This property can be changed after a `queue` is created to
+ alter the concurrency on-the-fly.
+* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once
+ the `worker` has finished processing the task. Instead of a single task, a `tasks` array
+ can be submitted. The respective callback is used for every task in the list.
+* `unshift(task, [callback])` - add a new task to the front of the `queue`.
+* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,
+ and further tasks will be queued.
+* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.
+* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.
+* `paused` - a boolean for determining whether the queue is in a paused state
+* `pause()` - a function that pauses the processing of tasks until `resume()` is called.
+* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.
+* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle.
+
+__Example__
+
+```js
+// create a queue object with concurrency 2
+
+var q = async.queue(function (task, callback) {
+ console.log('hello ' + task.name);
+ callback();
+}, 2);
+
+
+// assign a callback
+q.drain = function() {
+ console.log('all items have been processed');
+}
+
+// add some items to the queue
+
+q.push({name: 'foo'}, function (err) {
+ console.log('finished processing foo');
+});
+q.push({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
+
+// add some items to the queue (batch-wise)
+
+q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
+ console.log('finished processing item');
+});
+
+// add some items to the front of the queue
+
+q.unshift({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
+```
+
+
+---------------------------------------
+
+
+### priorityQueue(worker, concurrency)
+
+The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:
+
+* `push(task, priority, [callback])` - `priority` should be a number. If an array of
+ `tasks` is given, all tasks will be assigned the same priority.
+* The `unshift` method was removed.
+
+---------------------------------------
+
+
+### cargo(worker, [payload])
+
+Creates a `cargo` object with the specified payload. Tasks added to the
+cargo will be processed altogether (up to the `payload` limit). If the
+`worker` is in progress, the task is queued until it becomes available. Once
+the `worker` has completed some tasks, each callback of those tasks is called.
+Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work.
+
+While [queue](#queue) passes only one task to one of a group of workers
+at a time, cargo passes an array of tasks to a single worker, repeating
+when the worker is finished.
+
+__Arguments__
+
+* `worker(tasks, callback)` - An asynchronous function for processing an array of
+ queued tasks, which must call its `callback(err)` argument when finished, with
+ an optional `err` argument.
+* `payload` - An optional `integer` for determining how many tasks should be
+ processed per round; if omitted, the default is unlimited.
+
+__Cargo objects__
+
+The `cargo` object returned by this function has the following properties and
+methods:
+
+* `length()` - A function returning the number of items waiting to be processed.
+* `payload` - An `integer` for determining how many tasks should be
+ process per round. This property can be changed after a `cargo` is created to
+ alter the payload on-the-fly.
+* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called
+ once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`
+ can be submitted. The respective callback is used for every task in the list.
+* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.
+* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.
+* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.
+* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue)
+
+__Example__
+
+```js
+// create a cargo object with payload 2
+
+var cargo = async.cargo(function (tasks, callback) {
+ for(var i=0; i
+### auto(tasks, [concurrency], [callback])
+
+Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied.
+
+If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far.
+
+Note, all functions are called with a `results` object as a second argument,
+so it is unsafe to pass functions in the `tasks` object which cannot handle the
+extra argument.
+
+For example, this snippet of code:
+
+```js
+async.auto({
+ readData: async.apply(fs.readFile, 'data.txt', 'utf-8')
+}, callback);
+```
+
+will have the effect of calling `readFile` with the results object as the last
+argument, which will fail:
+
+```js
+fs.readFile('data.txt', 'utf-8', cb, {});
+```
+
+Instead, wrap the call to `readFile` in a function which does not forward the
+`results` object:
+
+```js
+async.auto({
+ readData: function(cb, results){
+ fs.readFile('data.txt', 'utf-8', cb);
+ }
+}, callback);
+```
+
+__Arguments__
+
+* `tasks` - An object. Each of its properties is either a function or an array of
+ requirements, with the function itself the last item in the array. The object's key
+ of a property serves as the name of the task defined by that property,
+ i.e. can be used when specifying requirements for other tasks.
+ The function receives two arguments: (1) a `callback(err, result)` which must be
+ called when finished, passing an `error` (which can be `null`) and the result of
+ the function's execution, and (2) a `results` object, containing the results of
+ the previously executed functions.
+* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible.
+* `callback(err, results)` - An optional callback which is called when all the
+ tasks have been completed. It receives the `err` argument if any `tasks`
+ pass an error to their callback. Results are always returned; however, if
+ an error occurs, no further `tasks` will be performed, and the results
+ object will only contain partial results.
+
+
+__Example__
+
+```js
+async.auto({
+ get_data: function(callback){
+ console.log('in get_data');
+ // async code to get some data
+ callback(null, 'data', 'converted to array');
+ },
+ make_folder: function(callback){
+ console.log('in make_folder');
+ // async code to create a directory to store a file in
+ // this is run at the same time as getting the data
+ callback(null, 'folder');
+ },
+ write_file: ['get_data', 'make_folder', function(callback, results){
+ console.log('in write_file', JSON.stringify(results));
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ callback(null, 'filename');
+ }],
+ email_link: ['write_file', function(callback, results){
+ console.log('in email_link', JSON.stringify(results));
+ // once the file is written let's email a link to it...
+ // results.write_file contains the filename returned by write_file.
+ callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ }]
+}, function(err, results) {
+ console.log('err = ', err);
+ console.log('results = ', results);
+});
+```
+
+This is a fairly trivial example, but to do this using the basic parallel and
+series functions would look like this:
+
+```js
+async.parallel([
+ function(callback){
+ console.log('in get_data');
+ // async code to get some data
+ callback(null, 'data', 'converted to array');
+ },
+ function(callback){
+ console.log('in make_folder');
+ // async code to create a directory to store a file in
+ // this is run at the same time as getting the data
+ callback(null, 'folder');
+ }
+],
+function(err, results){
+ async.series([
+ function(callback){
+ console.log('in write_file', JSON.stringify(results));
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ results.push('filename');
+ callback(null);
+ },
+ function(callback){
+ console.log('in email_link', JSON.stringify(results));
+ // once the file is written let's email a link to it...
+ callback(null, {'file':results.pop(), 'email':'user@example.com'});
+ }
+ ]);
+});
+```
+
+For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding
+new tasks much easier (and the code more readable).
+
+
+---------------------------------------
+
+
+### retry([opts = {times: 5, interval: 0}| 5], task, [callback])
+
+Attempts to get a successful response from `task` no more than `times` times before
+returning an error. If the task is successful, the `callback` will be passed the result
+of the successful task. If all attempts fail, the callback will be passed the error and
+result (if any) of the final attempt.
+
+__Arguments__
+
+* `opts` - Can be either an object with `times` and `interval` or a number.
+ * `times` - The number of attempts to make before giving up. The default is `5`.
+ * `interval` - The time to wait between retries, in milliseconds. The default is `0`.
+ * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`.
+* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
+ which must be called when finished, passing `err` (which can be `null`) and the `result` of
+ the function's execution, and (2) a `results` object, containing the results of
+ the previously executed functions (if nested inside another control flow).
+* `callback(err, results)` - An optional callback which is called when the
+ task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.
+
+The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below:
+
+```js
+// try calling apiMethod 3 times
+async.retry(3, apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
+```js
+// try calling apiMethod 3 times, waiting 200 ms between each retry
+async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
+```js
+// try calling apiMethod the default 5 times no delay between each retry
+async.retry(apiMethod, function(err, result) {
+ // do something with the result
+});
+```
+
+It can also be embedded within other control flow functions to retry individual methods
+that are not as reliable, like this:
+
+```js
+async.auto({
+ users: api.getUsers.bind(api),
+ payments: async.retry(3, api.getPayments.bind(api))
+}, function(err, results) {
+ // do something with the results
+});
+```
+
+
+---------------------------------------
+
+
+### iterator(tasks)
+
+Creates an iterator function which calls the next function in the `tasks` array,
+returning a continuation to call the next one after that. It's also possible to
+“peek” at the next iterator with `iterator.next()`.
+
+This function is used internally by the `async` module, but can be useful when
+you want to manually control the flow of functions in series.
+
+__Arguments__
+
+* `tasks` - An array of functions to run.
+
+__Example__
+
+```js
+var iterator = async.iterator([
+ function(){ sys.p('one'); },
+ function(){ sys.p('two'); },
+ function(){ sys.p('three'); }
+]);
+
+node> var iterator2 = iterator();
+'one'
+node> var iterator3 = iterator2();
+'two'
+node> iterator3();
+'three'
+node> var nextfn = iterator2.next();
+node> nextfn();
+'three'
+```
+
+---------------------------------------
+
+
+### apply(function, arguments..)
+
+Creates a continuation function with some arguments already applied.
+
+Useful as a shorthand when combined with other control flow functions. Any arguments
+passed to the returned function are added to the arguments originally passed
+to apply.
+
+__Arguments__
+
+* `function` - The function you want to eventually apply all arguments to.
+* `arguments...` - Any number of arguments to automatically apply when the
+ continuation is called.
+
+__Example__
+
+```js
+// using apply
+
+async.parallel([
+ async.apply(fs.writeFile, 'testfile1', 'test1'),
+ async.apply(fs.writeFile, 'testfile2', 'test2'),
+]);
+
+
+// the same process without using apply
+
+async.parallel([
+ function(callback){
+ fs.writeFile('testfile1', 'test1', callback);
+ },
+ function(callback){
+ fs.writeFile('testfile2', 'test2', callback);
+ }
+]);
+```
+
+It's possible to pass any number of additional arguments when calling the
+continuation:
+
+```js
+node> var fn = async.apply(sys.puts, 'one');
+node> fn('two', 'three');
+one
+two
+three
+```
+
+---------------------------------------
+
+
+### nextTick(callback), setImmediate(callback)
+
+Calls `callback` on a later loop around the event loop. In Node.js this just
+calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
+if available, otherwise `setTimeout(callback, 0)`, which means other higher priority
+events may precede the execution of `callback`.
+
+This is used internally for browser-compatibility purposes.
+
+__Arguments__
+
+* `callback` - The function to call on a later loop around the event loop.
+
+__Example__
+
+```js
+var call_order = [];
+async.nextTick(function(){
+ call_order.push('two');
+ // call_order now equals ['one','two']
+});
+call_order.push('one')
+```
+
+
+### times(n, iterator, [callback])
+
+Calls the `iterator` function `n` times, and accumulates results in the same manner
+you would use with [`map`](#map).
+
+__Arguments__
+
+* `n` - The number of times to run the function.
+* `iterator` - The function to call `n` times.
+* `callback` - see [`map`](#map)
+
+__Example__
+
+```js
+// Pretend this is some complicated async factory
+var createUser = function(id, callback) {
+ callback(null, {
+ id: 'user' + id
+ })
+}
+// generate 5 users
+async.times(5, function(n, next){
+ createUser(n, function(err, user) {
+ next(err, user)
+ })
+}, function(err, users) {
+ // we should now have 5 users
+});
+```
+
+__Related__
+
+* timesSeries(n, iterator, [callback])
+* timesLimit(n, limit, iterator, [callback])
+
+
+## Utils
+
+
+### memoize(fn, [hasher])
+
+Caches the results of an `async` function. When creating a hash to store function
+results against, the callback is omitted from the hash and an optional hash
+function can be used.
+
+If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function.
+
+The cache of results is exposed as the `memo` property of the function returned
+by `memoize`.
+
+__Arguments__
+
+* `fn` - The function to proxy and cache results from.
+* `hasher` - An optional function for generating a custom hash for storing
+ results. It has all the arguments applied to it apart from the callback, and
+ must be synchronous.
+
+__Example__
+
+```js
+var slow_fn = function (name, callback) {
+ // do something
+ callback(null, result);
+};
+var fn = async.memoize(slow_fn);
+
+// fn can now be used as if it were slow_fn
+fn('some name', function () {
+ // callback
+});
+```
+
+
+### unmemoize(fn)
+
+Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized
+form. Handy for testing.
+
+__Arguments__
+
+* `fn` - the memoized function
+
+---------------------------------------
+
+
+### ensureAsync(fn)
+
+Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained.
+
+__Arguments__
+
+* `fn` - an async function, one that expects a node-style callback as its last argument
+
+Returns a wrapped function with the exact same call signature as the function passed in.
+
+__Example__
+
+```js
+function sometimesAsync(arg, callback) {
+ if (cache[arg]) {
+ return callback(null, cache[arg]); // this would be synchronous!!
+ } else {
+ doSomeIO(arg, callback); // this IO would be asynchronous
+ }
+}
+
+// this has a risk of stack overflows if many results are cached in a row
+async.mapSeries(args, sometimesAsync, done);
+
+// this will defer sometimesAsync's callback if necessary,
+// preventing stack overflows
+async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
+
+```
+
+---------------------------------------
+
+
+### constant(values...)
+
+Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`.
+
+__Example__
+
+```js
+async.waterfall([
+ async.constant(42),
+ function (value, next) {
+ // value === 42
+ },
+ //...
+], callback);
+
+async.waterfall([
+ async.constant(filename, "utf8"),
+ fs.readFile,
+ function (fileData, next) {
+ //...
+ }
+ //...
+], callback);
+
+async.auto({
+ hostname: async.constant("https://server.net/"),
+ port: findFreePort,
+ launchServer: ["hostname", "port", function (cb, options) {
+ startServer(options, cb);
+ }],
+ //...
+}, callback);
+
+```
+
+---------------------------------------
+
+
+
+### asyncify(func)
+
+__Alias:__ `wrapSync`
+
+Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback.
+
+__Example__
+
+```js
+async.waterfall([
+ async.apply(fs.readFile, filename, "utf8"),
+ async.asyncify(JSON.parse),
+ function (data, next) {
+ // data is the result of parsing the text.
+ // If there was a parsing error, it would have been caught.
+ }
+], callback)
+```
+
+If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example:
+
+```js
+async.waterfall([
+ async.apply(fs.readFile, filename, "utf8"),
+ async.asyncify(function (contents) {
+ return db.model.create(contents);
+ }),
+ function (model, next) {
+ // `model` is the instantiated model object.
+ // If there was an error, this function would be skipped.
+ }
+], callback)
+```
+
+This also means you can asyncify ES2016 `async` functions.
+
+```js
+var q = async.queue(async.asyncify(async function (file) {
+ var intermediateStep = await processFile(file);
+ return await somePromise(intermediateStep)
+}));
+
+q.push(files);
+```
+
+---------------------------------------
+
+
+### log(function, arguments)
+
+Logs the result of an `async` function to the `console`. Only works in Node.js or
+in browsers that support `console.log` and `console.error` (such as FF and Chrome).
+If multiple arguments are returned from the async function, `console.log` is
+called on each argument in order.
+
+__Arguments__
+
+* `function` - The function you want to eventually apply all arguments to.
+* `arguments...` - Any number of arguments to apply to the function.
+
+__Example__
+
+```js
+var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, 'hello ' + name);
+ }, 1000);
+};
+```
+```js
+node> async.log(hello, 'world');
+'hello world'
+```
+
+---------------------------------------
+
+
+### dir(function, arguments)
+
+Logs the result of an `async` function to the `console` using `console.dir` to
+display the properties of the resulting object. Only works in Node.js or
+in browsers that support `console.dir` and `console.error` (such as FF and Chrome).
+If multiple arguments are returned from the async function, `console.dir` is
+called on each argument in order.
+
+__Arguments__
+
+* `function` - The function you want to eventually apply all arguments to.
+* `arguments...` - Any number of arguments to apply to the function.
+
+__Example__
+
+```js
+var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, {hello: name});
+ }, 1000);
+};
+```
+```js
+node> async.dir(hello, 'world');
+{hello: 'world'}
+```
+
+---------------------------------------
+
+
+### noConflict()
+
+Changes the value of `async` back to its original value, returning a reference to the
+`async` object.
diff --git a/source/node_modules/async/dist/async.js b/source/node_modules/async/dist/async.js
new file mode 100644
index 000000000..31e7620fb
--- /dev/null
+++ b/source/node_modules/async/dist/async.js
@@ -0,0 +1,1265 @@
+/*!
+ * async
+ * https://github.com/caolan/async
+ *
+ * Copyright 2010-2014 Caolan McMahon
+ * Released under the MIT license
+ */
+(function () {
+
+ var async = {};
+ function noop() {}
+ function identity(v) {
+ return v;
+ }
+ function toBool(v) {
+ return !!v;
+ }
+ function notId(v) {
+ return !v;
+ }
+
+ // global on the server, window in the browser
+ var previous_async;
+
+ // Establish the root object, `window` (`self`) in the browser, `global`
+ // on the server, or `this` in some virtual machines. We use `self`
+ // instead of `window` for `WebWorker` support.
+ var root = typeof self === 'object' && self.self === self && self ||
+ typeof global === 'object' && global.global === global && global ||
+ this;
+
+ if (root != null) {
+ previous_async = root.async;
+ }
+
+ async.noConflict = function () {
+ root.async = previous_async;
+ return async;
+ };
+
+ function only_once(fn) {
+ return function() {
+ if (fn === null) throw new Error("Callback was already called.");
+ fn.apply(this, arguments);
+ fn = null;
+ };
+ }
+
+ function _once(fn) {
+ return function() {
+ if (fn === null) return;
+ fn.apply(this, arguments);
+ fn = null;
+ };
+ }
+
+ //// cross-browser compatiblity functions ////
+
+ var _toString = Object.prototype.toString;
+
+ var _isArray = Array.isArray || function (obj) {
+ return _toString.call(obj) === '[object Array]';
+ };
+
+ // Ported from underscore.js isObject
+ var _isObject = function(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ };
+
+ function _isArrayLike(arr) {
+ return _isArray(arr) || (
+ // has a positive integer length property
+ typeof arr.length === "number" &&
+ arr.length >= 0 &&
+ arr.length % 1 === 0
+ );
+ }
+
+ function _arrayEach(arr, iterator) {
+ var index = -1,
+ length = arr.length;
+
+ while (++index < length) {
+ iterator(arr[index], index, arr);
+ }
+ }
+
+ function _map(arr, iterator) {
+ var index = -1,
+ length = arr.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iterator(arr[index], index, arr);
+ }
+ return result;
+ }
+
+ function _range(count) {
+ return _map(Array(count), function (v, i) { return i; });
+ }
+
+ function _reduce(arr, iterator, memo) {
+ _arrayEach(arr, function (x, i, a) {
+ memo = iterator(memo, x, i, a);
+ });
+ return memo;
+ }
+
+ function _forEachOf(object, iterator) {
+ _arrayEach(_keys(object), function (key) {
+ iterator(object[key], key);
+ });
+ }
+
+ function _indexOf(arr, item) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] === item) return i;
+ }
+ return -1;
+ }
+
+ var _keys = Object.keys || function (obj) {
+ var keys = [];
+ for (var k in obj) {
+ if (obj.hasOwnProperty(k)) {
+ keys.push(k);
+ }
+ }
+ return keys;
+ };
+
+ function _keyIterator(coll) {
+ var i = -1;
+ var len;
+ var keys;
+ if (_isArrayLike(coll)) {
+ len = coll.length;
+ return function next() {
+ i++;
+ return i < len ? i : null;
+ };
+ } else {
+ keys = _keys(coll);
+ len = keys.length;
+ return function next() {
+ i++;
+ return i < len ? keys[i] : null;
+ };
+ }
+ }
+
+ // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
+ // This accumulates the arguments passed into an array, after a given index.
+ // From underscore.js (https://github.com/jashkenas/underscore/pull/2140).
+ function _restParam(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0);
+ var rest = Array(length);
+ for (var index = 0; index < length; index++) {
+ rest[index] = arguments[index + startIndex];
+ }
+ switch (startIndex) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ }
+ // Currently unused but handle cases outside of the switch statement:
+ // var args = Array(startIndex + 1);
+ // for (index = 0; index < startIndex; index++) {
+ // args[index] = arguments[index];
+ // }
+ // args[startIndex] = rest;
+ // return func.apply(this, args);
+ };
+ }
+
+ function _withoutIndex(iterator) {
+ return function (value, index, callback) {
+ return iterator(value, callback);
+ };
+ }
+
+ //// exported async module functions ////
+
+ //// nextTick implementation with browser-compatible fallback ////
+
+ // capture the global reference to guard against fakeTimer mocks
+ var _setImmediate = typeof setImmediate === 'function' && setImmediate;
+
+ var _delay = _setImmediate ? function(fn) {
+ // not a direct alias for IE10 compatibility
+ _setImmediate(fn);
+ } : function(fn) {
+ setTimeout(fn, 0);
+ };
+
+ if (typeof process === 'object' && typeof process.nextTick === 'function') {
+ async.nextTick = process.nextTick;
+ } else {
+ async.nextTick = _delay;
+ }
+ async.setImmediate = _setImmediate ? _delay : async.nextTick;
+
+
+ async.forEach =
+ async.each = function (arr, iterator, callback) {
+ return async.eachOf(arr, _withoutIndex(iterator), callback);
+ };
+
+ async.forEachSeries =
+ async.eachSeries = function (arr, iterator, callback) {
+ return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
+ };
+
+
+ async.forEachLimit =
+ async.eachLimit = function (arr, limit, iterator, callback) {
+ return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
+ };
+
+ async.forEachOf =
+ async.eachOf = function (object, iterator, callback) {
+ callback = _once(callback || noop);
+ object = object || [];
+
+ var iter = _keyIterator(object);
+ var key, completed = 0;
+
+ while ((key = iter()) != null) {
+ completed += 1;
+ iterator(object[key], key, only_once(done));
+ }
+
+ if (completed === 0) callback(null);
+
+ function done(err) {
+ completed--;
+ if (err) {
+ callback(err);
+ }
+ // Check key is null in case iterator isn't exhausted
+ // and done resolved synchronously.
+ else if (key === null && completed <= 0) {
+ callback(null);
+ }
+ }
+ };
+
+ async.forEachOfSeries =
+ async.eachOfSeries = function (obj, iterator, callback) {
+ callback = _once(callback || noop);
+ obj = obj || [];
+ var nextKey = _keyIterator(obj);
+ var key = nextKey();
+ function iterate() {
+ var sync = true;
+ if (key === null) {
+ return callback(null);
+ }
+ iterator(obj[key], key, only_once(function (err) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ key = nextKey();
+ if (key === null) {
+ return callback(null);
+ } else {
+ if (sync) {
+ async.setImmediate(iterate);
+ } else {
+ iterate();
+ }
+ }
+ }
+ }));
+ sync = false;
+ }
+ iterate();
+ };
+
+
+
+ async.forEachOfLimit =
+ async.eachOfLimit = function (obj, limit, iterator, callback) {
+ _eachOfLimit(limit)(obj, iterator, callback);
+ };
+
+ function _eachOfLimit(limit) {
+
+ return function (obj, iterator, callback) {
+ callback = _once(callback || noop);
+ obj = obj || [];
+ var nextKey = _keyIterator(obj);
+ if (limit <= 0) {
+ return callback(null);
+ }
+ var done = false;
+ var running = 0;
+ var errored = false;
+
+ (function replenish () {
+ if (done && running <= 0) {
+ return callback(null);
+ }
+
+ while (running < limit && !errored) {
+ var key = nextKey();
+ if (key === null) {
+ done = true;
+ if (running <= 0) {
+ callback(null);
+ }
+ return;
+ }
+ running += 1;
+ iterator(obj[key], key, only_once(function (err) {
+ running -= 1;
+ if (err) {
+ callback(err);
+ errored = true;
+ }
+ else {
+ replenish();
+ }
+ }));
+ }
+ })();
+ };
+ }
+
+
+ function doParallel(fn) {
+ return function (obj, iterator, callback) {
+ return fn(async.eachOf, obj, iterator, callback);
+ };
+ }
+ function doParallelLimit(fn) {
+ return function (obj, limit, iterator, callback) {
+ return fn(_eachOfLimit(limit), obj, iterator, callback);
+ };
+ }
+ function doSeries(fn) {
+ return function (obj, iterator, callback) {
+ return fn(async.eachOfSeries, obj, iterator, callback);
+ };
+ }
+
+ function _asyncMap(eachfn, arr, iterator, callback) {
+ callback = _once(callback || noop);
+ arr = arr || [];
+ var results = _isArrayLike(arr) ? [] : {};
+ eachfn(arr, function (value, index, callback) {
+ iterator(value, function (err, v) {
+ results[index] = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+
+ async.map = doParallel(_asyncMap);
+ async.mapSeries = doSeries(_asyncMap);
+ async.mapLimit = doParallelLimit(_asyncMap);
+
+ // reduce only has a series version, as doing reduce in parallel won't
+ // work in many situations.
+ async.inject =
+ async.foldl =
+ async.reduce = function (arr, memo, iterator, callback) {
+ async.eachOfSeries(arr, function (x, i, callback) {
+ iterator(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+ };
+
+ async.foldr =
+ async.reduceRight = function (arr, memo, iterator, callback) {
+ var reversed = _map(arr, identity).reverse();
+ async.reduce(reversed, memo, iterator, callback);
+ };
+
+ async.transform = function (arr, memo, iterator, callback) {
+ if (arguments.length === 3) {
+ callback = iterator;
+ iterator = memo;
+ memo = _isArray(arr) ? [] : {};
+ }
+
+ async.eachOf(arr, function(v, k, cb) {
+ iterator(memo, v, k, cb);
+ }, function(err) {
+ callback(err, memo);
+ });
+ };
+
+ function _filter(eachfn, arr, iterator, callback) {
+ var results = [];
+ eachfn(arr, function (x, index, callback) {
+ iterator(x, function (v) {
+ if (v) {
+ results.push({index: index, value: x});
+ }
+ callback();
+ });
+ }, function () {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ }
+
+ async.select =
+ async.filter = doParallel(_filter);
+
+ async.selectLimit =
+ async.filterLimit = doParallelLimit(_filter);
+
+ async.selectSeries =
+ async.filterSeries = doSeries(_filter);
+
+ function _reject(eachfn, arr, iterator, callback) {
+ _filter(eachfn, arr, function(value, cb) {
+ iterator(value, function(v) {
+ cb(!v);
+ });
+ }, callback);
+ }
+ async.reject = doParallel(_reject);
+ async.rejectLimit = doParallelLimit(_reject);
+ async.rejectSeries = doSeries(_reject);
+
+ function _createTester(eachfn, check, getResult) {
+ return function(arr, limit, iterator, cb) {
+ function done() {
+ if (cb) cb(getResult(false, void 0));
+ }
+ function iteratee(x, _, callback) {
+ if (!cb) return callback();
+ iterator(x, function (v) {
+ if (cb && check(v)) {
+ cb(getResult(true, x));
+ cb = iterator = false;
+ }
+ callback();
+ });
+ }
+ if (arguments.length > 3) {
+ eachfn(arr, limit, iteratee, done);
+ } else {
+ cb = iterator;
+ iterator = limit;
+ eachfn(arr, iteratee, done);
+ }
+ };
+ }
+
+ async.any =
+ async.some = _createTester(async.eachOf, toBool, identity);
+
+ async.someLimit = _createTester(async.eachOfLimit, toBool, identity);
+
+ async.all =
+ async.every = _createTester(async.eachOf, notId, notId);
+
+ async.everyLimit = _createTester(async.eachOfLimit, notId, notId);
+
+ function _findGetResult(v, x) {
+ return x;
+ }
+ async.detect = _createTester(async.eachOf, identity, _findGetResult);
+ async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
+ async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);
+
+ async.sortBy = function (arr, iterator, callback) {
+ async.map(arr, function (x, callback) {
+ iterator(x, function (err, criteria) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ callback(null, {value: x, criteria: criteria});
+ }
+ });
+ }, function (err, results) {
+ if (err) {
+ return callback(err);
+ }
+ else {
+ callback(null, _map(results.sort(comparator), function (x) {
+ return x.value;
+ }));
+ }
+
+ });
+
+ function comparator(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }
+ };
+
+ async.auto = function (tasks, concurrency, callback) {
+ if (typeof arguments[1] === 'function') {
+ // concurrency is optional, shift the args.
+ callback = concurrency;
+ concurrency = null;
+ }
+ callback = _once(callback || noop);
+ var keys = _keys(tasks);
+ var remainingTasks = keys.length;
+ if (!remainingTasks) {
+ return callback(null);
+ }
+ if (!concurrency) {
+ concurrency = remainingTasks;
+ }
+
+ var results = {};
+ var runningTasks = 0;
+
+ var hasError = false;
+
+ var listeners = [];
+ function addListener(fn) {
+ listeners.unshift(fn);
+ }
+ function removeListener(fn) {
+ var idx = _indexOf(listeners, fn);
+ if (idx >= 0) listeners.splice(idx, 1);
+ }
+ function taskComplete() {
+ remainingTasks--;
+ _arrayEach(listeners.slice(0), function (fn) {
+ fn();
+ });
+ }
+
+ addListener(function () {
+ if (!remainingTasks) {
+ callback(null, results);
+ }
+ });
+
+ _arrayEach(keys, function (k) {
+ if (hasError) return;
+ var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
+ var taskCallback = _restParam(function(err, args) {
+ runningTasks--;
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ _forEachOf(results, function(val, rkey) {
+ safeResults[rkey] = val;
+ });
+ safeResults[k] = args;
+ hasError = true;
+
+ callback(err, safeResults);
+ }
+ else {
+ results[k] = args;
+ async.setImmediate(taskComplete);
+ }
+ });
+ var requires = task.slice(0, task.length - 1);
+ // prevent dead-locks
+ var len = requires.length;
+ var dep;
+ while (len--) {
+ if (!(dep = tasks[requires[len]])) {
+ throw new Error('Has nonexistent dependency in ' + requires.join(', '));
+ }
+ if (_isArray(dep) && _indexOf(dep, k) >= 0) {
+ throw new Error('Has cyclic dependencies');
+ }
+ }
+ function ready() {
+ return runningTasks < concurrency && _reduce(requires, function (a, x) {
+ return (a && results.hasOwnProperty(x));
+ }, true) && !results.hasOwnProperty(k);
+ }
+ if (ready()) {
+ runningTasks++;
+ task[task.length - 1](taskCallback, results);
+ }
+ else {
+ addListener(listener);
+ }
+ function listener() {
+ if (ready()) {
+ runningTasks++;
+ removeListener(listener);
+ task[task.length - 1](taskCallback, results);
+ }
+ }
+ });
+ };
+
+
+
+ async.retry = function(times, task, callback) {
+ var DEFAULT_TIMES = 5;
+ var DEFAULT_INTERVAL = 0;
+
+ var attempts = [];
+
+ var opts = {
+ times: DEFAULT_TIMES,
+ interval: DEFAULT_INTERVAL
+ };
+
+ function parseTimes(acc, t){
+ if(typeof t === 'number'){
+ acc.times = parseInt(t, 10) || DEFAULT_TIMES;
+ } else if(typeof t === 'object'){
+ acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
+ acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
+ } else {
+ throw new Error('Unsupported argument type for \'times\': ' + typeof t);
+ }
+ }
+
+ var length = arguments.length;
+ if (length < 1 || length > 3) {
+ throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)');
+ } else if (length <= 2 && typeof times === 'function') {
+ callback = task;
+ task = times;
+ }
+ if (typeof times !== 'function') {
+ parseTimes(opts, times);
+ }
+ opts.callback = callback;
+ opts.task = task;
+
+ function wrappedTask(wrappedCallback, wrappedResults) {
+ function retryAttempt(task, finalAttempt) {
+ return function(seriesCallback) {
+ task(function(err, result){
+ seriesCallback(!err || finalAttempt, {err: err, result: result});
+ }, wrappedResults);
+ };
+ }
+
+ function retryInterval(interval){
+ return function(seriesCallback){
+ setTimeout(function(){
+ seriesCallback(null);
+ }, interval);
+ };
+ }
+
+ while (opts.times) {
+
+ var finalAttempt = !(opts.times-=1);
+ attempts.push(retryAttempt(opts.task, finalAttempt));
+ if(!finalAttempt && opts.interval > 0){
+ attempts.push(retryInterval(opts.interval));
+ }
+ }
+
+ async.series(attempts, function(done, data){
+ data = data[data.length - 1];
+ (wrappedCallback || opts.callback)(data.err, data.result);
+ });
+ }
+
+ // If a callback is passed, run this as a controll flow
+ return opts.callback ? wrappedTask() : wrappedTask;
+ };
+
+ async.waterfall = function (tasks, callback) {
+ callback = _once(callback || noop);
+ if (!_isArray(tasks)) {
+ var err = new Error('First argument to waterfall must be an array of functions');
+ return callback(err);
+ }
+ if (!tasks.length) {
+ return callback();
+ }
+ function wrapIterator(iterator) {
+ return _restParam(function (err, args) {
+ if (err) {
+ callback.apply(null, [err].concat(args));
+ }
+ else {
+ var next = iterator.next();
+ if (next) {
+ args.push(wrapIterator(next));
+ }
+ else {
+ args.push(callback);
+ }
+ ensureAsync(iterator).apply(null, args);
+ }
+ });
+ }
+ wrapIterator(async.iterator(tasks))();
+ };
+
+ function _parallel(eachfn, tasks, callback) {
+ callback = callback || noop;
+ var results = _isArrayLike(tasks) ? [] : {};
+
+ eachfn(tasks, function (task, key, callback) {
+ task(_restParam(function (err, args) {
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[key] = args;
+ callback(err);
+ }));
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+
+ async.parallel = function (tasks, callback) {
+ _parallel(async.eachOf, tasks, callback);
+ };
+
+ async.parallelLimit = function(tasks, limit, callback) {
+ _parallel(_eachOfLimit(limit), tasks, callback);
+ };
+
+ async.series = function(tasks, callback) {
+ _parallel(async.eachOfSeries, tasks, callback);
+ };
+
+ async.iterator = function (tasks) {
+ function makeCallback(index) {
+ function fn() {
+ if (tasks.length) {
+ tasks[index].apply(null, arguments);
+ }
+ return fn.next();
+ }
+ fn.next = function () {
+ return (index < tasks.length - 1) ? makeCallback(index + 1): null;
+ };
+ return fn;
+ }
+ return makeCallback(0);
+ };
+
+ async.apply = _restParam(function (fn, args) {
+ return _restParam(function (callArgs) {
+ return fn.apply(
+ null, args.concat(callArgs)
+ );
+ });
+ });
+
+ function _concat(eachfn, arr, fn, callback) {
+ var result = [];
+ eachfn(arr, function (x, index, cb) {
+ fn(x, function (err, y) {
+ result = result.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, result);
+ });
+ }
+ async.concat = doParallel(_concat);
+ async.concatSeries = doSeries(_concat);
+
+ async.whilst = function (test, iterator, callback) {
+ callback = callback || noop;
+ if (test()) {
+ var next = _restParam(function(err, args) {
+ if (err) {
+ callback(err);
+ } else if (test.apply(this, args)) {
+ iterator(next);
+ } else {
+ callback.apply(null, [null].concat(args));
+ }
+ });
+ iterator(next);
+ } else {
+ callback(null);
+ }
+ };
+
+ async.doWhilst = function (iterator, test, callback) {
+ var calls = 0;
+ return async.whilst(function() {
+ return ++calls <= 1 || test.apply(this, arguments);
+ }, iterator, callback);
+ };
+
+ async.until = function (test, iterator, callback) {
+ return async.whilst(function() {
+ return !test.apply(this, arguments);
+ }, iterator, callback);
+ };
+
+ async.doUntil = function (iterator, test, callback) {
+ return async.doWhilst(iterator, function() {
+ return !test.apply(this, arguments);
+ }, callback);
+ };
+
+ async.during = function (test, iterator, callback) {
+ callback = callback || noop;
+
+ var next = _restParam(function(err, args) {
+ if (err) {
+ callback(err);
+ } else {
+ args.push(check);
+ test.apply(this, args);
+ }
+ });
+
+ var check = function(err, truth) {
+ if (err) {
+ callback(err);
+ } else if (truth) {
+ iterator(next);
+ } else {
+ callback(null);
+ }
+ };
+
+ test(check);
+ };
+
+ async.doDuring = function (iterator, test, callback) {
+ var calls = 0;
+ async.during(function(next) {
+ if (calls++ < 1) {
+ next(null, true);
+ } else {
+ test.apply(this, arguments);
+ }
+ }, iterator, callback);
+ };
+
+ function _queue(worker, concurrency, payload) {
+ if (concurrency == null) {
+ concurrency = 1;
+ }
+ else if(concurrency === 0) {
+ throw new Error('Concurrency must not be zero');
+ }
+ function _insert(q, data, pos, callback) {
+ if (callback != null && typeof callback !== "function") {
+ throw new Error("task callback must be a function");
+ }
+ q.started = true;
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ q.drain();
+ });
+ }
+ _arrayEach(data, function(task) {
+ var item = {
+ data: task,
+ callback: callback || noop
+ };
+
+ if (pos) {
+ q.tasks.unshift(item);
+ } else {
+ q.tasks.push(item);
+ }
+
+ if (q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ });
+ async.setImmediate(q.process);
+ }
+ function _next(q, tasks) {
+ return function(){
+ workers -= 1;
+
+ var removed = false;
+ var args = arguments;
+ _arrayEach(tasks, function (task) {
+ _arrayEach(workersList, function (worker, index) {
+ if (worker === task && !removed) {
+ workersList.splice(index, 1);
+ removed = true;
+ }
+ });
+
+ task.callback.apply(task, args);
+ });
+ if (q.tasks.length + workers === 0) {
+ q.drain();
+ }
+ q.process();
+ };
+ }
+
+ var workers = 0;
+ var workersList = [];
+ var q = {
+ tasks: [],
+ concurrency: concurrency,
+ payload: payload,
+ saturated: noop,
+ empty: noop,
+ drain: noop,
+ started: false,
+ paused: false,
+ push: function (data, callback) {
+ _insert(q, data, false, callback);
+ },
+ kill: function () {
+ q.drain = noop;
+ q.tasks = [];
+ },
+ unshift: function (data, callback) {
+ _insert(q, data, true, callback);
+ },
+ process: function () {
+ while(!q.paused && workers < q.concurrency && q.tasks.length){
+
+ var tasks = q.payload ?
+ q.tasks.splice(0, q.payload) :
+ q.tasks.splice(0, q.tasks.length);
+
+ var data = _map(tasks, function (task) {
+ return task.data;
+ });
+
+ if (q.tasks.length === 0) {
+ q.empty();
+ }
+ workers += 1;
+ workersList.push(tasks[0]);
+ var cb = only_once(_next(q, tasks));
+ worker(data, cb);
+ }
+ },
+ length: function () {
+ return q.tasks.length;
+ },
+ running: function () {
+ return workers;
+ },
+ workersList: function () {
+ return workersList;
+ },
+ idle: function() {
+ return q.tasks.length + workers === 0;
+ },
+ pause: function () {
+ q.paused = true;
+ },
+ resume: function () {
+ if (q.paused === false) { return; }
+ q.paused = false;
+ var resumeCount = Math.min(q.concurrency, q.tasks.length);
+ // Need to call q.process once per concurrent
+ // worker to preserve full concurrency after pause
+ for (var w = 1; w <= resumeCount; w++) {
+ async.setImmediate(q.process);
+ }
+ }
+ };
+ return q;
+ }
+
+ async.queue = function (worker, concurrency) {
+ var q = _queue(function (items, cb) {
+ worker(items[0], cb);
+ }, concurrency, 1);
+
+ return q;
+ };
+
+ async.priorityQueue = function (worker, concurrency) {
+
+ function _compareTasks(a, b){
+ return a.priority - b.priority;
+ }
+
+ function _binarySearch(sequence, item, compare) {
+ var beg = -1,
+ end = sequence.length - 1;
+ while (beg < end) {
+ var mid = beg + ((end - beg + 1) >>> 1);
+ if (compare(item, sequence[mid]) >= 0) {
+ beg = mid;
+ } else {
+ end = mid - 1;
+ }
+ }
+ return beg;
+ }
+
+ function _insert(q, data, priority, callback) {
+ if (callback != null && typeof callback !== "function") {
+ throw new Error("task callback must be a function");
+ }
+ q.started = true;
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length === 0) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ q.drain();
+ });
+ }
+ _arrayEach(data, function(task) {
+ var item = {
+ data: task,
+ priority: priority,
+ callback: typeof callback === 'function' ? callback : noop
+ };
+
+ q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
+
+ if (q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
+ }
+
+ // Start with a normal queue
+ var q = async.queue(worker, concurrency);
+
+ // Override push to accept second parameter representing priority
+ q.push = function (data, priority, callback) {
+ _insert(q, data, priority, callback);
+ };
+
+ // Remove unshift function
+ delete q.unshift;
+
+ return q;
+ };
+
+ async.cargo = function (worker, payload) {
+ return _queue(worker, 1, payload);
+ };
+
+ function _console_fn(name) {
+ return _restParam(function (fn, args) {
+ fn.apply(null, args.concat([_restParam(function (err, args) {
+ if (typeof console === 'object') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ }
+ else if (console[name]) {
+ _arrayEach(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ })]));
+ });
+ }
+ async.log = _console_fn('log');
+ async.dir = _console_fn('dir');
+ /*async.info = _console_fn('info');
+ async.warn = _console_fn('warn');
+ async.error = _console_fn('error');*/
+
+ async.memoize = function (fn, hasher) {
+ var memo = {};
+ var queues = {};
+ var has = Object.prototype.hasOwnProperty;
+ hasher = hasher || identity;
+ var memoized = _restParam(function memoized(args) {
+ var callback = args.pop();
+ var key = hasher.apply(null, args);
+ if (has.call(memo, key)) {
+ async.setImmediate(function () {
+ callback.apply(null, memo[key]);
+ });
+ }
+ else if (has.call(queues, key)) {
+ queues[key].push(callback);
+ }
+ else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([_restParam(function (args) {
+ memo[key] = args;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, args);
+ }
+ })]));
+ }
+ });
+ memoized.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+ };
+
+ async.unmemoize = function (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+ };
+
+ function _times(mapper) {
+ return function (count, iterator, callback) {
+ mapper(_range(count), iterator, callback);
+ };
+ }
+
+ async.times = _times(async.map);
+ async.timesSeries = _times(async.mapSeries);
+ async.timesLimit = function (count, limit, iterator, callback) {
+ return async.mapLimit(_range(count), limit, iterator, callback);
+ };
+
+ async.seq = function (/* functions... */) {
+ var fns = arguments;
+ return _restParam(function (args) {
+ var that = this;
+
+ var callback = args[args.length - 1];
+ if (typeof callback == 'function') {
+ args.pop();
+ } else {
+ callback = noop;
+ }
+
+ async.reduce(fns, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([_restParam(function (err, nextargs) {
+ cb(err, nextargs);
+ })]));
+ },
+ function (err, results) {
+ callback.apply(that, [err].concat(results));
+ });
+ });
+ };
+
+ async.compose = function (/* functions... */) {
+ return async.seq.apply(null, Array.prototype.reverse.call(arguments));
+ };
+
+
+ function _applyEach(eachfn) {
+ return _restParam(function(fns, args) {
+ var go = _restParam(function(args) {
+ var that = this;
+ var callback = args.pop();
+ return eachfn(fns, function (fn, _, cb) {
+ fn.apply(that, args.concat([cb]));
+ },
+ callback);
+ });
+ if (args.length) {
+ return go.apply(this, args);
+ }
+ else {
+ return go;
+ }
+ });
+ }
+
+ async.applyEach = _applyEach(async.eachOf);
+ async.applyEachSeries = _applyEach(async.eachOfSeries);
+
+
+ async.forever = function (fn, callback) {
+ var done = only_once(callback || noop);
+ var task = ensureAsync(fn);
+ function next(err) {
+ if (err) {
+ return done(err);
+ }
+ task(next);
+ }
+ next();
+ };
+
+ function ensureAsync(fn) {
+ return _restParam(function (args) {
+ var callback = args.pop();
+ args.push(function () {
+ var innerArgs = arguments;
+ if (sync) {
+ async.setImmediate(function () {
+ callback.apply(null, innerArgs);
+ });
+ } else {
+ callback.apply(null, innerArgs);
+ }
+ });
+ var sync = true;
+ fn.apply(this, args);
+ sync = false;
+ });
+ }
+
+ async.ensureAsync = ensureAsync;
+
+ async.constant = _restParam(function(values) {
+ var args = [null].concat(values);
+ return function (callback) {
+ return callback.apply(this, args);
+ };
+ });
+
+ async.wrapSync =
+ async.asyncify = function asyncify(func) {
+ return _restParam(function (args) {
+ var callback = args.pop();
+ var result;
+ try {
+ result = func.apply(this, args);
+ } catch (e) {
+ return callback(e);
+ }
+ // if result is Promise object
+ if (_isObject(result) && typeof result.then === "function") {
+ result.then(function(value) {
+ callback(null, value);
+ })["catch"](function(err) {
+ callback(err.message ? err : new Error(err));
+ });
+ } else {
+ callback(null, result);
+ }
+ });
+ };
+
+ // Node.js
+ if (typeof module === 'object' && module.exports) {
+ module.exports = async;
+ }
+ // AMD / RequireJS
+ else if (typeof define === 'function' && define.amd) {
+ define([], function () {
+ return async;
+ });
+ }
+ // included directly via
+
+
diff --git a/source/node_modules/clone/test.html b/source/node_modules/clone/test.html
new file mode 100644
index 000000000..a95570251
--- /dev/null
+++ b/source/node_modules/clone/test.html
@@ -0,0 +1,148 @@
+
+
+
+
+ Clone Test-Suite (Browser)
+
+
+
+
+
+
+ Tests started: ;
+ Tests finished: .
+
+
+
+
diff --git a/source/node_modules/clone/test.js b/source/node_modules/clone/test.js
new file mode 100644
index 000000000..e8b65b3fe
--- /dev/null
+++ b/source/node_modules/clone/test.js
@@ -0,0 +1,372 @@
+var clone = require('./');
+
+function inspect(obj) {
+ seen = [];
+ return JSON.stringify(obj, function (key, val) {
+ if (val != null && typeof val == "object") {
+ if (seen.indexOf(val) >= 0) {
+ return '[cyclic]';
+ }
+
+ seen.push(val);
+ }
+
+ return val;
+ });
+}
+
+// Creates a new VM in node, or an iframe in a browser in order to run the
+// script
+function apartContext(context, script, callback) {
+ var vm = require('vm');
+
+ if (vm) {
+ var ctx = vm.createContext({ ctx: context });
+ callback(vm.runInContext(script, ctx));
+ } else if (document && document.createElement) {
+ var iframe = document.createElement('iframe');
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+
+ var myCtxId = 'tmpCtx' + Math.random();
+
+ window[myCtxId] = context;
+ iframe.src = 'test-apart-ctx.html?' + myCtxId + '&' + encodeURIComponent(script);
+ iframe.onload = function() {
+ try {
+ callback(iframe.contentWindow.results);
+ } catch (e) {
+ throw e;
+ }
+ };
+ } else {
+ console.log('WARNING: cannot create an apart context.');
+ }
+}
+
+exports["clone string"] = function (test) {
+ test.expect(2); // how many tests?
+
+ var a = "foo";
+ test.strictEqual(clone(a), a);
+ a = "";
+ test.strictEqual(clone(a), a);
+
+ test.done();
+};
+
+exports["clone number"] = function (test) {
+ test.expect(5); // how many tests?
+
+ var a = 0;
+ test.strictEqual(clone(a), a);
+ a = 1;
+ test.strictEqual(clone(a), a);
+ a = -1000;
+ test.strictEqual(clone(a), a);
+ a = 3.1415927;
+ test.strictEqual(clone(a), a);
+ a = -3.1415927;
+ test.strictEqual(clone(a), a);
+
+ test.done();
+};
+
+exports["clone date"] = function (test) {
+ test.expect(3); // how many tests?
+
+ var a = new Date;
+ var c = clone(a);
+ test.ok(!!a.getUTCDate && !!a.toUTCString);
+ test.ok(!!c.getUTCDate && !!c.toUTCString);
+ test.equal(a.getTime(), c.getTime());
+
+ test.done();
+};
+
+exports["clone object"] = function (test) {
+ test.expect(1); // how many tests?
+
+ var a = { foo: { bar: "baz" } };
+ var b = clone(a);
+
+ test.deepEqual(b, a);
+
+ test.done();
+};
+
+exports["clone array"] = function (test) {
+ test.expect(2); // how many tests?
+
+ var a = [
+ { foo: "bar" },
+ "baz"
+ ];
+ var b = clone(a);
+
+ test.ok(b instanceof Array);
+ test.deepEqual(b, a);
+
+ test.done();
+};
+
+exports["clone buffer"] = function (test) {
+ if (typeof Buffer == 'undefined') {
+ return test.done();
+ }
+
+ test.expect(1);
+
+ var a = new Buffer("this is a test buffer");
+ var b = clone(a);
+
+ // no underscore equal since it has no concept of Buffers
+ test.deepEqual(b, a);
+ test.done();
+};
+
+exports["clone regexp"] = function (test) {
+ test.expect(5);
+
+ var a = /abc123/gi;
+ var b = clone(a);
+ test.deepEqual(b, a);
+
+ var c = /a/g;
+ test.ok(c.lastIndex === 0);
+
+ c.exec('123a456a');
+ test.ok(c.lastIndex === 4);
+
+ var d = clone(c);
+ test.ok(d.global);
+ test.ok(d.lastIndex === 4);
+
+ test.done();
+};
+
+exports["clone object containing array"] = function (test) {
+ test.expect(1); // how many tests?
+
+ var a = {
+ arr1: [ { a: '1234', b: '2345' } ],
+ arr2: [ { c: '345', d: '456' } ]
+ };
+
+ var b = clone(a);
+
+ test.deepEqual(b, a);
+
+ test.done();
+};
+
+exports["clone object with circular reference"] = function (test) {
+ test.expect(8); // how many tests?
+
+ var c = [1, "foo", {'hello': 'bar'}, function () {}, false, [2]];
+ var b = [c, 2, 3, 4];
+
+ var a = {'b': b, 'c': c};
+ a.loop = a;
+ a.loop2 = a;
+ c.loop = c;
+ c.aloop = a;
+
+ var aCopy = clone(a);
+ test.ok(a != aCopy);
+ test.ok(a.c != aCopy.c);
+ test.ok(aCopy.c == aCopy.b[0]);
+ test.ok(aCopy.c.loop.loop.aloop == aCopy);
+ test.ok(aCopy.c[0] == a.c[0]);
+
+ test.ok(eq(a, aCopy));
+ aCopy.c[0] = 2;
+ test.ok(!eq(a, aCopy));
+ aCopy.c = "2";
+ test.ok(!eq(a, aCopy));
+
+ function eq(x, y) {
+ return inspect(x) === inspect(y);
+ }
+
+ test.done();
+};
+
+exports['clone prototype'] = function (test) {
+ test.expect(3); // how many tests?
+
+ var a = {
+ a: "aaa",
+ x: 123,
+ y: 45.65
+ };
+ var b = clone.clonePrototype(a);
+
+ test.strictEqual(b.a, a.a);
+ test.strictEqual(b.x, a.x);
+ test.strictEqual(b.y, a.y);
+
+ test.done();
+};
+
+exports['clone within an apart context'] = function (test) {
+ var results = apartContext({ clone: clone },
+ "results = ctx.clone({ a: [1, 2, 3], d: new Date(), r: /^foo$/ig })",
+ function (results) {
+ test.ok(results.a.constructor.toString() === Array.toString());
+ test.ok(results.d.constructor.toString() === Date.toString());
+ test.ok(results.r.constructor.toString() === RegExp.toString());
+ test.done();
+ });
+};
+
+exports['clone object with no constructor'] = function (test) {
+ test.expect(3);
+
+ var n = null;
+
+ var a = { foo: 'bar' };
+ a.__proto__ = n;
+ test.ok(typeof a === 'object');
+ test.ok(typeof a !== null);
+
+ var b = clone(a);
+ test.ok(a.foo, b.foo);
+
+ test.done();
+};
+
+exports['clone object with depth argument'] = function (test) {
+ test.expect(6);
+
+ var a = {
+ foo: {
+ bar : {
+ baz : 'qux'
+ }
+ }
+ };
+
+ var b = clone(a, false, 1);
+ test.deepEqual(b, a);
+ test.notEqual(b, a);
+ test.strictEqual(b.foo, a.foo);
+
+ b = clone(a, true, 2);
+ test.deepEqual(b, a);
+ test.notEqual(b.foo, a.foo);
+ test.strictEqual(b.foo.bar, a.foo.bar);
+
+ test.done();
+};
+
+exports['maintain prototype chain in clones'] = function (test) {
+ test.expect(1);
+
+ function T() {}
+
+ var a = new T();
+ var b = clone(a);
+ test.strictEqual(Object.getPrototypeOf(a), Object.getPrototypeOf(b));
+
+ test.done();
+};
+
+exports['parent prototype is overriden with prototype provided'] = function (test) {
+ test.expect(1);
+
+ function T() {}
+
+ var a = new T();
+ var b = clone(a, true, Infinity, null);
+ test.strictEqual(b.__defineSetter__, undefined);
+
+ test.done();
+};
+
+exports['clone object with null children'] = function (test) {
+ test.expect(1);
+ var a = {
+ foo: {
+ bar: null,
+ baz: {
+ qux: false
+ }
+ }
+ };
+
+ var b = clone(a);
+
+ test.deepEqual(b, a);
+ test.done();
+};
+
+exports['clone instance with getter'] = function (test) {
+ test.expect(1);
+ function Ctor() {};
+ Object.defineProperty(Ctor.prototype, 'prop', {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ return 'value';
+ }
+ });
+
+ var a = new Ctor();
+ var b = clone(a);
+
+ test.strictEqual(b.prop, 'value');
+ test.done();
+};
+
+exports['get RegExp flags'] = function (test) {
+ test.strictEqual(clone.__getRegExpFlags(/a/), '' );
+ test.strictEqual(clone.__getRegExpFlags(/a/i), 'i' );
+ test.strictEqual(clone.__getRegExpFlags(/a/g), 'g' );
+ test.strictEqual(clone.__getRegExpFlags(/a/gi), 'gi');
+ test.strictEqual(clone.__getRegExpFlags(/a/m), 'm' );
+
+ test.done();
+};
+
+exports["recognize Array object"] = function (test) {
+ var results = apartContext(null, "results = [1, 2, 3]", function(alien) {
+ var local = [4, 5, 6];
+ test.ok(clone.__isArray(alien)); // recognize in other context.
+ test.ok(clone.__isArray(local)); // recognize in local context.
+ test.ok(!clone.__isDate(alien));
+ test.ok(!clone.__isDate(local));
+ test.ok(!clone.__isRegExp(alien));
+ test.ok(!clone.__isRegExp(local));
+ test.done();
+ });
+};
+
+exports["recognize Date object"] = function (test) {
+ var results = apartContext(null, "results = new Date()", function(alien) {
+ var local = new Date();
+
+ test.ok(clone.__isDate(alien)); // recognize in other context.
+ test.ok(clone.__isDate(local)); // recognize in local context.
+ test.ok(!clone.__isArray(alien));
+ test.ok(!clone.__isArray(local));
+ test.ok(!clone.__isRegExp(alien));
+ test.ok(!clone.__isRegExp(local));
+
+ test.done();
+ });
+};
+
+exports["recognize RegExp object"] = function (test) {
+ var results = apartContext(null, "results = /foo/", function(alien) {
+ var local = /bar/;
+
+ test.ok(clone.__isRegExp(alien)); // recognize in other context.
+ test.ok(clone.__isRegExp(local)); // recognize in local context.
+ test.ok(!clone.__isArray(alien));
+ test.ok(!clone.__isArray(local));
+ test.ok(!clone.__isDate(alien));
+ test.ok(!clone.__isDate(local));
+ test.done();
+ });
+};
diff --git a/source/node_modules/code-point-at/index.js b/source/node_modules/code-point-at/index.js
new file mode 100644
index 000000000..033511797
--- /dev/null
+++ b/source/node_modules/code-point-at/index.js
@@ -0,0 +1,33 @@
+'use strict';
+var numberIsNan = require('number-is-nan');
+
+module.exports = function (str, pos) {
+ if (str === null || str === undefined) {
+ throw TypeError();
+ }
+
+ str = String(str);
+
+ var size = str.length;
+ var i = pos ? Number(pos) : 0;
+
+ if (numberIsNan(i)) {
+ i = 0;
+ }
+
+ if (i < 0 || i >= size) {
+ return undefined;
+ }
+
+ var first = str.charCodeAt(i);
+
+ if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) {
+ var second = str.charCodeAt(i + 1);
+
+ if (second >= 0xDC00 && second <= 0xDFFF) {
+ return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ }
+ }
+
+ return first;
+};
diff --git a/source/node_modules/code-point-at/license b/source/node_modules/code-point-at/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/source/node_modules/code-point-at/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/code-point-at/package.json b/source/node_modules/code-point-at/package.json
new file mode 100644
index 000000000..ff3f9580d
--- /dev/null
+++ b/source/node_modules/code-point-at/package.json
@@ -0,0 +1,96 @@
+{
+ "_args": [
+ [
+ "code-point-at@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/string-width"
+ ]
+ ],
+ "_from": "code-point-at@>=1.0.0 <2.0.0",
+ "_id": "code-point-at@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/code-point-at",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.11.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "code-point-at",
+ "raw": "code-point-at@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/string-width"
+ ],
+ "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz",
+ "_shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6",
+ "_shrinkwrap": null,
+ "_spec": "code-point-at@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/string-width",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/code-point-at/issues"
+ },
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
+ "description": "ES2015 String#codePointAt() ponyfill",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6",
+ "tarball": "http://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "c2ffa4064718b37c84c73a633abeeed5b486a469",
+ "homepage": "https://github.com/sindresorhus/code-point-at",
+ "keywords": [
+ "at",
+ "code",
+ "codepoint",
+ "es2015",
+ "es6",
+ "point",
+ "polyfill",
+ "ponyfill",
+ "shim",
+ "str",
+ "string",
+ "unicode"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "code-point-at",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/code-point-at.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/code-point-at/readme.md b/source/node_modules/code-point-at/readme.md
new file mode 100644
index 000000000..71e7d0931
--- /dev/null
+++ b/source/node_modules/code-point-at/readme.md
@@ -0,0 +1,34 @@
+# code-point-at [](https://travis-ci.org/sindresorhus/code-point-at)
+
+> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) ponyfill
+
+> Ponyfill: A polyfill that doesn't overwrite the native method
+
+
+## Install
+
+```
+$ npm install --save code-point-at
+```
+
+
+## Usage
+
+```js
+var codePointAt = require('code-point-at');
+
+codePointAt('🐴');
+//=> 128052
+
+codePointAt('abc', 2);
+//=> 99
+```
+
+## API
+
+### codePointAt(input, [position])
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/combined-stream/License b/source/node_modules/combined-stream/License
new file mode 100644
index 000000000..4804b7ab4
--- /dev/null
+++ b/source/node_modules/combined-stream/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Debuggable Limited
+
+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.
diff --git a/source/node_modules/combined-stream/Readme.md b/source/node_modules/combined-stream/Readme.md
new file mode 100644
index 000000000..3a9e025fb
--- /dev/null
+++ b/source/node_modules/combined-stream/Readme.md
@@ -0,0 +1,138 @@
+# combined-stream
+
+A stream that emits multiple other streams one after another.
+
+**NB** Currently `combined-stream` works with streams vesrion 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatability with `combined-stream`.
+
+- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.
+
+- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.
+
+## Installation
+
+``` bash
+npm install combined-stream
+```
+
+## Usage
+
+Here is a simple example that shows how you can use combined-stream to combine
+two files into one:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create();
+combinedStream.append(fs.createReadStream('file1.txt'));
+combinedStream.append(fs.createReadStream('file2.txt'));
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+While the example above works great, it will pause all source streams until
+they are needed. If you don't want that to happen, you can set `pauseStreams`
+to `false`:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create({pauseStreams: false});
+combinedStream.append(fs.createReadStream('file1.txt'));
+combinedStream.append(fs.createReadStream('file2.txt'));
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+However, what if you don't have all the source streams yet, or you don't want
+to allocate the resources (file descriptors, memory, etc.) for them right away?
+Well, in that case you can simply provide a callback that supplies the stream
+by calling a `next()` function:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create();
+combinedStream.append(function(next) {
+ next(fs.createReadStream('file1.txt'));
+});
+combinedStream.append(function(next) {
+ next(fs.createReadStream('file2.txt'));
+});
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+## API
+
+### CombinedStream.create([options])
+
+Returns a new combined stream object. Available options are:
+
+* `maxDataSize`
+* `pauseStreams`
+
+The effect of those options is described below.
+
+### combinedStream.pauseStreams = `true`
+
+Whether to apply back pressure to the underlaying streams. If set to `false`,
+the underlaying streams will never be paused. If set to `true`, the
+underlaying streams will be paused right after being appended, as well as when
+`delayedStream.pipe()` wants to throttle.
+
+### combinedStream.maxDataSize = `2 * 1024 * 1024`
+
+The maximum amount of bytes (or characters) to buffer for all source streams.
+If this value is exceeded, `combinedStream` emits an `'error'` event.
+
+### combinedStream.dataSize = `0`
+
+The amount of bytes (or characters) currently buffered by `combinedStream`.
+
+### combinedStream.append(stream)
+
+Appends the given `stream` to the combinedStream object. If `pauseStreams` is
+set to `true, this stream will also be paused right away.
+
+`streams` can also be a function that takes one parameter called `next`. `next`
+is a function that must be invoked in order to provide the `next` stream, see
+example above.
+
+Regardless of how the `stream` is appended, combined-stream always attaches an
+`'error'` listener to it, so you don't have to do that manually.
+
+Special case: `stream` can also be a String or Buffer.
+
+### combinedStream.write(data)
+
+You should not call this, `combinedStream` takes care of piping the appended
+streams into itself for you.
+
+### combinedStream.resume()
+
+Causes `combinedStream` to start drain the streams it manages. The function is
+idempotent, and also emits a `'resume'` event each time which usually goes to
+the stream that is currently being drained.
+
+### combinedStream.pause();
+
+If `combinedStream.pauseStreams` is set to `false`, this does nothing.
+Otherwise a `'pause'` event is emitted, this goes to the stream that is
+currently being drained, so you can use it to apply back pressure.
+
+### combinedStream.end();
+
+Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
+all streams from the queue.
+
+### combinedStream.destroy();
+
+Same as `combinedStream.end()`, except it emits a `'close'` event instead of
+`'end'`.
+
+## License
+
+combined-stream is licensed under the MIT license.
diff --git a/source/node_modules/combined-stream/lib/combined_stream.js b/source/node_modules/combined-stream/lib/combined_stream.js
new file mode 100644
index 000000000..6b5c21b6b
--- /dev/null
+++ b/source/node_modules/combined-stream/lib/combined_stream.js
@@ -0,0 +1,188 @@
+var util = require('util');
+var Stream = require('stream').Stream;
+var DelayedStream = require('delayed-stream');
+
+module.exports = CombinedStream;
+function CombinedStream() {
+ this.writable = false;
+ this.readable = true;
+ this.dataSize = 0;
+ this.maxDataSize = 2 * 1024 * 1024;
+ this.pauseStreams = true;
+
+ this._released = false;
+ this._streams = [];
+ this._currentStream = null;
+}
+util.inherits(CombinedStream, Stream);
+
+CombinedStream.create = function(options) {
+ var combinedStream = new this();
+
+ options = options || {};
+ for (var option in options) {
+ combinedStream[option] = options[option];
+ }
+
+ return combinedStream;
+};
+
+CombinedStream.isStreamLike = function(stream) {
+ return (typeof stream !== 'function')
+ && (typeof stream !== 'string')
+ && (typeof stream !== 'boolean')
+ && (typeof stream !== 'number')
+ && (!Buffer.isBuffer(stream));
+};
+
+CombinedStream.prototype.append = function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+
+ if (isStreamLike) {
+ if (!(stream instanceof DelayedStream)) {
+ var newStream = DelayedStream.create(stream, {
+ maxDataSize: Infinity,
+ pauseStream: this.pauseStreams,
+ });
+ stream.on('data', this._checkDataSize.bind(this));
+ stream = newStream;
+ }
+
+ this._handleErrors(stream);
+
+ if (this.pauseStreams) {
+ stream.pause();
+ }
+ }
+
+ this._streams.push(stream);
+ return this;
+};
+
+CombinedStream.prototype.pipe = function(dest, options) {
+ Stream.prototype.pipe.call(this, dest, options);
+ this.resume();
+ return dest;
+};
+
+CombinedStream.prototype._getNext = function() {
+ this._currentStream = null;
+ var stream = this._streams.shift();
+
+
+ if (typeof stream == 'undefined') {
+ this.end();
+ return;
+ }
+
+ if (typeof stream !== 'function') {
+ this._pipeNext(stream);
+ return;
+ }
+
+ var getStream = stream;
+ getStream(function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('data', this._checkDataSize.bind(this));
+ this._handleErrors(stream);
+ }
+
+ this._pipeNext(stream);
+ }.bind(this));
+};
+
+CombinedStream.prototype._pipeNext = function(stream) {
+ this._currentStream = stream;
+
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('end', this._getNext.bind(this));
+ stream.pipe(this, {end: false});
+ return;
+ }
+
+ var value = stream;
+ this.write(value);
+ this._getNext();
+};
+
+CombinedStream.prototype._handleErrors = function(stream) {
+ var self = this;
+ stream.on('error', function(err) {
+ self._emitError(err);
+ });
+};
+
+CombinedStream.prototype.write = function(data) {
+ this.emit('data', data);
+};
+
+CombinedStream.prototype.pause = function() {
+ if (!this.pauseStreams) {
+ return;
+ }
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
+ this.emit('pause');
+};
+
+CombinedStream.prototype.resume = function() {
+ if (!this._released) {
+ this._released = true;
+ this.writable = true;
+ this._getNext();
+ }
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
+ this.emit('resume');
+};
+
+CombinedStream.prototype.end = function() {
+ this._reset();
+ this.emit('end');
+};
+
+CombinedStream.prototype.destroy = function() {
+ this._reset();
+ this.emit('close');
+};
+
+CombinedStream.prototype._reset = function() {
+ this.writable = false;
+ this._streams = [];
+ this._currentStream = null;
+};
+
+CombinedStream.prototype._checkDataSize = function() {
+ this._updateDataSize();
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
+
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
+ this._emitError(new Error(message));
+};
+
+CombinedStream.prototype._updateDataSize = function() {
+ this.dataSize = 0;
+
+ var self = this;
+ this._streams.forEach(function(stream) {
+ if (!stream.dataSize) {
+ return;
+ }
+
+ self.dataSize += stream.dataSize;
+ });
+
+ if (this._currentStream && this._currentStream.dataSize) {
+ this.dataSize += this._currentStream.dataSize;
+ }
+};
+
+CombinedStream.prototype._emitError = function(err) {
+ this._reset();
+ this.emit('error', err);
+};
diff --git a/source/node_modules/combined-stream/package.json b/source/node_modules/combined-stream/package.json
new file mode 100644
index 000000000..b6d5501d3
--- /dev/null
+++ b/source/node_modules/combined-stream/package.json
@@ -0,0 +1,93 @@
+{
+ "_args": [
+ [
+ "combined-stream@~1.0.5",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request"
+ ]
+ ],
+ "_from": "combined-stream@>=1.0.5 <1.1.0",
+ "_id": "combined-stream@1.0.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/combined-stream",
+ "_nodeVersion": "0.12.4",
+ "_npmUser": {
+ "email": "iam@alexindigo.com",
+ "name": "alexindigo"
+ },
+ "_npmVersion": "2.10.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "combined-stream",
+ "raw": "combined-stream@~1.0.5",
+ "rawSpec": "~1.0.5",
+ "scope": null,
+ "spec": ">=1.0.5 <1.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/form-data",
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
+ "_shasum": "938370a57b4a51dea2c77c15d5c5fdf895164009",
+ "_shrinkwrap": null,
+ "_spec": "combined-stream@~1.0.5",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request",
+ "author": {
+ "email": "felix@debuggable.com",
+ "name": "Felix Geisendörfer",
+ "url": "http://debuggable.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/felixge/node-combined-stream/issues"
+ },
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "description": "A stream that emits multiple other streams one after another.",
+ "devDependencies": {
+ "far": "~0.0.7"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "938370a57b4a51dea2c77c15d5c5fdf895164009",
+ "tarball": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "gitHead": "cfc7b815d090a109bcedb5bb0f6713148d55a6b7",
+ "homepage": "https://github.com/felixge/node-combined-stream",
+ "license": "MIT",
+ "main": "./lib/combined_stream",
+ "maintainers": [
+ {
+ "name": "felixge",
+ "email": "felix@debuggable.com"
+ },
+ {
+ "name": "celer",
+ "email": "dtyree77@gmail.com"
+ },
+ {
+ "name": "alexindigo",
+ "email": "iam@alexindigo.com"
+ },
+ {
+ "name": "apechimp",
+ "email": "apeherder@gmail.com"
+ }
+ ],
+ "name": "combined-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-combined-stream.git"
+ },
+ "scripts": {
+ "test": "node test/run.js"
+ },
+ "version": "1.0.5"
+}
diff --git a/source/node_modules/commander/History.md b/source/node_modules/commander/History.md
new file mode 100644
index 000000000..1b47439cb
--- /dev/null
+++ b/source/node_modules/commander/History.md
@@ -0,0 +1,261 @@
+
+2.9.0 / 2015-10-13
+==================
+
+ * Add option `isDefault` to set default subcommand #415 @Qix-
+ * Add callback to allow filtering or post-processing of help text #434 @djulien
+ * Fix `undefined` text in help information close #414 #416 @zhiyelee
+
+2.8.1 / 2015-04-22
+==================
+
+ * Back out `support multiline description` Close #396 #397
+
+2.8.0 / 2015-04-07
+==================
+
+ * Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee
+ * Fix bug in Git-style sub-commands #372 @zhiyelee
+ * Allow commands to be hidden from help #383 @tonylukasavage
+ * When git-style sub-commands are in use, yet none are called, display help #382 @claylo
+ * Add ability to specify arguments syntax for top-level command #258 @rrthomas
+ * Support multiline descriptions #208 @zxqfox
+
+2.7.1 / 2015-03-11
+==================
+
+ * Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367.
+
+2.7.0 / 2015-03-09
+==================
+
+ * Fix git-style bug when installed globally. Close #335 #349 @zhiyelee
+ * Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage
+ * Add support for camelCase on `opts()`. Close #353 @nkzawa
+ * Add node.js 0.12 and io.js to travis.yml
+ * Allow RegEx options. #337 @palanik
+ * Fixes exit code when sub-command failing. Close #260 #332 @pirelenito
+ * git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee
+
+2.6.0 / 2014-12-30
+==================
+
+ * added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee
+ * Add application description to the help msg. Close #112 @dalssoft
+
+2.5.1 / 2014-12-15
+==================
+
+ * fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee
+
+2.5.0 / 2014-10-24
+==================
+
+ * add support for variadic arguments. Closes #277 @whitlockjc
+
+2.4.0 / 2014-10-17
+==================
+
+ * fixed a bug on executing the coercion function of subcommands option. Closes #270
+ * added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage
+ * added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage
+ * fixed a bug on subcommand name. Closes #248 @jonathandelgado
+ * fixed function normalize doesn’t honor option terminator. Closes #216 @abbr
+
+2.3.0 / 2014-07-16
+==================
+
+ * add command alias'. Closes PR #210
+ * fix: Typos. Closes #99
+ * fix: Unused fs module. Closes #217
+
+2.2.0 / 2014-03-29
+==================
+
+ * add passing of previous option value
+ * fix: support subcommands on windows. Closes #142
+ * Now the defaultValue passed as the second argument of the coercion function.
+
+2.1.0 / 2013-11-21
+==================
+
+ * add: allow cflag style option params, unit test, fixes #174
+
+2.0.0 / 2013-07-18
+==================
+
+ * remove input methods (.prompt, .confirm, etc)
+
+1.3.2 / 2013-07-18
+==================
+
+ * add support for sub-commands to co-exist with the original command
+
+1.3.1 / 2013-07-18
+==================
+
+ * add quick .runningCommand hack so you can opt-out of other logic when running a sub command
+
+1.3.0 / 2013-07-09
+==================
+
+ * add EACCES error handling
+ * fix sub-command --help
+
+1.2.0 / 2013-06-13
+==================
+
+ * allow "-" hyphen as an option argument
+ * support for RegExp coercion
+
+1.1.1 / 2012-11-20
+==================
+
+ * add more sub-command padding
+ * fix .usage() when args are present. Closes #106
+
+1.1.0 / 2012-11-16
+==================
+
+ * add git-style executable subcommand support. Closes #94
+
+1.0.5 / 2012-10-09
+==================
+
+ * fix `--name` clobbering. Closes #92
+ * fix examples/help. Closes #89
+
+1.0.4 / 2012-09-03
+==================
+
+ * add `outputHelp()` method.
+
+1.0.3 / 2012-08-30
+==================
+
+ * remove invalid .version() defaulting
+
+1.0.2 / 2012-08-24
+==================
+
+ * add `--foo=bar` support [arv]
+ * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
+
+1.0.1 / 2012-08-03
+==================
+
+ * fix issue #56
+ * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode())
+
+1.0.0 / 2012-07-05
+==================
+
+ * add support for optional option descriptions
+ * add defaulting of `.version()` to package.json's version
+
+0.6.1 / 2012-06-01
+==================
+
+ * Added: append (yes or no) on confirmation
+ * Added: allow node.js v0.7.x
+
+0.6.0 / 2012-04-10
+==================
+
+ * Added `.prompt(obj, callback)` support. Closes #49
+ * Added default support to .choose(). Closes #41
+ * Fixed the choice example
+
+0.5.1 / 2011-12-20
+==================
+
+ * Fixed `password()` for recent nodes. Closes #36
+
+0.5.0 / 2011-12-04
+==================
+
+ * Added sub-command option support [itay]
+
+0.4.3 / 2011-12-04
+==================
+
+ * Fixed custom help ordering. Closes #32
+
+0.4.2 / 2011-11-24
+==================
+
+ * Added travis support
+ * Fixed: line-buffered input automatically trimmed. Closes #31
+
+0.4.1 / 2011-11-18
+==================
+
+ * Removed listening for "close" on --help
+
+0.4.0 / 2011-11-15
+==================
+
+ * Added support for `--`. Closes #24
+
+0.3.3 / 2011-11-14
+==================
+
+ * Fixed: wait for close event when writing help info [Jerry Hamlet]
+
+0.3.2 / 2011-11-01
+==================
+
+ * Fixed long flag definitions with values [felixge]
+
+0.3.1 / 2011-10-31
+==================
+
+ * Changed `--version` short flag to `-V` from `-v`
+ * Changed `.version()` so it's configurable [felixge]
+
+0.3.0 / 2011-10-31
+==================
+
+ * Added support for long flags only. Closes #18
+
+0.2.1 / 2011-10-24
+==================
+
+ * "node": ">= 0.4.x < 0.7.0". Closes #20
+
+0.2.0 / 2011-09-26
+==================
+
+ * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
+
+0.1.0 / 2011-08-24
+==================
+
+ * Added support for custom `--help` output
+
+0.0.5 / 2011-08-18
+==================
+
+ * Changed: when the user enters nothing prompt for password again
+ * Fixed issue with passwords beginning with numbers [NuckChorris]
+
+0.0.4 / 2011-08-15
+==================
+
+ * Fixed `Commander#args`
+
+0.0.3 / 2011-08-15
+==================
+
+ * Added default option value support
+
+0.0.2 / 2011-08-15
+==================
+
+ * Added mask support to `Command#password(str[, mask], fn)`
+ * Added `Command#password(str, fn)`
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/source/node_modules/commander/LICENSE b/source/node_modules/commander/LICENSE
new file mode 100644
index 000000000..10f997ab1
--- /dev/null
+++ b/source/node_modules/commander/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2011 TJ Holowaychuk
+
+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.
diff --git a/source/node_modules/commander/Readme.md b/source/node_modules/commander/Readme.md
new file mode 100644
index 000000000..08b9e4cb9
--- /dev/null
+++ b/source/node_modules/commander/Readme.md
@@ -0,0 +1,351 @@
+# Commander.js
+
+
+[](http://travis-ci.org/tj/commander.js)
+[](https://www.npmjs.org/package/commander)
+[](https://www.npmjs.org/package/commander)
+[](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+ The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/tj/commander).
+ [API documentation](http://tj.github.com/commander.js/)
+
+
+## Installation
+
+ $ npm install commander
+
+## Option parsing
+
+ Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-p, --peppers', 'Add peppers')
+ .option('-P, --pineapple', 'Add pineapple')
+ .option('-b, --bbq-sauce', 'Add bbq sauce')
+ .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
+ .parse(process.argv);
+
+console.log('you ordered a pizza with:');
+if (program.peppers) console.log(' - peppers');
+if (program.pineapple) console.log(' - pineapple');
+if (program.bbqSauce) console.log(' - bbq');
+console.log(' - %s cheese', program.cheese);
+```
+
+ Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
+
+
+## Coercion
+
+```js
+function range(val) {
+ return val.split('..').map(Number);
+}
+
+function list(val) {
+ return val.split(',');
+}
+
+function collect(val, memo) {
+ memo.push(val);
+ return memo;
+}
+
+function increaseVerbosity(v, total) {
+ return total + 1;
+}
+
+program
+ .version('0.0.1')
+ .usage('[options] ')
+ .option('-i, --integer ', 'An integer argument', parseInt)
+ .option('-f, --float ', 'A float argument', parseFloat)
+ .option('-r, --range ..', 'A range', range)
+ .option('-l, --list ', 'A list', list)
+ .option('-o, --optional [value]', 'An optional value')
+ .option('-c, --collect [value]', 'A repeatable value', collect, [])
+ .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0)
+ .parse(process.argv);
+
+console.log(' int: %j', program.integer);
+console.log(' float: %j', program.float);
+console.log(' optional: %j', program.optional);
+program.range = program.range || [];
+console.log(' range: %j..%j', program.range[0], program.range[1]);
+console.log(' list: %j', program.list);
+console.log(' collect: %j', program.collect);
+console.log(' verbosity: %j', program.verbose);
+console.log(' args: %j', program.args);
+```
+
+## Regular Expression
+```js
+program
+ .version('0.0.1')
+ .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium')
+ .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i)
+ .parse(process.argv);
+
+console.log(' size: %j', program.size);
+console.log(' drink: %j', program.drink);
+```
+
+## Variadic arguments
+
+ The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to
+ append `...` to the argument name. Here is an example:
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .command('rmdir [otherDirs...]')
+ .action(function (dir, otherDirs) {
+ console.log('rmdir %s', dir);
+ if (otherDirs) {
+ otherDirs.forEach(function (oDir) {
+ console.log('rmdir %s', oDir);
+ });
+ }
+ });
+
+program.parse(process.argv);
+```
+
+ An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed
+ to your action as demonstrated above.
+
+## Specify the argument syntax
+
+```js
+#!/usr/bin/env node
+
+var program = require('../');
+
+program
+ .version('0.0.1')
+ .arguments(' [env]')
+ .action(function (cmd, env) {
+ cmdValue = cmd;
+ envValue = env;
+ });
+
+program.parse(process.argv);
+
+if (typeof cmdValue === 'undefined') {
+ console.error('no command given!');
+ process.exit(1);
+}
+console.log('command:', cmdValue);
+console.log('environment:', envValue || "no environment given");
+```
+
+## Git-style sub-commands
+
+```js
+// file: ./examples/pm
+var program = require('..');
+
+program
+ .version('0.0.1')
+ .command('install [name]', 'install one or more packages')
+ .command('search [query]', 'search with optional query')
+ .command('list', 'list packages installed', {isDefault: true})
+ .parse(process.argv);
+```
+
+When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools.
+The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`.
+
+Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the option from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified.
+
+If the program is designed to be installed globally, make sure the executables have proper modes, like `755`.
+
+### `--harmony`
+
+You can enable `--harmony` option in two ways:
+* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern.
+* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process.
+
+## Automated --help
+
+ The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
+
+```
+ $ ./examples/pizza --help
+
+ Usage: pizza [options]
+
+ An application for pizzas ordering
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -p, --peppers Add peppers
+ -P, --pineapple Add pineapple
+ -b, --bbq Add bbq sauce
+ -c, --cheese Add the specified type of cheese [marble]
+ -C, --no-cheese You do not want any cheese
+
+```
+
+## Custom help
+
+ You can display arbitrary `-h, --help` information
+ by listening for "--help". Commander will automatically
+ exit once you are done so that the remainder of your program
+ does not execute causing undesired behaviours, for example
+ in the following executable "stuff" will not output when
+ `--help` is used.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-f, --foo', 'enable some foo')
+ .option('-b, --bar', 'enable some bar')
+ .option('-B, --baz', 'enable some baz');
+
+// must be before .parse() since
+// node's emit() is immediate
+
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log('');
+ console.log(' $ custom-help --help');
+ console.log(' $ custom-help -h');
+ console.log('');
+});
+
+program.parse(process.argv);
+
+console.log('stuff');
+```
+
+Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run:
+
+```
+
+Usage: custom-help [options]
+
+Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -f, --foo enable some foo
+ -b, --bar enable some bar
+ -B, --baz enable some baz
+
+Examples:
+
+ $ custom-help --help
+ $ custom-help -h
+
+```
+
+## .outputHelp(cb)
+
+Output help information without exiting.
+Optional callback cb allows post-processing of help text before it is displayed.
+
+If you want to display help by default (e.g. if no command was provided), you can use something like:
+
+```js
+var program = require('commander');
+var colors = require('colors');
+
+program
+ .version('0.0.1')
+ .command('getstream [url]', 'get stream URL')
+ .parse(process.argv);
+
+ if (!process.argv.slice(2).length) {
+ program.outputHelp(make_red);
+ }
+
+function make_red(txt) {
+ return colors.red(txt); //display the help text in red on the console
+}
+```
+
+## .help(cb)
+
+ Output help information and exit immediately.
+ Optional callback cb allows post-processing of help text before it is displayed.
+
+## Examples
+
+```js
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-C, --chdir ', 'change the working directory')
+ .option('-c, --config ', 'set config path. defaults to ./deploy.conf')
+ .option('-T, --no-tests', 'ignore test hook')
+
+program
+ .command('setup [env]')
+ .description('run setup commands for all envs')
+ .option("-s, --setup_mode [mode]", "Which setup mode to use")
+ .action(function(env, options){
+ var mode = options.setup_mode || "normal";
+ env = env || 'all';
+ console.log('setup for %s env(s) with %s mode', env, mode);
+ });
+
+program
+ .command('exec ')
+ .alias('ex')
+ .description('execute the given remote cmd')
+ .option("-e, --exec_mode ", "Which exec mode to use")
+ .action(function(cmd, options){
+ console.log('exec "%s" using %s mode', cmd, options.exec_mode);
+ }).on('--help', function() {
+ console.log(' Examples:');
+ console.log();
+ console.log(' $ deploy exec sequential');
+ console.log(' $ deploy exec async');
+ console.log();
+ });
+
+program
+ .command('*')
+ .action(function(env){
+ console.log('deploying "%s"', env);
+ });
+
+program.parse(process.argv);
+```
+
+More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.
+
+## License
+
+MIT
+
diff --git a/source/node_modules/commander/index.js b/source/node_modules/commander/index.js
new file mode 100644
index 000000000..a19c05d2e
--- /dev/null
+++ b/source/node_modules/commander/index.js
@@ -0,0 +1,1110 @@
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var spawn = require('child_process').spawn;
+var readlink = require('graceful-readlink').readlinkSync;
+var path = require('path');
+var dirname = path.dirname;
+var basename = path.basename;
+var fs = require('fs');
+
+/**
+ * Expose the root command.
+ */
+
+exports = module.exports = new Command();
+
+/**
+ * Expose `Command`.
+ */
+
+exports.Command = Command;
+
+/**
+ * Expose `Option`.
+ */
+
+exports.Option = Option;
+
+/**
+ * Initialize a new `Option` with the given `flags` and `description`.
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @api public
+ */
+
+function Option(flags, description) {
+ this.flags = flags;
+ this.required = ~flags.indexOf('<');
+ this.optional = ~flags.indexOf('[');
+ this.bool = !~flags.indexOf('-no-');
+ flags = flags.split(/[ ,|]+/);
+ if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
+ this.long = flags.shift();
+ this.description = description || '';
+}
+
+/**
+ * Return option name.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Option.prototype.name = function() {
+ return this.long
+ .replace('--', '')
+ .replace('no-', '');
+};
+
+/**
+ * Check if `arg` matches the short or long flag.
+ *
+ * @param {String} arg
+ * @return {Boolean}
+ * @api private
+ */
+
+Option.prototype.is = function(arg) {
+ return arg == this.short || arg == this.long;
+};
+
+/**
+ * Initialize a new `Command`.
+ *
+ * @param {String} name
+ * @api public
+ */
+
+function Command(name) {
+ this.commands = [];
+ this.options = [];
+ this._execs = {};
+ this._allowUnknownOption = false;
+ this._args = [];
+ this._name = name || '';
+}
+
+/**
+ * Inherit from `EventEmitter.prototype`.
+ */
+
+Command.prototype.__proto__ = EventEmitter.prototype;
+
+/**
+ * Add command `name`.
+ *
+ * The `.action()` callback is invoked when the
+ * command `name` is specified via __ARGV__,
+ * and the remaining arguments are applied to the
+ * function for access.
+ *
+ * When the `name` is "*" an un-matched command
+ * will be passed as the first arg, followed by
+ * the rest of __ARGV__ remaining.
+ *
+ * Examples:
+ *
+ * program
+ * .version('0.0.1')
+ * .option('-C, --chdir ', 'change the working directory')
+ * .option('-c, --config ', 'set config path. defaults to ./deploy.conf')
+ * .option('-T, --no-tests', 'ignore test hook')
+ *
+ * program
+ * .command('setup')
+ * .description('run remote setup commands')
+ * .action(function() {
+ * console.log('setup');
+ * });
+ *
+ * program
+ * .command('exec ')
+ * .description('run the given remote command')
+ * .action(function(cmd) {
+ * console.log('exec "%s"', cmd);
+ * });
+ *
+ * program
+ * .command('teardown [otherDirs...]')
+ * .description('run teardown commands')
+ * .action(function(dir, otherDirs) {
+ * console.log('dir "%s"', dir);
+ * if (otherDirs) {
+ * otherDirs.forEach(function (oDir) {
+ * console.log('dir "%s"', oDir);
+ * });
+ * }
+ * });
+ *
+ * program
+ * .command('*')
+ * .description('deploy the given env')
+ * .action(function(env) {
+ * console.log('deploying "%s"', env);
+ * });
+ *
+ * program.parse(process.argv);
+ *
+ * @param {String} name
+ * @param {String} [desc] for git-style sub-commands
+ * @return {Command} the new command
+ * @api public
+ */
+
+Command.prototype.command = function(name, desc, opts) {
+ opts = opts || {};
+ var args = name.split(/ +/);
+ var cmd = new Command(args.shift());
+
+ if (desc) {
+ cmd.description(desc);
+ this.executables = true;
+ this._execs[cmd._name] = true;
+ if (opts.isDefault) this.defaultExecutable = cmd._name;
+ }
+
+ cmd._noHelp = !!opts.noHelp;
+ this.commands.push(cmd);
+ cmd.parseExpectedArgs(args);
+ cmd.parent = this;
+
+ if (desc) return this;
+ return cmd;
+};
+
+/**
+ * Define argument syntax for the top-level command.
+ *
+ * @api public
+ */
+
+Command.prototype.arguments = function (desc) {
+ return this.parseExpectedArgs(desc.split(/ +/));
+};
+
+/**
+ * Add an implicit `help [cmd]` subcommand
+ * which invokes `--help` for the given command.
+ *
+ * @api private
+ */
+
+Command.prototype.addImplicitHelpCommand = function() {
+ this.command('help [cmd]', 'display help for [cmd]');
+};
+
+/**
+ * Parse expected `args`.
+ *
+ * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parseExpectedArgs = function(args) {
+ if (!args.length) return;
+ var self = this;
+ args.forEach(function(arg) {
+ var argDetails = {
+ required: false,
+ name: '',
+ variadic: false
+ };
+
+ switch (arg[0]) {
+ case '<':
+ argDetails.required = true;
+ argDetails.name = arg.slice(1, -1);
+ break;
+ case '[':
+ argDetails.name = arg.slice(1, -1);
+ break;
+ }
+
+ if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') {
+ argDetails.variadic = true;
+ argDetails.name = argDetails.name.slice(0, -3);
+ }
+ if (argDetails.name) {
+ self._args.push(argDetails);
+ }
+ });
+ return this;
+};
+
+/**
+ * Register callback `fn` for the command.
+ *
+ * Examples:
+ *
+ * program
+ * .command('help')
+ * .description('display verbose help')
+ * .action(function() {
+ * // output help here
+ * });
+ *
+ * @param {Function} fn
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.action = function(fn) {
+ var self = this;
+ var listener = function(args, unknown) {
+ // Parse any so-far unknown options
+ args = args || [];
+ unknown = unknown || [];
+
+ var parsed = self.parseOptions(unknown);
+
+ // Output help if necessary
+ outputHelpIfNecessary(self, parsed.unknown);
+
+ // If there are still any unknown options, then we simply
+ // die, unless someone asked for help, in which case we give it
+ // to them, and then we die.
+ if (parsed.unknown.length > 0) {
+ self.unknownOption(parsed.unknown[0]);
+ }
+
+ // Leftover arguments need to be pushed back. Fixes issue #56
+ if (parsed.args.length) args = parsed.args.concat(args);
+
+ self._args.forEach(function(arg, i) {
+ if (arg.required && null == args[i]) {
+ self.missingArgument(arg.name);
+ } else if (arg.variadic) {
+ if (i !== self._args.length - 1) {
+ self.variadicArgNotLast(arg.name);
+ }
+
+ args[i] = args.splice(i);
+ }
+ });
+
+ // Always append ourselves to the end of the arguments,
+ // to make sure we match the number of arguments the user
+ // expects
+ if (self._args.length) {
+ args[self._args.length] = self;
+ } else {
+ args.push(self);
+ }
+
+ fn.apply(self, args);
+ };
+ var parent = this.parent || this;
+ var name = parent === this ? '*' : this._name;
+ parent.on(name, listener);
+ if (this._alias) parent.on(this._alias, listener);
+ return this;
+};
+
+/**
+ * Define option with `flags`, `description` and optional
+ * coercion `fn`.
+ *
+ * The `flags` string should contain both the short and long flags,
+ * separated by comma, a pipe or space. The following are all valid
+ * all will output this way when `--help` is used.
+ *
+ * "-p, --pepper"
+ * "-p|--pepper"
+ * "-p --pepper"
+ *
+ * Examples:
+ *
+ * // simple boolean defaulting to false
+ * program.option('-p, --pepper', 'add pepper');
+ *
+ * --pepper
+ * program.pepper
+ * // => Boolean
+ *
+ * // simple boolean defaulting to true
+ * program.option('-C, --no-cheese', 'remove cheese');
+ *
+ * program.cheese
+ * // => true
+ *
+ * --no-cheese
+ * program.cheese
+ * // => false
+ *
+ * // required argument
+ * program.option('-C, --chdir ', 'change the working directory');
+ *
+ * --chdir /tmp
+ * program.chdir
+ * // => "/tmp"
+ *
+ * // optional argument
+ * program.option('-c, --cheese [type]', 'add cheese [marble]');
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @param {Function|Mixed} fn or default
+ * @param {Mixed} defaultValue
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.option = function(flags, description, fn, defaultValue) {
+ var self = this
+ , option = new Option(flags, description)
+ , oname = option.name()
+ , name = camelcase(oname);
+
+ // default as 3rd arg
+ if (typeof fn != 'function') {
+ if (fn instanceof RegExp) {
+ var regex = fn;
+ fn = function(val, def) {
+ var m = regex.exec(val);
+ return m ? m[0] : def;
+ }
+ }
+ else {
+ defaultValue = fn;
+ fn = null;
+ }
+ }
+
+ // preassign default value only for --no-*, [optional], or
+ if (false == option.bool || option.optional || option.required) {
+ // when --no-* we make sure default is true
+ if (false == option.bool) defaultValue = true;
+ // preassign only if we have a default
+ if (undefined !== defaultValue) self[name] = defaultValue;
+ }
+
+ // register the option
+ this.options.push(option);
+
+ // when it's passed assign the value
+ // and conditionally invoke the callback
+ this.on(oname, function(val) {
+ // coercion
+ if (null !== val && fn) val = fn(val, undefined === self[name]
+ ? defaultValue
+ : self[name]);
+
+ // unassigned or bool
+ if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) {
+ // if no value, bool true, and we have a default, then use it!
+ if (null == val) {
+ self[name] = option.bool
+ ? defaultValue || true
+ : false;
+ } else {
+ self[name] = val;
+ }
+ } else if (null !== val) {
+ // reassign
+ self[name] = val;
+ }
+ });
+
+ return this;
+};
+
+/**
+ * Allow unknown options on the command line.
+ *
+ * @param {Boolean} arg if `true` or omitted, no error will be thrown
+ * for unknown options.
+ * @api public
+ */
+Command.prototype.allowUnknownOption = function(arg) {
+ this._allowUnknownOption = arguments.length === 0 || arg;
+ return this;
+};
+
+/**
+ * Parse `argv`, settings options and invoking commands when defined.
+ *
+ * @param {Array} argv
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parse = function(argv) {
+ // implicit help
+ if (this.executables) this.addImplicitHelpCommand();
+
+ // store raw args
+ this.rawArgs = argv;
+
+ // guess name
+ this._name = this._name || basename(argv[1], '.js');
+
+ // github-style sub-commands with no sub-command
+ if (this.executables && argv.length < 3 && !this.defaultExecutable) {
+ // this user needs help
+ argv.push('--help');
+ }
+
+ // process argv
+ var parsed = this.parseOptions(this.normalize(argv.slice(2)));
+ var args = this.args = parsed.args;
+
+ var result = this.parseArgs(this.args, parsed.unknown);
+
+ // executable sub-commands
+ var name = result.args[0];
+ if (this._execs[name] && typeof this._execs[name] != "function") {
+ return this.executeSubCommand(argv, args, parsed.unknown);
+ } else if (this.defaultExecutable) {
+ // use the default subcommand
+ args.unshift(name = this.defaultExecutable);
+ return this.executeSubCommand(argv, args, parsed.unknown);
+ }
+
+ return result;
+};
+
+/**
+ * Execute a sub-command executable.
+ *
+ * @param {Array} argv
+ * @param {Array} args
+ * @param {Array} unknown
+ * @api private
+ */
+
+Command.prototype.executeSubCommand = function(argv, args, unknown) {
+ args = args.concat(unknown);
+
+ if (!args.length) this.help();
+ if ('help' == args[0] && 1 == args.length) this.help();
+
+ // --help
+ if ('help' == args[0]) {
+ args[0] = args[1];
+ args[1] = '--help';
+ }
+
+ // executable
+ var f = argv[1];
+ // name of the subcommand, link `pm-install`
+ var bin = basename(f, '.js') + '-' + args[0];
+
+
+ // In case of globally installed, get the base dir where executable
+ // subcommand file should be located at
+ var baseDir
+ , link = readlink(f);
+
+ // when symbolink is relative path
+ if (link !== f && link.charAt(0) !== '/') {
+ link = path.join(dirname(f), link)
+ }
+ baseDir = dirname(link);
+
+ // prefer local `./` to bin in the $PATH
+ var localBin = path.join(baseDir, bin);
+
+ // whether bin file is a js script with explicit `.js` extension
+ var isExplicitJS = false;
+ if (exists(localBin + '.js')) {
+ bin = localBin + '.js';
+ isExplicitJS = true;
+ } else if (exists(localBin)) {
+ bin = localBin;
+ }
+
+ args = args.slice(1);
+
+ var proc;
+ if (process.platform !== 'win32') {
+ if (isExplicitJS) {
+ args.unshift(localBin);
+ // add executable arguments to spawn
+ args = (process.execArgv || []).concat(args);
+
+ proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] });
+ } else {
+ proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
+ }
+ } else {
+ args.unshift(localBin);
+ proc = spawn(process.execPath, args, { stdio: 'inherit'});
+ }
+
+ proc.on('close', process.exit.bind(process));
+ proc.on('error', function(err) {
+ if (err.code == "ENOENT") {
+ console.error('\n %s(1) does not exist, try --help\n', bin);
+ } else if (err.code == "EACCES") {
+ console.error('\n %s(1) not executable. try chmod or run with root\n', bin);
+ }
+ process.exit(1);
+ });
+
+ // Store the reference to the child process
+ this.runningCommand = proc;
+};
+
+/**
+ * Normalize `args`, splitting joined short flags. For example
+ * the arg "-abc" is equivalent to "-a -b -c".
+ * This also normalizes equal sign and splits "--abc=def" into "--abc def".
+ *
+ * @param {Array} args
+ * @return {Array}
+ * @api private
+ */
+
+Command.prototype.normalize = function(args) {
+ var ret = []
+ , arg
+ , lastOpt
+ , index;
+
+ for (var i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ if (i > 0) {
+ lastOpt = this.optionFor(args[i-1]);
+ }
+
+ if (arg === '--') {
+ // Honor option terminator
+ ret = ret.concat(args.slice(i));
+ break;
+ } else if (lastOpt && lastOpt.required) {
+ ret.push(arg);
+ } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {
+ arg.slice(1).split('').forEach(function(c) {
+ ret.push('-' + c);
+ });
+ } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) {
+ ret.push(arg.slice(0, index), arg.slice(index + 1));
+ } else {
+ ret.push(arg);
+ }
+ }
+
+ return ret;
+};
+
+/**
+ * Parse command `args`.
+ *
+ * When listener(s) are available those
+ * callbacks are invoked, otherwise the "*"
+ * event is emitted and those actions are invoked.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api private
+ */
+
+Command.prototype.parseArgs = function(args, unknown) {
+ var name;
+
+ if (args.length) {
+ name = args[0];
+ if (this.listeners(name).length) {
+ this.emit(args.shift(), args, unknown);
+ } else {
+ this.emit('*', args);
+ }
+ } else {
+ outputHelpIfNecessary(this, unknown);
+
+ // If there were no args and we have unknown options,
+ // then they are extraneous and we need to error.
+ if (unknown.length > 0) {
+ this.unknownOption(unknown[0]);
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Return an option matching `arg` if any.
+ *
+ * @param {String} arg
+ * @return {Option}
+ * @api private
+ */
+
+Command.prototype.optionFor = function(arg) {
+ for (var i = 0, len = this.options.length; i < len; ++i) {
+ if (this.options[i].is(arg)) {
+ return this.options[i];
+ }
+ }
+};
+
+/**
+ * Parse options from `argv` returning `argv`
+ * void of these options.
+ *
+ * @param {Array} argv
+ * @return {Array}
+ * @api public
+ */
+
+Command.prototype.parseOptions = function(argv) {
+ var args = []
+ , len = argv.length
+ , literal
+ , option
+ , arg;
+
+ var unknownOptions = [];
+
+ // parse options
+ for (var i = 0; i < len; ++i) {
+ arg = argv[i];
+
+ // literal args after --
+ if ('--' == arg) {
+ literal = true;
+ continue;
+ }
+
+ if (literal) {
+ args.push(arg);
+ continue;
+ }
+
+ // find matching Option
+ option = this.optionFor(arg);
+
+ // option is defined
+ if (option) {
+ // requires arg
+ if (option.required) {
+ arg = argv[++i];
+ if (null == arg) return this.optionMissingArgument(option);
+ this.emit(option.name(), arg);
+ // optional arg
+ } else if (option.optional) {
+ arg = argv[i+1];
+ if (null == arg || ('-' == arg[0] && '-' != arg)) {
+ arg = null;
+ } else {
+ ++i;
+ }
+ this.emit(option.name(), arg);
+ // bool
+ } else {
+ this.emit(option.name());
+ }
+ continue;
+ }
+
+ // looks like an option
+ if (arg.length > 1 && '-' == arg[0]) {
+ unknownOptions.push(arg);
+
+ // If the next argument looks like it might be
+ // an argument for this option, we pass it on.
+ // If it isn't, then it'll simply be ignored
+ if (argv[i+1] && '-' != argv[i+1][0]) {
+ unknownOptions.push(argv[++i]);
+ }
+ continue;
+ }
+
+ // arg
+ args.push(arg);
+ }
+
+ return { args: args, unknown: unknownOptions };
+};
+
+/**
+ * Return an object containing options as key-value pairs
+ *
+ * @return {Object}
+ * @api public
+ */
+Command.prototype.opts = function() {
+ var result = {}
+ , len = this.options.length;
+
+ for (var i = 0 ; i < len; i++) {
+ var key = camelcase(this.options[i].name());
+ result[key] = key === 'version' ? this._version : this[key];
+ }
+ return result;
+};
+
+/**
+ * Argument `name` is missing.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.missingArgument = function(name) {
+ console.error();
+ console.error(" error: missing required argument `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * `Option` is missing an argument, but received `flag` or nothing.
+ *
+ * @param {String} option
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.optionMissingArgument = function(option, flag) {
+ console.error();
+ if (flag) {
+ console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
+ } else {
+ console.error(" error: option `%s' argument missing", option.flags);
+ }
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Unknown option `flag`.
+ *
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.unknownOption = function(flag) {
+ if (this._allowUnknownOption) return;
+ console.error();
+ console.error(" error: unknown option `%s'", flag);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Variadic argument with `name` is not the last argument as required.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.variadicArgNotLast = function(name) {
+ console.error();
+ console.error(" error: variadic arguments must be last `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Set the program version to `str`.
+ *
+ * This method auto-registers the "-V, --version" flag
+ * which will print the version number when passed.
+ *
+ * @param {String} str
+ * @param {String} flags
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.version = function(str, flags) {
+ if (0 == arguments.length) return this._version;
+ this._version = str;
+ flags = flags || '-V, --version';
+ this.option(flags, 'output the version number');
+ this.on('version', function() {
+ process.stdout.write(str + '\n');
+ process.exit(0);
+ });
+ return this;
+};
+
+/**
+ * Set the description to `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.description = function(str) {
+ if (0 === arguments.length) return this._description;
+ this._description = str;
+ return this;
+};
+
+/**
+ * Set an alias for the command
+ *
+ * @param {String} alias
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.alias = function(alias) {
+ if (0 == arguments.length) return this._alias;
+ this._alias = alias;
+ return this;
+};
+
+/**
+ * Set / get the command usage `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.usage = function(str) {
+ var args = this._args.map(function(arg) {
+ return humanReadableArgName(arg);
+ });
+
+ var usage = '[options]'
+ + (this.commands.length ? ' [command]' : '')
+ + (this._args.length ? ' ' + args.join(' ') : '');
+
+ if (0 == arguments.length) return this._usage || usage;
+ this._usage = str;
+
+ return this;
+};
+
+/**
+ * Get the name of the command
+ *
+ * @param {String} name
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.name = function() {
+ return this._name;
+};
+
+/**
+ * Return the largest option length.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+Command.prototype.largestOptionLength = function() {
+ return this.options.reduce(function(max, option) {
+ return Math.max(max, option.flags.length);
+ }, 0);
+};
+
+/**
+ * Return help for options.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.optionHelp = function() {
+ var width = this.largestOptionLength();
+
+ // Prepend the help information
+ return [pad('-h, --help', width) + ' ' + 'output usage information']
+ .concat(this.options.map(function(option) {
+ return pad(option.flags, width) + ' ' + option.description;
+ }))
+ .join('\n');
+};
+
+/**
+ * Return command help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.commandHelp = function() {
+ if (!this.commands.length) return '';
+
+ var commands = this.commands.filter(function(cmd) {
+ return !cmd._noHelp;
+ }).map(function(cmd) {
+ var args = cmd._args.map(function(arg) {
+ return humanReadableArgName(arg);
+ }).join(' ');
+
+ return [
+ cmd._name
+ + (cmd._alias ? '|' + cmd._alias : '')
+ + (cmd.options.length ? ' [options]' : '')
+ + ' ' + args
+ , cmd.description()
+ ];
+ });
+
+ var width = commands.reduce(function(max, command) {
+ return Math.max(max, command[0].length);
+ }, 0);
+
+ return [
+ ''
+ , ' Commands:'
+ , ''
+ , commands.map(function(cmd) {
+ var desc = cmd[1] ? ' ' + cmd[1] : '';
+ return pad(cmd[0], width) + desc;
+ }).join('\n').replace(/^/gm, ' ')
+ , ''
+ ].join('\n');
+};
+
+/**
+ * Return program help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.helpInformation = function() {
+ var desc = [];
+ if (this._description) {
+ desc = [
+ ' ' + this._description
+ , ''
+ ];
+ }
+
+ var cmdName = this._name;
+ if (this._alias) {
+ cmdName = cmdName + '|' + this._alias;
+ }
+ var usage = [
+ ''
+ ,' Usage: ' + cmdName + ' ' + this.usage()
+ , ''
+ ];
+
+ var cmds = [];
+ var commandHelp = this.commandHelp();
+ if (commandHelp) cmds = [commandHelp];
+
+ var options = [
+ ' Options:'
+ , ''
+ , '' + this.optionHelp().replace(/^/gm, ' ')
+ , ''
+ , ''
+ ];
+
+ return usage
+ .concat(cmds)
+ .concat(desc)
+ .concat(options)
+ .join('\n');
+};
+
+/**
+ * Output help information for this command
+ *
+ * @api public
+ */
+
+Command.prototype.outputHelp = function(cb) {
+ if (!cb) {
+ cb = function(passthru) {
+ return passthru;
+ }
+ }
+ process.stdout.write(cb(this.helpInformation()));
+ this.emit('--help');
+};
+
+/**
+ * Output help information and exit.
+ *
+ * @api public
+ */
+
+Command.prototype.help = function(cb) {
+ this.outputHelp(cb);
+ process.exit();
+};
+
+/**
+ * Camel-case the given `flag`
+ *
+ * @param {String} flag
+ * @return {String}
+ * @api private
+ */
+
+function camelcase(flag) {
+ return flag.split('-').reduce(function(str, word) {
+ return str + word[0].toUpperCase() + word.slice(1);
+ });
+}
+
+/**
+ * Pad `str` to `width`.
+ *
+ * @param {String} str
+ * @param {Number} width
+ * @return {String}
+ * @api private
+ */
+
+function pad(str, width) {
+ var len = Math.max(0, width - str.length);
+ return str + Array(len + 1).join(' ');
+}
+
+/**
+ * Output help information if necessary
+ *
+ * @param {Command} command to output help for
+ * @param {Array} array of options to search for -h or --help
+ * @api private
+ */
+
+function outputHelpIfNecessary(cmd, options) {
+ options = options || [];
+ for (var i = 0; i < options.length; i++) {
+ if (options[i] == '--help' || options[i] == '-h') {
+ cmd.outputHelp();
+ process.exit(0);
+ }
+ }
+}
+
+/**
+ * Takes an argument an returns its human readable equivalent for help usage.
+ *
+ * @param {Object} arg
+ * @return {String}
+ * @api private
+ */
+
+function humanReadableArgName(arg) {
+ var nameOutput = arg.name + (arg.variadic === true ? '...' : '');
+
+ return arg.required
+ ? '<' + nameOutput + '>'
+ : '[' + nameOutput + ']'
+}
+
+// for versions before node v0.8 when there weren't `fs.existsSync`
+function exists(file) {
+ try {
+ if (fs.statSync(file).isFile()) {
+ return true;
+ }
+ } catch (e) {
+ return false;
+ }
+}
+
diff --git a/source/node_modules/commander/package.json b/source/node_modules/commander/package.json
new file mode 100644
index 000000000..122be844e
--- /dev/null
+++ b/source/node_modules/commander/package.json
@@ -0,0 +1,96 @@
+{
+ "_args": [
+ [
+ "commander@^2.9.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/har-validator"
+ ]
+ ],
+ "_from": "commander@>=2.9.0 <3.0.0",
+ "_id": "commander@2.9.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/commander",
+ "_nodeVersion": "0.12.7",
+ "_npmUser": {
+ "email": "zhiyelee@gmail.com",
+ "name": "zhiyelee"
+ },
+ "_npmVersion": "2.11.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "commander",
+ "raw": "commander@^2.9.0",
+ "rawSpec": "^2.9.0",
+ "scope": null,
+ "spec": ">=2.9.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/har-validator"
+ ],
+ "_resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
+ "_shasum": "9c99094176e12240cb22d6c5146098400fe0f7d4",
+ "_shrinkwrap": null,
+ "_spec": "commander@^2.9.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/har-validator",
+ "author": {
+ "email": "tj@vision-media.ca",
+ "name": "TJ Holowaychuk"
+ },
+ "bugs": {
+ "url": "https://github.com/tj/commander.js/issues"
+ },
+ "dependencies": {
+ "graceful-readlink": ">= 1.0.0"
+ },
+ "description": "the complete solution for node.js command-line programs",
+ "devDependencies": {
+ "should": ">= 0.0.1",
+ "sinon": ">=1.17.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9c99094176e12240cb22d6c5146098400fe0f7d4",
+ "tarball": "http://registry.npmjs.org/commander/-/commander-2.9.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.6.x"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "b2aad7a8471d434593a85306aa73777a526e9f75",
+ "homepage": "https://github.com/tj/commander.js#readme",
+ "keywords": [
+ "command",
+ "option",
+ "parser"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "somekittens",
+ "email": "rkoutnik@gmail.com"
+ },
+ {
+ "name": "zhiyelee",
+ "email": "zhiyelee@gmail.com"
+ }
+ ],
+ "name": "commander",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tj/commander.js.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "2.9.0"
+}
diff --git a/source/node_modules/concat-map/.travis.yml b/source/node_modules/concat-map/.travis.yml
new file mode 100644
index 000000000..f1d0f13c8
--- /dev/null
+++ b/source/node_modules/concat-map/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
diff --git a/source/node_modules/concat-map/LICENSE b/source/node_modules/concat-map/LICENSE
new file mode 100644
index 000000000..ee27ba4b4
--- /dev/null
+++ b/source/node_modules/concat-map/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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.
diff --git a/source/node_modules/concat-map/README.markdown b/source/node_modules/concat-map/README.markdown
new file mode 100644
index 000000000..408f70a1b
--- /dev/null
+++ b/source/node_modules/concat-map/README.markdown
@@ -0,0 +1,62 @@
+concat-map
+==========
+
+Concatenative mapdashery.
+
+[](http://ci.testling.com/substack/node-concat-map)
+
+[](http://travis-ci.org/substack/node-concat-map)
+
+example
+=======
+
+``` js
+var concatMap = require('concat-map');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
+```
+
+***
+
+```
+[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
+```
+
+methods
+=======
+
+``` js
+var concatMap = require('concat-map')
+```
+
+concatMap(xs, fn)
+-----------------
+
+Return an array of concatenated elements by calling `fn(x, i)` for each element
+`x` and each index `i` in the array `xs`.
+
+When `fn(x, i)` returns an array, its result will be concatenated with the
+result array. If `fn(x, i)` returns anything else, that value will be pushed
+onto the end of the result array.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install concat-map
+```
+
+license
+=======
+
+MIT
+
+notes
+=====
+
+This module was written while sitting high above the ground in a tree.
diff --git a/source/node_modules/concat-map/example/map.js b/source/node_modules/concat-map/example/map.js
new file mode 100644
index 000000000..33656217b
--- /dev/null
+++ b/source/node_modules/concat-map/example/map.js
@@ -0,0 +1,6 @@
+var concatMap = require('../');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
diff --git a/source/node_modules/concat-map/index.js b/source/node_modules/concat-map/index.js
new file mode 100644
index 000000000..b29a7812e
--- /dev/null
+++ b/source/node_modules/concat-map/index.js
@@ -0,0 +1,13 @@
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
diff --git a/source/node_modules/concat-map/package.json b/source/node_modules/concat-map/package.json
new file mode 100644
index 000000000..7e1630bb3
--- /dev/null
+++ b/source/node_modules/concat-map/package.json
@@ -0,0 +1,109 @@
+{
+ "_args": [
+ [
+ "concat-map@0.0.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/brace-expansion"
+ ]
+ ],
+ "_from": "concat-map@0.0.1",
+ "_id": "concat-map@0.0.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/concat-map",
+ "_npmUser": {
+ "email": "mail@substack.net",
+ "name": "substack"
+ },
+ "_npmVersion": "1.3.21",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "concat-map",
+ "raw": "concat-map@0.0.1",
+ "rawSpec": "0.0.1",
+ "scope": null,
+ "spec": "0.0.1",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/brace-expansion"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
+ "_shrinkwrap": null,
+ "_spec": "concat-map@0.0.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/brace-expansion",
+ "author": {
+ "email": "mail@substack.net",
+ "name": "James Halliday",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-concat-map/issues"
+ },
+ "dependencies": {},
+ "description": "concatenative mapdashery",
+ "devDependencies": {
+ "tape": "~2.4.0"
+ },
+ "directories": {
+ "example": "example",
+ "test": "test"
+ },
+ "dist": {
+ "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
+ "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
+ },
+ "homepage": "https://github.com/substack/node-concat-map",
+ "keywords": [
+ "concat",
+ "concatMap",
+ "functional",
+ "higher-order",
+ "map"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "name": "concat-map",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/node-concat-map.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "testling": {
+ "browsers": {
+ "chrome": [
+ 10,
+ 22
+ ],
+ "ff": [
+ 10,
+ 15,
+ 3.5
+ ],
+ "ie": [
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "opera": [
+ 12
+ ],
+ "safari": [
+ 5.1
+ ]
+ },
+ "files": "test/*.js"
+ },
+ "version": "0.0.1"
+}
diff --git a/source/node_modules/concat-map/test/map.js b/source/node_modules/concat-map/test/map.js
new file mode 100644
index 000000000..fdbd7022f
--- /dev/null
+++ b/source/node_modules/concat-map/test/map.js
@@ -0,0 +1,39 @@
+var concatMap = require('../');
+var test = require('tape');
+
+test('empty or not', function (t) {
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
+ var ixes = [];
+ var ys = concatMap(xs, function (x, ix) {
+ ixes.push(ix);
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+ });
+ t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
+ t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
+ t.end();
+});
+
+test('always something', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('scalars', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : x;
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('undefs', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function () {});
+ t.same(ys, [ undefined, undefined, undefined, undefined ]);
+ t.end();
+});
diff --git a/source/node_modules/concat-stream/LICENSE b/source/node_modules/concat-stream/LICENSE
new file mode 100644
index 000000000..99c130e1d
--- /dev/null
+++ b/source/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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.
\ No newline at end of file
diff --git a/source/node_modules/concat-stream/index.js b/source/node_modules/concat-stream/index.js
new file mode 100644
index 000000000..b55ae7e03
--- /dev/null
+++ b/source/node_modules/concat-stream/index.js
@@ -0,0 +1,136 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else {
+ strings.push(Buffer(p))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (typeof p === 'string' || isArrayish(p)
+ || (p && typeof p.subarray === 'function')) {
+ bufs.push(Buffer(p))
+ } else bufs.push(Buffer(String(p)))
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = Buffer(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/.npmignore b/source/node_modules/concat-stream/node_modules/readable-stream/.npmignore
new file mode 100644
index 000000000..38344f87a
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/.npmignore
@@ -0,0 +1,5 @@
+build/
+test/
+examples/
+fs.js
+zlib.js
\ No newline at end of file
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/.travis.yml b/source/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
new file mode 100644
index 000000000..cfe1c9439
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - npm install -g npm
+notifications:
+ email: false
+matrix:
+ include:
+ - node_js: '0.8'
+ env: TASK=test
+ - node_js: '0.10'
+ env: TASK=test
+ - node_js: '0.11'
+ env: TASK=test
+ - node_js: '0.12'
+ env: TASK=test
+ - node_js: 1
+ env: TASK=test
+ - node_js: 2
+ env: TASK=test
+ - node_js: 3
+ env: TASK=test
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: node
+ env: TASK=test
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="41..beta"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="36..latest"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="['6.1', '7.1', '8.2']"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="['6.1', '7.1', '8.2']"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
+ - node_js: node
+ env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/.zuul.yml b/source/node_modules/concat-stream/node_modules/readable-stream/.zuul.yml
new file mode 100644
index 000000000..96d9cfbd3
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/.zuul.yml
@@ -0,0 +1 @@
+ui: tape
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/LICENSE b/source/node_modules/concat-stream/node_modules/readable-stream/LICENSE
new file mode 100644
index 000000000..e3d4e695a
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+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.
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/README.md b/source/node_modules/concat-stream/node_modules/readable-stream/README.md
new file mode 100644
index 000000000..f9fb52059
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/README.md
@@ -0,0 +1,36 @@
+# readable-stream
+
+***Node-core streams for userland*** [](https://travis-ci.org/nodejs/readable-stream)
+
+
+[](https://nodei.co/npm/readable-stream/)
+[](https://nodei.co/npm/readable-stream/)
+
+
+[](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core, including [documentation](doc/stream.markdown).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams WG Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com>
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org>
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com>
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me>
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/doc/stream.markdown b/source/node_modules/concat-stream/node_modules/readable-stream/doc/stream.markdown
new file mode 100644
index 000000000..5602f0736
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/doc/stream.markdown
@@ -0,0 +1,1730 @@
+# Stream
+
+ Stability: 2 - Stable
+
+A stream is an abstract interface implemented by various objects in
+Node.js. For example a [request to an HTTP server][] is a stream, as is
+[stdout][]. Streams are readable, writable, or both. All streams are
+instances of [EventEmitter][]
+
+You can load the Stream base classes by doing `require('stream')`.
+There are base classes provided for [Readable][] streams, [Writable][]
+streams, [Duplex][] streams, and [Transform][] streams.
+
+This document is split up into 3 sections. The first explains the
+parts of the API that you need to be aware of to use streams in your
+programs. If you never implement a streaming API yourself, you can
+stop there.
+
+The second section explains the parts of the API that you need to use
+if you implement your own custom streams yourself. The API is
+designed to make this easy for you to do.
+
+The third section goes into more depth about how streams work,
+including some of the internal mechanisms and functions that you
+should probably not modify unless you definitely know what you are
+doing.
+
+
+## API for Stream Consumers
+
+
+
+Streams can be either [Readable][], [Writable][], or both ([Duplex][]).
+
+All streams are EventEmitters, but they also have other custom methods
+and properties depending on whether they are Readable, Writable, or
+Duplex.
+
+If a stream is both Readable and Writable, then it implements all of
+the methods and events below. So, a [Duplex][] or [Transform][] stream is
+fully described by this API, though their implementation may be
+somewhat different.
+
+It is not necessary to implement Stream interfaces in order to consume
+streams in your programs. If you **are** implementing streaming
+interfaces in your own program, please also refer to
+[API for Stream Implementors][] below.
+
+Almost all Node.js programs, no matter how simple, use Streams in some
+way. Here is an example of using Streams in an Node.js program:
+
+```javascript
+var http = require('http');
+
+var server = http.createServer(function (req, res) {
+ // req is an http.IncomingMessage, which is a Readable Stream
+ // res is an http.ServerResponse, which is a Writable Stream
+
+ var body = '';
+ // we want to get the data as utf8 strings
+ // If you don't set an encoding, then you'll get Buffer objects
+ req.setEncoding('utf8');
+
+ // Readable streams emit 'data' events once a listener is added
+ req.on('data', function (chunk) {
+ body += chunk;
+ });
+
+ // the end event tells you that you have entire body
+ req.on('end', function () {
+ try {
+ var data = JSON.parse(body);
+ } catch (er) {
+ // uh oh! bad json!
+ res.statusCode = 400;
+ return res.end('error: ' + er.message);
+ }
+
+ // write back something interesting to the user:
+ res.write(typeof data);
+ res.end();
+ });
+});
+
+server.listen(1337);
+
+// $ curl localhost:1337 -d '{}'
+// object
+// $ curl localhost:1337 -d '"foo"'
+// string
+// $ curl localhost:1337 -d 'not json'
+// error: Unexpected token o
+```
+
+### Class: stream.Duplex
+
+Duplex streams are streams that implement both the [Readable][] and
+[Writable][] interfaces. See above for usage.
+
+Examples of Duplex streams include:
+
+* [tcp sockets][]
+* [zlib streams][]
+* [crypto streams][]
+
+### Class: stream.Readable
+
+
+
+The Readable stream interface is the abstraction for a *source* of
+data that you are reading from. In other words, data comes *out* of a
+Readable stream.
+
+A Readable stream will not start emitting data until you indicate that
+you are ready to receive it.
+
+Readable streams have two "modes": a **flowing mode** and a **paused
+mode**. When in flowing mode, data is read from the underlying system
+and provided to your program as fast as possible. In paused mode, you
+must explicitly call `stream.read()` to get chunks of data out.
+Streams start out in paused mode.
+
+**Note**: If no data event handlers are attached, and there are no
+[`pipe()`][] destinations, and the stream is switched into flowing
+mode, then data will be lost.
+
+You can switch to flowing mode by doing any of the following:
+
+* Adding a [`'data'` event][] handler to listen for data.
+* Calling the [`resume()`][] method to explicitly open the flow.
+* Calling the [`pipe()`][] method to send the data to a [Writable][].
+
+You can switch back to paused mode by doing either of the following:
+
+* If there are no pipe destinations, by calling the [`pause()`][]
+ method.
+* If there are pipe destinations, by removing any [`'data'` event][]
+ handlers, and removing all pipe destinations by calling the
+ [`unpipe()`][] method.
+
+Note that, for backwards compatibility reasons, removing `'data'`
+event handlers will **not** automatically pause the stream. Also, if
+there are piped destinations, then calling `pause()` will not
+guarantee that the stream will *remain* paused once those
+destinations drain and ask for more data.
+
+Examples of readable streams include:
+
+* [http responses, on the client][]
+* [http requests, on the server][]
+* [fs read streams][]
+* [zlib streams][]
+* [crypto streams][]
+* [tcp sockets][]
+* [child process stdout and stderr][]
+* [process.stdin][]
+
+#### Event: 'close'
+
+Emitted when the stream and any of its underlying resources (a file
+descriptor, for example) have been closed. The event indicates that
+no more events will be emitted, and no further computation will occur.
+
+Not all streams will emit the 'close' event.
+
+#### Event: 'data'
+
+* `chunk` {Buffer | String} The chunk of data.
+
+Attaching a `data` event listener to a stream that has not been
+explicitly paused will switch the stream into flowing mode. Data will
+then be passed as soon as it is available.
+
+If you just want to get all the data out of the stream as fast as
+possible, this is the best way to do so.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.on('data', function(chunk) {
+ console.log('got %d bytes of data', chunk.length);
+});
+```
+
+#### Event: 'end'
+
+This event fires when there will be no more data to read.
+
+Note that the `end` event **will not fire** unless the data is
+completely consumed. This can be done by switching into flowing mode,
+or by calling `read()` repeatedly until you get to the end.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.on('data', function(chunk) {
+ console.log('got %d bytes of data', chunk.length);
+});
+readable.on('end', function() {
+ console.log('there will be no more data.');
+});
+```
+
+#### Event: 'error'
+
+* {Error Object}
+
+Emitted if there was an error receiving data.
+
+#### Event: 'readable'
+
+When a chunk of data can be read from the stream, it will emit a
+`'readable'` event.
+
+In some cases, listening for a `'readable'` event will cause some data
+to be read into the internal buffer from the underlying system, if it
+hadn't already.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.on('readable', function() {
+ // there is some data to read now
+});
+```
+
+Once the internal buffer is drained, a `readable` event will fire
+again when more data is available.
+
+The `readable` event is not emitted in the "flowing" mode with the
+sole exception of the last one, on end-of-stream.
+
+The 'readable' event indicates that the stream has new information:
+either new data is available or the end of the stream has been reached.
+In the former case, `.read()` will return that data. In the latter case,
+`.read()` will return null. For instance, in the following example, `foo.txt`
+is an empty file:
+
+```javascript
+var fs = require('fs');
+var rr = fs.createReadStream('foo.txt');
+rr.on('readable', function() {
+ console.log('readable:', rr.read());
+});
+rr.on('end', function() {
+ console.log('end');
+});
+```
+
+The output of running this script is:
+
+```
+bash-3.2$ node test.js
+readable: null
+end
+```
+
+#### readable.isPaused()
+
+* Return: `Boolean`
+
+This method returns whether or not the `readable` has been **explicitly**
+paused by client code (using `readable.pause()` without a corresponding
+`readable.resume()`).
+
+```javascript
+var readable = new stream.Readable
+
+readable.isPaused() // === false
+readable.pause()
+readable.isPaused() // === true
+readable.resume()
+readable.isPaused() // === false
+```
+
+#### readable.pause()
+
+* Return: `this`
+
+This method will cause a stream in flowing mode to stop emitting
+`data` events, switching out of flowing mode. Any data that becomes
+available will remain in the internal buffer.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.on('data', function(chunk) {
+ console.log('got %d bytes of data', chunk.length);
+ readable.pause();
+ console.log('there will be no more data for 1 second');
+ setTimeout(function() {
+ console.log('now data will start flowing again');
+ readable.resume();
+ }, 1000);
+});
+```
+
+#### readable.pipe(destination[, options])
+
+* `destination` {[Writable][] Stream} The destination for writing data
+* `options` {Object} Pipe options
+ * `end` {Boolean} End the writer when the reader ends. Default = `true`
+
+This method pulls all the data out of a readable stream, and writes it
+to the supplied destination, automatically managing the flow so that
+the destination is not overwhelmed by a fast readable stream.
+
+Multiple destinations can be piped to safely.
+
+```javascript
+var readable = getReadableStreamSomehow();
+var writable = fs.createWriteStream('file.txt');
+// All the data from readable goes into 'file.txt'
+readable.pipe(writable);
+```
+
+This function returns the destination stream, so you can set up pipe
+chains like so:
+
+```javascript
+var r = fs.createReadStream('file.txt');
+var z = zlib.createGzip();
+var w = fs.createWriteStream('file.txt.gz');
+r.pipe(z).pipe(w);
+```
+
+For example, emulating the Unix `cat` command:
+
+```javascript
+process.stdin.pipe(process.stdout);
+```
+
+By default [`end()`][] is called on the destination when the source stream
+emits `end`, so that `destination` is no longer writable. Pass `{ end:
+false }` as `options` to keep the destination stream open.
+
+This keeps `writer` open so that "Goodbye" can be written at the
+end.
+
+```javascript
+reader.pipe(writer, { end: false });
+reader.on('end', function() {
+ writer.end('Goodbye\n');
+});
+```
+
+Note that `process.stderr` and `process.stdout` are never closed until
+the process exits, regardless of the specified options.
+
+#### readable.read([size])
+
+* `size` {Number} Optional argument to specify how much data to read.
+* Return {String | Buffer | null}
+
+The `read()` method pulls some data out of the internal buffer and
+returns it. If there is no data available, then it will return
+`null`.
+
+If you pass in a `size` argument, then it will return that many
+bytes. If `size` bytes are not available, then it will return `null`,
+unless we've ended, in which case it will return the data remaining
+in the buffer.
+
+If you do not specify a `size` argument, then it will return all the
+data in the internal buffer.
+
+This method should only be called in paused mode. In flowing mode,
+this method is called automatically until the internal buffer is
+drained.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.on('readable', function() {
+ var chunk;
+ while (null !== (chunk = readable.read())) {
+ console.log('got %d bytes of data', chunk.length);
+ }
+});
+```
+
+If this method returns a data chunk, then it will also trigger the
+emission of a [`'data'` event][].
+
+Note that calling `readable.read([size])` after the `end` event has been
+triggered will return `null`. No runtime error will be raised.
+
+#### readable.resume()
+
+* Return: `this`
+
+This method will cause the readable stream to resume emitting `data`
+events.
+
+This method will switch the stream into flowing mode. If you do *not*
+want to consume the data from a stream, but you *do* want to get to
+its `end` event, you can call [`readable.resume()`][] to open the flow of
+data.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.resume();
+readable.on('end', function() {
+ console.log('got to the end, but did not read anything');
+});
+```
+
+#### readable.setEncoding(encoding)
+
+* `encoding` {String} The encoding to use.
+* Return: `this`
+
+Call this function to cause the stream to return strings of the
+specified encoding instead of Buffer objects. For example, if you do
+`readable.setEncoding('utf8')`, then the output data will be
+interpreted as UTF-8 data, and returned as strings. If you do
+`readable.setEncoding('hex')`, then the data will be encoded in
+hexadecimal string format.
+
+This properly handles multi-byte characters that would otherwise be
+potentially mangled if you simply pulled the Buffers directly and
+called `buf.toString(encoding)` on them. If you want to read the data
+as strings, always use this method.
+
+```javascript
+var readable = getReadableStreamSomehow();
+readable.setEncoding('utf8');
+readable.on('data', function(chunk) {
+ assert.equal(typeof chunk, 'string');
+ console.log('got %d characters of string data', chunk.length);
+});
+```
+
+#### readable.unpipe([destination])
+
+* `destination` {[Writable][] Stream} Optional specific stream to unpipe
+
+This method will remove the hooks set up for a previous `pipe()` call.
+
+If the destination is not specified, then all pipes are removed.
+
+If the destination is specified, but no pipe is set up for it, then
+this is a no-op.
+
+```javascript
+var readable = getReadableStreamSomehow();
+var writable = fs.createWriteStream('file.txt');
+// All the data from readable goes into 'file.txt',
+// but only for the first second
+readable.pipe(writable);
+setTimeout(function() {
+ console.log('stop writing to file.txt');
+ readable.unpipe(writable);
+ console.log('manually close the file stream');
+ writable.end();
+}, 1000);
+```
+
+#### readable.unshift(chunk)
+
+* `chunk` {Buffer | String} Chunk of data to unshift onto the read queue
+
+This is useful in certain cases where a stream is being consumed by a
+parser, which needs to "un-consume" some data that it has
+optimistically pulled out of the source, so that the stream can be
+passed on to some other party.
+
+Note that `stream.unshift(chunk)` cannot be called after the `end` event
+has been triggered; a runtime error will be raised.
+
+If you find that you must often call `stream.unshift(chunk)` in your
+programs, consider implementing a [Transform][] stream instead. (See API
+for Stream Implementors, below.)
+
+```javascript
+// Pull off a header delimited by \n\n
+// use unshift() if we get too much
+// Call the callback with (error, header, stream)
+var StringDecoder = require('string_decoder').StringDecoder;
+function parseHeader(stream, callback) {
+ stream.on('error', callback);
+ stream.on('readable', onReadable);
+ var decoder = new StringDecoder('utf8');
+ var header = '';
+ function onReadable() {
+ var chunk;
+ while (null !== (chunk = stream.read())) {
+ var str = decoder.write(chunk);
+ if (str.match(/\n\n/)) {
+ // found the header boundary
+ var split = str.split(/\n\n/);
+ header += split.shift();
+ var remaining = split.join('\n\n');
+ var buf = new Buffer(remaining, 'utf8');
+ if (buf.length)
+ stream.unshift(buf);
+ stream.removeListener('error', callback);
+ stream.removeListener('readable', onReadable);
+ // now the body of the message can be read from the stream.
+ callback(null, header, stream);
+ } else {
+ // still reading the header.
+ header += str;
+ }
+ }
+ }
+}
+```
+Note that, unlike `stream.push(chunk)`, `stream.unshift(chunk)` will not
+end the reading process by resetting the internal reading state of the
+stream. This can cause unexpected results if `unshift` is called during a
+read (i.e. from within a `_read` implementation on a custom stream). Following
+the call to `unshift` with an immediate `stream.push('')` will reset the
+reading state appropriately, however it is best to simply avoid calling
+`unshift` while in the process of performing a read.
+
+#### readable.wrap(stream)
+
+* `stream` {Stream} An "old style" readable stream
+
+Versions of Node.js prior to v0.10 had streams that did not implement the
+entire Streams API as it is today. (See "Compatibility" below for
+more information.)
+
+If you are using an older Node.js library that emits `'data'` events and
+has a [`pause()`][] method that is advisory only, then you can use the
+`wrap()` method to create a [Readable][] stream that uses the old stream
+as its data source.
+
+You will very rarely ever need to call this function, but it exists
+as a convenience for interacting with old Node.js programs and libraries.
+
+For example:
+
+```javascript
+var OldReader = require('./old-api-module.js').OldReader;
+var oreader = new OldReader;
+var Readable = require('stream').Readable;
+var myReader = new Readable().wrap(oreader);
+
+myReader.on('readable', function() {
+ myReader.read(); // etc.
+});
+```
+
+### Class: stream.Transform
+
+Transform streams are [Duplex][] streams where the output is in some way
+computed from the input. They implement both the [Readable][] and
+[Writable][] interfaces. See above for usage.
+
+Examples of Transform streams include:
+
+* [zlib streams][]
+* [crypto streams][]
+
+### Class: stream.Writable
+
+
+
+The Writable stream interface is an abstraction for a *destination*
+that you are writing data *to*.
+
+Examples of writable streams include:
+
+* [http requests, on the client][]
+* [http responses, on the server][]
+* [fs write streams][]
+* [zlib streams][]
+* [crypto streams][]
+* [tcp sockets][]
+* [child process stdin][]
+* [process.stdout][], [process.stderr][]
+
+#### Event: 'drain'
+
+If a [`writable.write(chunk)`][] call returns false, then the `drain`
+event will indicate when it is appropriate to begin writing more data
+to the stream.
+
+```javascript
+// Write the data to the supplied writable stream one million times.
+// Be attentive to back-pressure.
+function writeOneMillionTimes(writer, data, encoding, callback) {
+ var i = 1000000;
+ write();
+ function write() {
+ var ok = true;
+ do {
+ i -= 1;
+ if (i === 0) {
+ // last time!
+ writer.write(data, encoding, callback);
+ } else {
+ // see if we should continue, or wait
+ // don't pass the callback, because we're not done yet.
+ ok = writer.write(data, encoding);
+ }
+ } while (i > 0 && ok);
+ if (i > 0) {
+ // had to stop early!
+ // write some more once it drains
+ writer.once('drain', write);
+ }
+ }
+}
+```
+
+#### Event: 'error'
+
+* {Error object}
+
+Emitted if there was an error when writing or piping data.
+
+#### Event: 'finish'
+
+When the [`end()`][] method has been called, and all data has been flushed
+to the underlying system, this event is emitted.
+
+```javascript
+var writer = getWritableStreamSomehow();
+for (var i = 0; i < 100; i ++) {
+ writer.write('hello, #' + i + '!\n');
+}
+writer.end('this is the end\n');
+writer.on('finish', function() {
+ console.error('all writes are now complete.');
+});
+```
+
+#### Event: 'pipe'
+
+* `src` {[Readable][] Stream} source stream that is piping to this writable
+
+This is emitted whenever the `pipe()` method is called on a readable
+stream, adding this writable to its set of destinations.
+
+```javascript
+var writer = getWritableStreamSomehow();
+var reader = getReadableStreamSomehow();
+writer.on('pipe', function(src) {
+ console.error('something is piping into the writer');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+```
+
+#### Event: 'unpipe'
+
+* `src` {[Readable][] Stream} The source stream that [unpiped][] this writable
+
+This is emitted whenever the [`unpipe()`][] method is called on a
+readable stream, removing this writable from its set of destinations.
+
+```javascript
+var writer = getWritableStreamSomehow();
+var reader = getReadableStreamSomehow();
+writer.on('unpipe', function(src) {
+ console.error('something has stopped piping into the writer');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+reader.unpipe(writer);
+```
+
+#### writable.cork()
+
+Forces buffering of all writes.
+
+Buffered data will be flushed either at `.uncork()` or at `.end()` call.
+
+#### writable.end([chunk][, encoding][, callback])
+
+* `chunk` {String | Buffer} Optional data to write
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Optional callback for when the stream is finished
+
+Call this method when no more data will be written to the stream. If
+supplied, the callback is attached as a listener on the `finish` event.
+
+Calling [`write()`][] after calling [`end()`][] will raise an error.
+
+```javascript
+// write 'hello, ' and then end with 'world!'
+var file = fs.createWriteStream('example.txt');
+file.write('hello, ');
+file.end('world!');
+// writing more now is not allowed!
+```
+
+#### writable.setDefaultEncoding(encoding)
+
+* `encoding` {String} The new default encoding
+
+Sets the default encoding for a writable stream.
+
+#### writable.uncork()
+
+Flush all data, buffered since `.cork()` call.
+
+#### writable.write(chunk[, encoding][, callback])
+
+* `chunk` {String | Buffer} The data to write
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Callback for when this chunk of data is flushed
+* Returns: {Boolean} True if the data was handled completely.
+
+This method writes some data to the underlying system, and calls the
+supplied callback once the data has been fully handled.
+
+The return value indicates if you should continue writing right now.
+If the data had to be buffered internally, then it will return
+`false`. Otherwise, it will return `true`.
+
+This return value is strictly advisory. You MAY continue to write,
+even if it returns `false`. However, writes will be buffered in
+memory, so it is best not to do this excessively. Instead, wait for
+the `drain` event before writing more data.
+
+
+## API for Stream Implementors
+
+
+
+To implement any sort of stream, the pattern is the same:
+
+1. Extend the appropriate parent class in your own subclass. (The
+ [`util.inherits`][] method is particularly helpful for this.)
+2. Call the appropriate parent class constructor in your constructor,
+ to be sure that the internal mechanisms are set up properly.
+2. Implement one or more specific methods, as detailed below.
+
+The class to extend and the method(s) to implement depend on the sort
+of stream class you are writing:
+
+
+
+
+
+ Use-case
+
+
+ Class
+
+
+ Method(s) to implement
+
+
+
+
+
+ Reading only
+
+
+ [Readable](#stream_class_stream_readable_1)
+
+
+ [_read][]
+
+
+
+
+ Writing only
+
+
+ [Writable](#stream_class_stream_writable_1)
+
+
+ [_write][], _writev
+
+
+
+
+ Reading and writing
+
+
+ [Duplex](#stream_class_stream_duplex_1)
+
+
+ [_read][], [_write][], _writev
+
+
+
+
+ Operate on written data, then read the result
+
+
+ [Transform](#stream_class_stream_transform_1)
+
+
+ _transform, _flush
+
+
+
+
+In your implementation code, it is very important to never call the
+methods described in [API for Stream Consumers][] above. Otherwise, you
+can potentially cause adverse side effects in programs that consume
+your streaming interfaces.
+
+### Class: stream.Duplex
+
+
+
+A "duplex" stream is one that is both Readable and Writable, such as a
+TCP socket connection.
+
+Note that `stream.Duplex` is an abstract class designed to be extended
+with an underlying implementation of the `_read(size)` and
+[`_write(chunk, encoding, callback)`][] methods as you would with a
+Readable or Writable stream class.
+
+Since JavaScript doesn't have multiple prototypal inheritance, this
+class prototypally inherits from Readable, and then parasitically from
+Writable. It is thus up to the user to implement both the lowlevel
+`_read(n)` method as well as the lowlevel
+[`_write(chunk, encoding, callback)`][] method on extension duplex classes.
+
+#### new stream.Duplex(options)
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then
+ the stream will automatically end the readable side when the
+ writable side ends and vice versa.
+ * `readableObjectMode` {Boolean} Default=false. Sets `objectMode`
+ for readable side of the stream. Has no effect if `objectMode`
+ is `true`.
+ * `writableObjectMode` {Boolean} Default=false. Sets `objectMode`
+ for writable side of the stream. Has no effect if `objectMode`
+ is `true`.
+
+In classes that extend the Duplex class, make sure to call the
+constructor so that the buffering settings can be properly
+initialized.
+
+### Class: stream.PassThrough
+
+This is a trivial implementation of a [Transform][] stream that simply
+passes the input bytes across to the output. Its purpose is mainly
+for examples and testing, but there are occasionally use cases where
+it can come in handy as a building block for novel sorts of streams.
+
+### Class: stream.Readable
+
+
+
+`stream.Readable` is an abstract class designed to be extended with an
+underlying implementation of the [`_read(size)`][] method.
+
+Please see above under [API for Stream Consumers][] for how to consume
+streams in your programs. What follows is an explanation of how to
+implement Readable streams in your programs.
+
+#### new stream.Readable([options])
+
+* `options` {Object}
+ * `highWaterMark` {Number} The maximum number of bytes to store in
+ the internal buffer before ceasing to read from the underlying
+ resource. Default=16kb, or 16 for `objectMode` streams
+ * `encoding` {String} If specified, then buffers will be decoded to
+ strings using the specified encoding. Default=null
+ * `objectMode` {Boolean} Whether this stream should behave
+ as a stream of objects. Meaning that stream.read(n) returns
+ a single value instead of a Buffer of size n. Default=false
+
+In classes that extend the Readable class, make sure to call the
+Readable constructor so that the buffering settings can be properly
+initialized.
+
+#### readable.\_read(size)
+
+* `size` {Number} Number of bytes to read asynchronously
+
+Note: **Implement this method, but do NOT call it directly.**
+
+This method is prefixed with an underscore because it is internal to the
+class that defines it and should only be called by the internal Readable
+class methods. All Readable stream implementations must provide a _read
+method to fetch data from the underlying resource.
+
+When _read is called, if data is available from the resource, `_read` should
+start pushing that data into the read queue by calling `this.push(dataChunk)`.
+`_read` should continue reading from the resource and pushing data until push
+returns false, at which point it should stop reading from the resource. Only
+when _read is called again after it has stopped should it start reading
+more data from the resource and pushing that data onto the queue.
+
+Note: once the `_read()` method is called, it will not be called again until
+the `push` method is called.
+
+The `size` argument is advisory. Implementations where a "read" is a
+single call that returns data can use this to know how much data to
+fetch. Implementations where that is not relevant, such as TCP or
+TLS, may ignore this argument, and simply provide data whenever it
+becomes available. There is no need, for example to "wait" until
+`size` bytes are available before calling [`stream.push(chunk)`][].
+
+#### readable.push(chunk[, encoding])
+
+* `chunk` {Buffer | null | String} Chunk of data to push into the read queue
+* `encoding` {String} Encoding of String chunks. Must be a valid
+ Buffer encoding, such as `'utf8'` or `'ascii'`
+* return {Boolean} Whether or not more pushes should be performed
+
+Note: **This method should be called by Readable implementors, NOT
+by consumers of Readable streams.**
+
+If a value other than null is passed, The `push()` method adds a chunk of data
+into the queue for subsequent stream processors to consume. If `null` is
+passed, it signals the end of the stream (EOF), after which no more data
+can be written.
+
+The data added with `push` can be pulled out by calling the `read()` method
+when the `'readable'`event fires.
+
+This API is designed to be as flexible as possible. For example,
+you may be wrapping a lower-level source which has some sort of
+pause/resume mechanism, and a data callback. In those cases, you
+could wrap the low-level source object by doing something like this:
+
+```javascript
+// source is an object with readStop() and readStart() methods,
+// and an `ondata` member that gets called when it has data, and
+// an `onend` member that gets called when the data is over.
+
+util.inherits(SourceWrapper, Readable);
+
+function SourceWrapper(options) {
+ Readable.call(this, options);
+
+ this._source = getLowlevelSourceObject();
+ var self = this;
+
+ // Every time there's data, we push it into the internal buffer.
+ this._source.ondata = function(chunk) {
+ // if push() returns false, then we need to stop reading from source
+ if (!self.push(chunk))
+ self._source.readStop();
+ };
+
+ // When the source ends, we push the EOF-signaling `null` chunk
+ this._source.onend = function() {
+ self.push(null);
+ };
+}
+
+// _read will be called when the stream wants to pull more data in
+// the advisory size argument is ignored in this case.
+SourceWrapper.prototype._read = function(size) {
+ this._source.readStart();
+};
+```
+
+#### Example: A Counting Stream
+
+
+
+This is a basic example of a Readable stream. It emits the numerals
+from 1 to 1,000,000 in ascending order, and then ends.
+
+```javascript
+var Readable = require('stream').Readable;
+var util = require('util');
+util.inherits(Counter, Readable);
+
+function Counter(opt) {
+ Readable.call(this, opt);
+ this._max = 1000000;
+ this._index = 1;
+}
+
+Counter.prototype._read = function() {
+ var i = this._index++;
+ if (i > this._max)
+ this.push(null);
+ else {
+ var str = '' + i;
+ var buf = new Buffer(str, 'ascii');
+ this.push(buf);
+ }
+};
+```
+
+#### Example: SimpleProtocol v1 (Sub-optimal)
+
+This is similar to the `parseHeader` function described above, but
+implemented as a custom stream. Also, note that this implementation
+does not convert the incoming data to a string.
+
+However, this would be better implemented as a [Transform][] stream. See
+below for a better implementation.
+
+```javascript
+// A parser for a simple data protocol.
+// The "header" is a JSON object, followed by 2 \n characters, and
+// then a message body.
+//
+// NOTE: This can be done more simply as a Transform stream!
+// Using Readable directly for this is sub-optimal. See the
+// alternative example below under the Transform section.
+
+var Readable = require('stream').Readable;
+var util = require('util');
+
+util.inherits(SimpleProtocol, Readable);
+
+function SimpleProtocol(source, options) {
+ if (!(this instanceof SimpleProtocol))
+ return new SimpleProtocol(source, options);
+
+ Readable.call(this, options);
+ this._inBody = false;
+ this._sawFirstCr = false;
+
+ // source is a readable stream, such as a socket or file
+ this._source = source;
+
+ var self = this;
+ source.on('end', function() {
+ self.push(null);
+ });
+
+ // give it a kick whenever the source is readable
+ // read(0) will not consume any bytes
+ source.on('readable', function() {
+ self.read(0);
+ });
+
+ this._rawHeader = [];
+ this.header = null;
+}
+
+SimpleProtocol.prototype._read = function(n) {
+ if (!this._inBody) {
+ var chunk = this._source.read();
+
+ // if the source doesn't have data, we don't have data yet.
+ if (chunk === null)
+ return this.push('');
+
+ // check if the chunk has a \n\n
+ var split = -1;
+ for (var i = 0; i < chunk.length; i++) {
+ if (chunk[i] === 10) { // '\n'
+ if (this._sawFirstCr) {
+ split = i;
+ break;
+ } else {
+ this._sawFirstCr = true;
+ }
+ } else {
+ this._sawFirstCr = false;
+ }
+ }
+
+ if (split === -1) {
+ // still waiting for the \n\n
+ // stash the chunk, and try again.
+ this._rawHeader.push(chunk);
+ this.push('');
+ } else {
+ this._inBody = true;
+ var h = chunk.slice(0, split);
+ this._rawHeader.push(h);
+ var header = Buffer.concat(this._rawHeader).toString();
+ try {
+ this.header = JSON.parse(header);
+ } catch (er) {
+ this.emit('error', new Error('invalid simple protocol data'));
+ return;
+ }
+ // now, because we got some extra data, unshift the rest
+ // back into the read queue so that our consumer will see it.
+ var b = chunk.slice(split);
+ this.unshift(b);
+ // calling unshift by itself does not reset the reading state
+ // of the stream; since we're inside _read, doing an additional
+ // push('') will reset the state appropriately.
+ this.push('');
+
+ // and let them know that we are done parsing the header.
+ this.emit('header', this.header);
+ }
+ } else {
+ // from there on, just provide the data to our consumer.
+ // careful not to push(null), since that would indicate EOF.
+ var chunk = this._source.read();
+ if (chunk) this.push(chunk);
+ }
+};
+
+// Usage:
+// var parser = new SimpleProtocol(source);
+// Now parser is a readable stream that will emit 'header'
+// with the parsed header data.
+```
+
+### Class: stream.Transform
+
+A "transform" stream is a duplex stream where the output is causally
+connected in some way to the input, such as a [zlib][] stream or a
+[crypto][] stream.
+
+There is no requirement that the output be the same size as the input,
+the same number of chunks, or arrive at the same time. For example, a
+Hash stream will only ever have a single chunk of output which is
+provided when the input is ended. A zlib stream will produce output
+that is either much smaller or much larger than its input.
+
+Rather than implement the [`_read()`][] and [`_write()`][] methods, Transform
+classes must implement the `_transform()` method, and may optionally
+also implement the `_flush()` method. (See below.)
+
+#### new stream.Transform([options])
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors.
+
+In classes that extend the Transform class, make sure to call the
+constructor so that the buffering settings can be properly
+initialized.
+
+#### Events: 'finish' and 'end'
+
+The [`finish`][] and [`end`][] events are from the parent Writable
+and Readable classes respectively. The `finish` event is fired after
+`.end()` is called and all chunks have been processed by `_transform`,
+`end` is fired after all data has been output which is after the callback
+in `_flush` has been called.
+
+#### transform.\_flush(callback)
+
+* `callback` {Function} Call this function (optionally with an error
+ argument) when you are done flushing any remaining data.
+
+Note: **This function MUST NOT be called directly.** It MAY be implemented
+by child classes, and if so, will be called by the internal Transform
+class methods only.
+
+In some cases, your transform operation may need to emit a bit more
+data at the end of the stream. For example, a `Zlib` compression
+stream will store up some internal state so that it can optimally
+compress the output. At the end, however, it needs to do the best it
+can with what is left, so that the data will be complete.
+
+In those cases, you can implement a `_flush` method, which will be
+called at the very end, after all the written data is consumed, but
+before emitting `end` to signal the end of the readable side. Just
+like with `_transform`, call `transform.push(chunk)` zero or more
+times, as appropriate, and call `callback` when the flush operation is
+complete.
+
+This method is prefixed with an underscore because it is internal to
+the class that defines it, and should not be called directly by user
+programs. However, you **are** expected to override this method in
+your own extension classes.
+
+#### transform.\_transform(chunk, encoding, callback)
+
+* `chunk` {Buffer | String} The chunk to be transformed. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then this is the
+ encoding type. If chunk is a buffer, then this is the special
+ value - 'buffer', ignore it in this case.
+* `callback` {Function} Call this function (optionally with an error
+ argument and data) when you are done processing the supplied chunk.
+
+Note: **This function MUST NOT be called directly.** It should be
+implemented by child classes, and called by the internal Transform
+class methods only.
+
+All Transform stream implementations must provide a `_transform`
+method to accept input and produce output.
+
+`_transform` should do whatever has to be done in this specific
+Transform class, to handle the bytes being written, and pass them off
+to the readable portion of the interface. Do asynchronous I/O,
+process things, and so on.
+
+Call `transform.push(outputChunk)` 0 or more times to generate output
+from this input chunk, depending on how much data you want to output
+as a result of this chunk.
+
+Call the callback function only when the current chunk is completely
+consumed. Note that there may or may not be output as a result of any
+particular input chunk. If you supply a second argument to the callback
+it will be passed to the push method. In other words the following are
+equivalent:
+
+```javascript
+transform.prototype._transform = function (data, encoding, callback) {
+ this.push(data);
+ callback();
+};
+
+transform.prototype._transform = function (data, encoding, callback) {
+ callback(null, data);
+};
+```
+
+This method is prefixed with an underscore because it is internal to
+the class that defines it, and should not be called directly by user
+programs. However, you **are** expected to override this method in
+your own extension classes.
+
+#### Example: `SimpleProtocol` parser v2
+
+The example above of a simple protocol parser can be implemented
+simply by using the higher level [Transform][] stream class, similar to
+the `parseHeader` and `SimpleProtocol v1` examples above.
+
+In this example, rather than providing the input as an argument, it
+would be piped into the parser, which is a more idiomatic Node.js stream
+approach.
+
+```javascript
+var util = require('util');
+var Transform = require('stream').Transform;
+util.inherits(SimpleProtocol, Transform);
+
+function SimpleProtocol(options) {
+ if (!(this instanceof SimpleProtocol))
+ return new SimpleProtocol(options);
+
+ Transform.call(this, options);
+ this._inBody = false;
+ this._sawFirstCr = false;
+ this._rawHeader = [];
+ this.header = null;
+}
+
+SimpleProtocol.prototype._transform = function(chunk, encoding, done) {
+ if (!this._inBody) {
+ // check if the chunk has a \n\n
+ var split = -1;
+ for (var i = 0; i < chunk.length; i++) {
+ if (chunk[i] === 10) { // '\n'
+ if (this._sawFirstCr) {
+ split = i;
+ break;
+ } else {
+ this._sawFirstCr = true;
+ }
+ } else {
+ this._sawFirstCr = false;
+ }
+ }
+
+ if (split === -1) {
+ // still waiting for the \n\n
+ // stash the chunk, and try again.
+ this._rawHeader.push(chunk);
+ } else {
+ this._inBody = true;
+ var h = chunk.slice(0, split);
+ this._rawHeader.push(h);
+ var header = Buffer.concat(this._rawHeader).toString();
+ try {
+ this.header = JSON.parse(header);
+ } catch (er) {
+ this.emit('error', new Error('invalid simple protocol data'));
+ return;
+ }
+ // and let them know that we are done parsing the header.
+ this.emit('header', this.header);
+
+ // now, because we got some extra data, emit this first.
+ this.push(chunk.slice(split));
+ }
+ } else {
+ // from there on, just provide the data to our consumer as-is.
+ this.push(chunk);
+ }
+ done();
+};
+
+// Usage:
+// var parser = new SimpleProtocol();
+// source.pipe(parser)
+// Now parser is a readable stream that will emit 'header'
+// with the parsed header data.
+```
+
+### Class: stream.Writable
+
+
+
+`stream.Writable` is an abstract class designed to be extended with an
+underlying implementation of the [`_write(chunk, encoding, callback)`][] method.
+
+Please see above under [API for Stream Consumers][] for how to consume
+writable streams in your programs. What follows is an explanation of
+how to implement Writable streams in your programs.
+
+#### new stream.Writable([options])
+
+* `options` {Object}
+ * `highWaterMark` {Number} Buffer level when [`write()`][] starts
+ returning false. Default=16kb, or 16 for `objectMode` streams
+ * `decodeStrings` {Boolean} Whether or not to decode strings into
+ Buffers before passing them to [`_write()`][]. Default=true
+ * `objectMode` {Boolean} Whether or not the `write(anyObj)` is
+ a valid operation. If set you can write arbitrary data instead
+ of only `Buffer` / `String` data. Default=false
+
+In classes that extend the Writable class, make sure to call the
+constructor so that the buffering settings can be properly
+initialized.
+
+#### writable.\_write(chunk, encoding, callback)
+
+* `chunk` {Buffer | String} The chunk to be written. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then this is the
+ encoding type. If chunk is a buffer, then this is the special
+ value - 'buffer', ignore it in this case.
+* `callback` {Function} Call this function (optionally with an error
+ argument) when you are done processing the supplied chunk.
+
+All Writable stream implementations must provide a [`_write()`][]
+method to send data to the underlying resource.
+
+Note: **This function MUST NOT be called directly.** It should be
+implemented by child classes, and called by the internal Writable
+class methods only.
+
+Call the callback using the standard `callback(error)` pattern to
+signal that the write completed successfully or with an error.
+
+If the `decodeStrings` flag is set in the constructor options, then
+`chunk` may be a string rather than a Buffer, and `encoding` will
+indicate the sort of string that it is. This is to support
+implementations that have an optimized handling for certain string
+data encodings. If you do not explicitly set the `decodeStrings`
+option to `false`, then you can safely ignore the `encoding` argument,
+and assume that `chunk` will always be a Buffer.
+
+This method is prefixed with an underscore because it is internal to
+the class that defines it, and should not be called directly by user
+programs. However, you **are** expected to override this method in
+your own extension classes.
+
+#### writable.\_writev(chunks, callback)
+
+* `chunks` {Array} The chunks to be written. Each chunk has following
+ format: `{ chunk: ..., encoding: ... }`.
+* `callback` {Function} Call this function (optionally with an error
+ argument) when you are done processing the supplied chunks.
+
+Note: **This function MUST NOT be called directly.** It may be
+implemented by child classes, and called by the internal Writable
+class methods only.
+
+This function is completely optional to implement. In most cases it is
+unnecessary. If implemented, it will be called with all the chunks
+that are buffered in the write queue.
+
+
+## Simplified Constructor API
+
+
+
+In simple cases there is now the added benefit of being able to construct a stream without inheritance.
+
+This can be done by passing the appropriate methods as constructor options:
+
+Examples:
+
+### Duplex
+```javascript
+var duplex = new stream.Duplex({
+ read: function(n) {
+ // sets this._read under the hood
+
+ // push data onto the read queue, passing null
+ // will signal the end of the stream (EOF)
+ this.push(chunk);
+ },
+ write: function(chunk, encoding, next) {
+ // sets this._write under the hood
+
+ // An optional error can be passed as the first argument
+ next()
+ }
+});
+
+// or
+
+var duplex = new stream.Duplex({
+ read: function(n) {
+ // sets this._read under the hood
+
+ // push data onto the read queue, passing null
+ // will signal the end of the stream (EOF)
+ this.push(chunk);
+ },
+ writev: function(chunks, next) {
+ // sets this._writev under the hood
+
+ // An optional error can be passed as the first argument
+ next()
+ }
+});
+```
+
+### Readable
+```javascript
+var readable = new stream.Readable({
+ read: function(n) {
+ // sets this._read under the hood
+
+ // push data onto the read queue, passing null
+ // will signal the end of the stream (EOF)
+ this.push(chunk);
+ }
+});
+```
+
+### Transform
+```javascript
+var transform = new stream.Transform({
+ transform: function(chunk, encoding, next) {
+ // sets this._transform under the hood
+
+ // generate output as many times as needed
+ // this.push(chunk);
+
+ // call when the current chunk is consumed
+ next();
+ },
+ flush: function(done) {
+ // sets this._flush under the hood
+
+ // generate output as many times as needed
+ // this.push(chunk);
+
+ done();
+ }
+});
+```
+
+### Writable
+```javascript
+var writable = new stream.Writable({
+ write: function(chunk, encoding, next) {
+ // sets this._write under the hood
+
+ // An optional error can be passed as the first argument
+ next()
+ }
+});
+
+// or
+
+var writable = new stream.Writable({
+ writev: function(chunks, next) {
+ // sets this._writev under the hood
+
+ // An optional error can be passed as the first argument
+ next()
+ }
+});
+```
+
+## Streams: Under the Hood
+
+
+
+### Buffering
+
+
+
+Both Writable and Readable streams will buffer data on an internal
+object which can be retrieved from `_writableState.getBuffer()` or
+`_readableState.buffer`, respectively.
+
+The amount of data that will potentially be buffered depends on the
+`highWaterMark` option which is passed into the constructor.
+
+Buffering in Readable streams happens when the implementation calls
+[`stream.push(chunk)`][]. If the consumer of the Stream does not call
+`stream.read()`, then the data will sit in the internal queue until it
+is consumed.
+
+Buffering in Writable streams happens when the user calls
+[`stream.write(chunk)`][] repeatedly, even when `write()` returns `false`.
+
+The purpose of streams, especially with the `pipe()` method, is to
+limit the buffering of data to acceptable levels, so that sources and
+destinations of varying speed will not overwhelm the available memory.
+
+### Compatibility with Older Node.js Versions
+
+
+
+In versions of Node.js prior to v0.10, the Readable stream interface was
+simpler, but also less powerful and less useful.
+
+* Rather than waiting for you to call the `read()` method, `'data'`
+ events would start emitting immediately. If you needed to do some
+ I/O to decide how to handle data, then you had to store the chunks
+ in some kind of buffer so that they would not be lost.
+* The [`pause()`][] method was advisory, rather than guaranteed. This
+ meant that you still had to be prepared to receive `'data'` events
+ even when the stream was in a paused state.
+
+In Node.js v0.10, the Readable class described below was added.
+For backwards compatibility with older Node.js programs, Readable streams
+switch into "flowing mode" when a `'data'` event handler is added, or
+when the [`resume()`][] method is called. The effect is that, even if
+you are not using the new `read()` method and `'readable'` event, you
+no longer have to worry about losing `'data'` chunks.
+
+Most programs will continue to function normally. However, this
+introduces an edge case in the following conditions:
+
+* No [`'data'` event][] handler is added.
+* The [`resume()`][] method is never called.
+* The stream is not piped to any writable destination.
+
+For example, consider the following code:
+
+```javascript
+// WARNING! BROKEN!
+net.createServer(function(socket) {
+
+ // we add an 'end' method, but never consume the data
+ socket.on('end', function() {
+ // It will never get here.
+ socket.end('I got your message (but didnt read it)\n');
+ });
+
+}).listen(1337);
+```
+
+In versions of Node.js prior to v0.10, the incoming message data would be
+simply discarded. However, in Node.js v0.10 and beyond,
+the socket will remain paused forever.
+
+The workaround in this situation is to call the `resume()` method to
+start the flow of data:
+
+```javascript
+// Workaround
+net.createServer(function(socket) {
+
+ socket.on('end', function() {
+ socket.end('I got your message (but didnt read it)\n');
+ });
+
+ // start the flow of data, discarding it.
+ socket.resume();
+
+}).listen(1337);
+```
+
+In addition to new Readable streams switching into flowing mode,
+pre-v0.10 style streams can be wrapped in a Readable class using the
+`wrap()` method.
+
+
+### Object Mode
+
+
+
+Normally, Streams operate on Strings and Buffers exclusively.
+
+Streams that are in **object mode** can emit generic JavaScript values
+other than Buffers and Strings.
+
+A Readable stream in object mode will always return a single item from
+a call to `stream.read(size)`, regardless of what the size argument
+is.
+
+A Writable stream in object mode will always ignore the `encoding`
+argument to `stream.write(data, encoding)`.
+
+The special value `null` still retains its special value for object
+mode streams. That is, for object mode readable streams, `null` as a
+return value from `stream.read()` indicates that there is no more
+data, and [`stream.push(null)`][] will signal the end of stream data
+(`EOF`).
+
+No streams in Node.js core are object mode streams. This pattern is only
+used by userland streaming libraries.
+
+You should set `objectMode` in your stream child class constructor on
+the options object. Setting `objectMode` mid-stream is not safe.
+
+For Duplex streams `objectMode` can be set exclusively for readable or
+writable side with `readableObjectMode` and `writableObjectMode`
+respectively. These options can be used to implement parsers and
+serializers with Transform streams.
+
+```javascript
+var util = require('util');
+var StringDecoder = require('string_decoder').StringDecoder;
+var Transform = require('stream').Transform;
+util.inherits(JSONParseStream, Transform);
+
+// Gets \n-delimited JSON string data, and emits the parsed objects
+function JSONParseStream() {
+ if (!(this instanceof JSONParseStream))
+ return new JSONParseStream();
+
+ Transform.call(this, { readableObjectMode : true });
+
+ this._buffer = '';
+ this._decoder = new StringDecoder('utf8');
+}
+
+JSONParseStream.prototype._transform = function(chunk, encoding, cb) {
+ this._buffer += this._decoder.write(chunk);
+ // split on newlines
+ var lines = this._buffer.split(/\r?\n/);
+ // keep the last partial line buffered
+ this._buffer = lines.pop();
+ for (var l = 0; l < lines.length; l++) {
+ var line = lines[l];
+ try {
+ var obj = JSON.parse(line);
+ } catch (er) {
+ this.emit('error', er);
+ return;
+ }
+ // push the parsed object out to the readable consumer
+ this.push(obj);
+ }
+ cb();
+};
+
+JSONParseStream.prototype._flush = function(cb) {
+ // Just handle any leftover
+ var rem = this._buffer.trim();
+ if (rem) {
+ try {
+ var obj = JSON.parse(rem);
+ } catch (er) {
+ this.emit('error', er);
+ return;
+ }
+ // push the parsed object out to the readable consumer
+ this.push(obj);
+ }
+ cb();
+};
+```
+
+### `stream.read(0)`
+
+There are some cases where you want to trigger a refresh of the
+underlying readable stream mechanisms, without actually consuming any
+data. In that case, you can call `stream.read(0)`, which will always
+return null.
+
+If the internal read buffer is below the `highWaterMark`, and the
+stream is not currently reading, then calling `read(0)` will trigger
+a low-level `_read` call.
+
+There is almost never a need to do this. However, you will see some
+cases in Node.js's internals where this is done, particularly in the
+Readable stream class internals.
+
+### `stream.push('')`
+
+Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an
+interesting side effect. Because it *is* a call to
+[`stream.push()`][], it will end the `reading` process. However, it
+does *not* add any data to the readable buffer, so there's nothing for
+a user to consume.
+
+Very rarely, there are cases where you have no data to provide now,
+but the consumer of your stream (or, perhaps, another bit of your own
+code) will know when to check again, by calling `stream.read(0)`. In
+those cases, you *may* call `stream.push('')`.
+
+So far, the only use case for this functionality is in the
+[tls.CryptoStream][] class, which is deprecated in Node.js/io.js v1.0. If you
+find that you have to use `stream.push('')`, please consider another
+approach, because it almost certainly indicates that something is
+horribly wrong.
+
+[request to an HTTP server]: https://nodejs.org/docs/v5.1.0/api/http.html#http_http_incomingmessage
+[EventEmitter]: https://nodejs.org/docs/v5.1.0/api/events.html#events_class_events_eventemitter
+[Object mode]: #stream_object_mode
+[`stream.push(chunk)`]: #stream_readable_push_chunk_encoding
+[`stream.push(null)`]: #stream_readable_push_chunk_encoding
+[`stream.push()`]: #stream_readable_push_chunk_encoding
+[`unpipe()`]: #stream_readable_unpipe_destination
+[unpiped]: #stream_readable_unpipe_destination
+[tcp sockets]: https://nodejs.org/docs/v5.1.0/api/net.html#net_class_net_socket
+[http responses, on the client]: https://nodejs.org/docs/v5.1.0/api/http.html#http_http_incomingmessage
+[http requests, on the server]: https://nodejs.org/docs/v5.1.0/api/http.html#http_http_incomingmessage
+[http requests, on the client]: https://nodejs.org/docs/v5.1.0/api/http.html#http_class_http_clientrequest
+[http responses, on the server]: https://nodejs.org/docs/v5.1.0/api/http.html#http_class_http_serverresponse
+[fs read streams]: https://nodejs.org/docs/v5.1.0/api/fs.html#fs_class_fs_readstream
+[fs write streams]: https://nodejs.org/docs/v5.1.0/api/fs.html#fs_class_fs_writestream
+[zlib streams]: zlib.html
+[zlib]: zlib.html
+[crypto streams]: crypto.html
+[crypto]: crypto.html
+[tls.CryptoStream]: https://nodejs.org/docs/v5.1.0/api/tls.html#tls_class_cryptostream
+[process.stdin]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stdin
+[stdout]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stdout
+[process.stdout]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stdout
+[process.stderr]: https://nodejs.org/docs/v5.1.0/api/process.html#process_process_stderr
+[child process stdout and stderr]: https://nodejs.org/docs/v5.1.0/api/child_process.html#child_process_child_stdout
+[child process stdin]: https://nodejs.org/docs/v5.1.0/api/child_process.html#child_process_child_stdin
+[API for Stream Consumers]: #stream_api_for_stream_consumers
+[API for Stream Implementors]: #stream_api_for_stream_implementors
+[Readable]: #stream_class_stream_readable
+[Writable]: #stream_class_stream_writable
+[Duplex]: #stream_class_stream_duplex
+[Transform]: #stream_class_stream_transform
+[`end`]: #stream_event_end
+[`finish`]: #stream_event_finish
+[`_read(size)`]: #stream_readable_read_size_1
+[`_read()`]: #stream_readable_read_size_1
+[_read]: #stream_readable_read_size_1
+[`writable.write(chunk)`]: #stream_writable_write_chunk_encoding_callback
+[`write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback
+[`write()`]: #stream_writable_write_chunk_encoding_callback
+[`stream.write(chunk)`]: #stream_writable_write_chunk_encoding_callback
+[`_write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback_1
+[`_write()`]: #stream_writable_write_chunk_encoding_callback_1
+[_write]: #stream_writable_write_chunk_encoding_callback_1
+[`util.inherits`]: https://nodejs.org/docs/v5.1.0/api/util.html#util_util_inherits_constructor_superconstructor
+[`end()`]: #stream_writable_end_chunk_encoding_callback
+[`'data'` event]: #stream_event_data
+[`resume()`]: #stream_readable_resume
+[`readable.resume()`]: #stream_readable_resume
+[`pause()`]: #stream_readable_pause
+[`unpipe()`]: #stream_readable_unpipe_destination
+[`pipe()`]: #stream_readable_pipe_destination_options
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/source/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 000000000..83275f192
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,60 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
+
+
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/duplex.js b/source/node_modules/concat-stream/node_modules/readable-stream/duplex.js
new file mode 100644
index 000000000..ca807af87
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_duplex.js")
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 000000000..69558af03
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,82 @@
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/**/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
+/* */
+
+
+module.exports = Duplex;
+
+/**/
+var processNextTick = require('process-nextick-args');
+/* */
+
+
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+var keys = objectKeys(Writable.prototype);
+for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method])
+ Duplex.prototype[method] = Writable.prototype[method];
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex))
+ return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false)
+ this.readable = false;
+
+ if (options && options.writable === false)
+ this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false)
+ this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended)
+ return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ processNextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 000000000..bddfdd015
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,27 @@
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function(chunk, encoding, cb) {
+ cb(null, chunk);
+};
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 000000000..50852aee7
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,975 @@
+'use strict';
+
+module.exports = Readable;
+
+/**/
+var processNextTick = require('process-nextick-args');
+/* */
+
+
+/**/
+var isArray = require('isarray');
+/* */
+
+
+/**/
+var Buffer = require('buffer').Buffer;
+/* */
+
+Readable.ReadableState = ReadableState;
+
+var EE = require('events');
+
+/**/
+var EElistenerCount = function(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/* */
+
+
+
+/**/
+var Stream;
+(function (){try{
+ Stream = require('st' + 'ream');
+}catch(_){}finally{
+ if (!Stream)
+ Stream = require('events').EventEmitter;
+}}())
+/* */
+
+var Buffer = require('buffer').Buffer;
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+
+
+/**/
+var debugUtil = require('util');
+var debug;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/* */
+
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var Duplex;
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+var Duplex;
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable))
+ return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options && typeof options.read === 'function')
+ this._read = options.read;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function(chunk, encoding) {
+ var state = this._readableState;
+
+ if (!state.objectMode && typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function(chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+Readable.prototype.isPaused = function() {
+ return this._readableState.flowing === false;
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
+
+ if (!addToFront)
+ state.reading = false;
+
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront)
+ state.buffer.unshift(chunk);
+ else
+ state.buffer.push(chunk);
+
+ if (state.needReadable)
+ emitReadable(stream);
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &&
+ (state.needReadable ||
+ state.length < state.highWaterMark ||
+ state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function(enc) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+function howMuchToRead(n, state) {
+ if (state.length === 0 && state.ended)
+ return 0;
+
+ if (state.objectMode)
+ return n === 0 ? 0 : 1;
+
+ if (n === null || isNaN(n)) {
+ // only flow one buffer at a time
+ if (state.flowing && state.buffer.length)
+ return state.buffer[0].length;
+ else
+ return state.length;
+ }
+
+ if (n <= 0)
+ return 0;
+
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n > state.highWaterMark)
+ state.highWaterMark = computeNewHighWaterMark(n);
+
+ // don't have that much. return null, unless we've ended.
+ if (n > state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else {
+ return state.length;
+ }
+ }
+
+ return n;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function(n) {
+ debug('read', n);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (typeof n !== 'number' || n > 0)
+ state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &&
+ state.needReadable &&
+ (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended)
+ endReadable(this);
+ else
+ emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0)
+ endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ }
+
+ if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0)
+ state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (doRead && !state.reading)
+ n = howMuchToRead(nOrig, state);
+
+ var ret;
+ if (n > 0)
+ ret = fromList(n, state);
+ else
+ ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ }
+
+ state.length -= n;
+
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 && !state.ended)
+ state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended && state.length === 0)
+ endReadable(this);
+
+ if (ret !== null)
+ this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!(Buffer.isBuffer(chunk)) &&
+ typeof chunk !== 'string' &&
+ chunk !== null &&
+ chunk !== undefined &&
+ !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync)
+ processNextTick(emitReadable_, stream);
+ else
+ emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ processNextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended &&
+ state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;
+ else
+ len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function(n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function(dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
+ dest !== process.stdout &&
+ dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted)
+ processNextTick(endFn);
+ else
+ src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain &&
+ (!dest._writableState || dest._writableState.needDrain))
+ ondrain();
+ }
+
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ if (state.pipesCount === 1 &&
+ state.pipes[0] === dest &&
+ src.listenerCount('data') === 1 &&
+ !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0)
+ dest.emit('error', er);
+ }
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events || !dest._events.error)
+ dest.on('error', onerror);
+ else if (isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function() {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain)
+ state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+
+Readable.prototype.unpipe = function(dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0)
+ return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes)
+ return this;
+
+ if (!dest)
+ dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest)
+ dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++)
+ dests[i].emit('unpipe', this);
+ return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1)
+ return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1)
+ state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function(ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' && false !== this._readableState.flowing) {
+ this.resume();
+ }
+
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ processNextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function() {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ processNextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading)
+ stream.read(0);
+}
+
+Readable.prototype.pause = function() {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ if (state.flowing) {
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk && state.flowing);
+ }
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function(stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function() {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length)
+ self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function(chunk) {
+ debug('wrapped data');
+ if (state.decoder)
+ chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined))
+ return;
+ else if (!state.objectMode && (!chunk || !chunk.length))
+ return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function(method) { return function() {
+ return stream[method].apply(stream, arguments);
+ }; }(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function(ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function(n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+
+ // nothing in the list, definitely empty.
+ if (list.length === 0)
+ return null;
+
+ if (length === 0)
+ ret = null;
+ else if (objectMode)
+ ret = list.shift();
+ else if (!n || n >= length) {
+ // read it all, truncate the array.
+ if (stringMode)
+ ret = list.join('');
+ else if (list.length === 1)
+ ret = list[0];
+ else
+ ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n < list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode)
+ ret = '';
+ else
+ ret = new Buffer(n);
+
+ var c = 0;
+ for (var i = 0, l = list.length; i < l && c < n; i++) {
+ var buf = list[0];
+ var cpy = Math.min(n - c, buf.length);
+
+ if (stringMode)
+ ret += buf.slice(0, cpy);
+ else
+ buf.copy(ret, c, 0, cpy);
+
+ if (cpy < buf.length)
+ list[0] = buf.slice(cpy);
+ else
+ list.shift();
+
+ c += cpy;
+ }
+ }
+ }
+
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0)
+ throw new Error('endReadable called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ processNextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf (xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 000000000..3675d18d9
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,197 @@
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+util.inherits(Transform, Duplex);
+
+
+function TransformState(stream) {
+ this.afterTransform = function(er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb)
+ return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data !== null && data !== undefined)
+ stream.push(data);
+
+ if (cb)
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+
+function Transform(options) {
+ if (!(this instanceof Transform))
+ return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function')
+ this._transform = options.transform;
+
+ if (typeof options.flush === 'function')
+ this._flush = options.flush;
+ }
+
+ this.once('prefinish', function() {
+ if (typeof this._flush === 'function')
+ this._flush(function(er) {
+ done(stream, er);
+ });
+ else
+ done(stream);
+ });
+}
+
+Transform.prototype.push = function(chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function(chunk, encoding, cb) {
+ throw new Error('not implemented');
+};
+
+Transform.prototype._write = function(chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform ||
+ rs.needReadable ||
+ rs.length < rs.highWaterMark)
+ this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function(n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+
+function done(stream, er) {
+ if (er)
+ return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length)
+ throw new Error('calling transform done when ws.length != 0');
+
+ if (ts.transforming)
+ throw new Error('calling transform done when still transforming');
+
+ return stream.push(null);
+}
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 000000000..1fa5eb695
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,529 @@
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+module.exports = Writable;
+
+/**/
+var processNextTick = require('process-nextick-args');
+/* */
+
+
+/**/
+var Buffer = require('buffer').Buffer;
+/* */
+
+Writable.WritableState = WritableState;
+
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+
+/**/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/* */
+
+
+
+/**/
+var Stream;
+(function (){try{
+ Stream = require('st' + 'ream');
+}catch(_){}finally{
+ if (!Stream)
+ Stream = require('events').EventEmitter;
+}}())
+/* */
+
+var Buffer = require('buffer').Buffer;
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+var Duplex;
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function(er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+}
+
+WritableState.prototype.getBuffer = function writableStateGetBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function (){try {
+Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function() {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' +
+ 'instead.')
+});
+}catch(_){}}());
+
+
+var Duplex;
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function')
+ this._write = options.write;
+
+ if (typeof options.writev === 'function')
+ this._writev = options.writev;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function() {
+ this.emit('error', new Error('Cannot pipe. Not readable.'));
+};
+
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ processNextTick(cb, er);
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+
+ if (!(Buffer.isBuffer(chunk)) &&
+ typeof chunk !== 'string' &&
+ chunk !== null &&
+ chunk !== undefined &&
+ !state.objectMode) {
+ var er = new TypeError('Invalid non-string/buffer chunk');
+ stream.emit('error', er);
+ processNextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function(chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (Buffer.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function')
+ cb = nop;
+
+ if (state.ended)
+ writeAfterEnd(this, cb);
+ else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function() {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function() {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing &&
+ !state.corked &&
+ !state.finished &&
+ !state.bufferProcessing &&
+ state.bufferedRequest)
+ clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string')
+ encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64',
+'ucs2', 'ucs-2','utf16le', 'utf-16le', 'raw']
+.indexOf((encoding + '').toLowerCase()) > -1))
+ throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &&
+ state.decodeStrings !== false &&
+ typeof chunk === 'string') {
+ chunk = new Buffer(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+
+ if (Buffer.isBuffer(chunk))
+ encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret)
+ state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev)
+ stream._writev(chunk, state.onwrite);
+ else
+ stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+ if (sync)
+ processNextTick(cb, er);
+ else
+ cb(er);
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er)
+ onwriteError(stream, state, sync, er, cb);
+ else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished &&
+ !state.corked &&
+ !state.bufferProcessing &&
+ state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ processNextTick(afterWrite, stream, state, finished, cb);
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished)
+ onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var buffer = [];
+ var cbs = [];
+ while (entry) {
+ cbs.push(entry.callback);
+ buffer.push(entry);
+ entry = entry.next;
+ }
+
+ // count the one we are adding, as well.
+ // TODO(isaacs) clean this up
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ doWrite(stream, state, true, state.length, buffer, '', function(err) {
+ for (var i = 0; i < cbs.length; i++) {
+ state.pendingcb--;
+ cbs[i](err);
+ }
+ });
+
+ // Clear buffer
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null)
+ state.lastBufferedRequest = null;
+ }
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function(chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function(chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined)
+ this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished)
+ endWritable(this, state, cb);
+};
+
+
+function needFinish(state) {
+ return (state.ending &&
+ state.length === 0 &&
+ state.bufferedRequest === null &&
+ !state.finished &&
+ !state.writing);
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else {
+ prefinish(stream, state);
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished)
+ processNextTick(cb);
+ else
+ stream.once('finish', cb);
+ }
+ state.ended = true;
+}
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/package.json b/source/node_modules/concat-stream/node_modules/readable-stream/package.json
new file mode 100644
index 000000000..4e5fee976
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/package.json
@@ -0,0 +1,101 @@
+{
+ "_args": [
+ [
+ "readable-stream@~2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/concat-stream"
+ ]
+ ],
+ "_from": "readable-stream@>=2.0.0 <2.1.0",
+ "_id": "readable-stream@2.0.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/concat-stream/readable-stream",
+ "_nodeVersion": "5.1.1",
+ "_npmUser": {
+ "email": "calvin.metcalf@gmail.com",
+ "name": "cwmma"
+ },
+ "_npmVersion": "3.3.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "readable-stream",
+ "raw": "readable-stream@~2.0.0",
+ "rawSpec": "~2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <2.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz",
+ "_shasum": "a2426f8dcd4551c77a33f96edf2886a23c829669",
+ "_shrinkwrap": null,
+ "_spec": "readable-stream@~2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/concat-stream",
+ "browser": {
+ "util": false
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "process-nextick-args": "~1.0.6",
+ "string_decoder": "~0.10.x",
+ "util-deprecate": "~1.0.1"
+ },
+ "description": "Streams3, a user-land copy of the stream library from iojs v2.x",
+ "devDependencies": {
+ "tap": "~0.2.6",
+ "tape": "~4.0.0",
+ "zuul": "~3.0.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "a2426f8dcd4551c77a33f96edf2886a23c829669",
+ "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz"
+ },
+ "gitHead": "a4f23d8e451267684a8160679ce16e16149fe72b",
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "pipe",
+ "readable",
+ "stream"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "name": "readable-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "browser": "npm run write-zuul && zuul -- test/browser.js",
+ "test": "tap test/parallel/*.js",
+ "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
+ },
+ "version": "2.0.5"
+}
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/passthrough.js b/source/node_modules/concat-stream/node_modules/readable-stream/passthrough.js
new file mode 100644
index 000000000..27e8d8a55
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_passthrough.js")
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/readable.js b/source/node_modules/concat-stream/node_modules/readable-stream/readable.js
new file mode 100644
index 000000000..6222a5798
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/readable.js
@@ -0,0 +1,12 @@
+var Stream = (function (){
+ try {
+ return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify
+ } catch(_){}
+}());
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = Stream || exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/transform.js b/source/node_modules/concat-stream/node_modules/readable-stream/transform.js
new file mode 100644
index 000000000..5d482f078
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_transform.js")
diff --git a/source/node_modules/concat-stream/node_modules/readable-stream/writable.js b/source/node_modules/concat-stream/node_modules/readable-stream/writable.js
new file mode 100644
index 000000000..e1e9efdf3
--- /dev/null
+++ b/source/node_modules/concat-stream/node_modules/readable-stream/writable.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_writable.js")
diff --git a/source/node_modules/concat-stream/package.json b/source/node_modules/concat-stream/package.json
new file mode 100644
index 000000000..d66f2a1e7
--- /dev/null
+++ b/source/node_modules/concat-stream/package.json
@@ -0,0 +1,113 @@
+{
+ "_args": [
+ [
+ "concat-stream@^1.4.7",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/spawn-sync"
+ ]
+ ],
+ "_from": "concat-stream@>=1.4.7 <2.0.0",
+ "_id": "concat-stream@1.5.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/concat-stream",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "max@maxogden.com",
+ "name": "maxogden"
+ },
+ "_npmVersion": "2.14.2",
+ "_phantomChildren": {
+ "core-util-is": "1.0.2",
+ "inherits": "2.0.1",
+ "isarray": "0.0.1",
+ "process-nextick-args": "1.0.6",
+ "string_decoder": "0.10.31",
+ "util-deprecate": "1.0.2"
+ },
+ "_requested": {
+ "name": "concat-stream",
+ "raw": "concat-stream@^1.4.7",
+ "rawSpec": "^1.4.7",
+ "scope": null,
+ "spec": ">=1.4.7 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/spawn-sync"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz",
+ "_shasum": "f3b80acf9e1f48e3875c0688b41b6c31602eea1c",
+ "_shrinkwrap": null,
+ "_spec": "concat-stream@^1.4.7",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/spawn-sync",
+ "author": {
+ "email": "max@maxogden.com",
+ "name": "Max Ogden"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "readable-stream": "~2.0.0",
+ "typedarray": "~0.0.5"
+ },
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "f3b80acf9e1f48e3875c0688b41b6c31602eea1c",
+ "tarball": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "522adc12d82f57c691a5f946fbc8ba08718dcdcb",
+ "homepage": "https://github.com/maxogden/concat-stream#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "maxogden",
+ "email": "max@maxogden.com"
+ }
+ ],
+ "name": "concat-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "tags": [
+ "simple",
+ "stream",
+ "util",
+ "utility"
+ ],
+ "testling": {
+ "browsers": [
+ "android-browser/4.2..latest",
+ "chrome/22..latest",
+ "chrome/canary",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "ie/8..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest"
+ ],
+ "files": "test/*.js"
+ },
+ "version": "1.5.1"
+}
diff --git a/source/node_modules/concat-stream/readme.md b/source/node_modules/concat-stream/readme.md
new file mode 100644
index 000000000..1a16af94c
--- /dev/null
+++ b/source/node_modules/concat-stream/readme.md
@@ -0,0 +1,100 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[](https://travis-ci.org/maxogden/concat-stream)
+
+[](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/source/node_modules/config-chain/.npmignore b/source/node_modules/config-chain/.npmignore
new file mode 100644
index 000000000..13abef4f5
--- /dev/null
+++ b/source/node_modules/config-chain/.npmignore
@@ -0,0 +1,3 @@
+node_modules
+node_modules/*
+npm_debug.log
diff --git a/source/node_modules/config-chain/LICENCE b/source/node_modules/config-chain/LICENCE
new file mode 100644
index 000000000..171dd9700
--- /dev/null
+++ b/source/node_modules/config-chain/LICENCE
@@ -0,0 +1,22 @@
+Copyright (c) 2011 Dominic Tarr
+
+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.
\ No newline at end of file
diff --git a/source/node_modules/config-chain/index.js b/source/node_modules/config-chain/index.js
new file mode 100755
index 000000000..0ef3a91f7
--- /dev/null
+++ b/source/node_modules/config-chain/index.js
@@ -0,0 +1,282 @@
+var ProtoList = require('proto-list')
+ , path = require('path')
+ , fs = require('fs')
+ , ini = require('ini')
+ , EE = require('events').EventEmitter
+ , url = require('url')
+ , http = require('http')
+
+var exports = module.exports = function () {
+ var args = [].slice.call(arguments)
+ , conf = new ConfigChain()
+
+ while(args.length) {
+ var a = args.shift()
+ if(a) conf.push
+ ( 'string' === typeof a
+ ? json(a)
+ : a )
+ }
+
+ return conf
+}
+
+//recursively find a file...
+
+var find = exports.find = function () {
+ var rel = path.join.apply(null, [].slice.call(arguments))
+
+ function find(start, rel) {
+ var file = path.join(start, rel)
+ try {
+ fs.statSync(file)
+ return file
+ } catch (err) {
+ if(path.dirname(start) !== start) // root
+ return find(path.dirname(start), rel)
+ }
+ }
+ return find(__dirname, rel)
+}
+
+var parse = exports.parse = function (content, file, type) {
+ content = '' + content
+ // if we don't know what it is, try json and fall back to ini
+ // if we know what it is, then it must be that.
+ if (!type) {
+ try { return JSON.parse(content) }
+ catch (er) { return ini.parse(content) }
+ } else if (type === 'json') {
+ if (this.emit) {
+ try { return JSON.parse(content) }
+ catch (er) { this.emit('error', er) }
+ } else {
+ return JSON.parse(content)
+ }
+ } else {
+ return ini.parse(content)
+ }
+}
+
+var json = exports.json = function () {
+ var args = [].slice.call(arguments).filter(function (arg) { return arg != null })
+ var file = path.join.apply(null, args)
+ var content
+ try {
+ content = fs.readFileSync(file,'utf-8')
+ } catch (err) {
+ return
+ }
+ return parse(content, file, 'json')
+}
+
+var env = exports.env = function (prefix, env) {
+ env = env || process.env
+ var obj = {}
+ var l = prefix.length
+ for(var k in env) {
+ if(k.indexOf(prefix) === 0)
+ obj[k.substring(l)] = env[k]
+ }
+
+ return obj
+}
+
+exports.ConfigChain = ConfigChain
+function ConfigChain () {
+ EE.apply(this)
+ ProtoList.apply(this, arguments)
+ this._awaiting = 0
+ this._saving = 0
+ this.sources = {}
+}
+
+// multi-inheritance-ish
+var extras = {
+ constructor: { value: ConfigChain }
+}
+Object.keys(EE.prototype).forEach(function (k) {
+ extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k)
+})
+ConfigChain.prototype = Object.create(ProtoList.prototype, extras)
+
+ConfigChain.prototype.del = function (key, where) {
+ // if not specified where, then delete from the whole chain, scorched
+ // earth style
+ if (where) {
+ var target = this.sources[where]
+ target = target && target.data
+ if (!target) {
+ return this.emit('error', new Error('not found '+where))
+ }
+ delete target[key]
+ } else {
+ for (var i = 0, l = this.list.length; i < l; i ++) {
+ delete this.list[i][key]
+ }
+ }
+ return this
+}
+
+ConfigChain.prototype.set = function (key, value, where) {
+ var target
+
+ if (where) {
+ target = this.sources[where]
+ target = target && target.data
+ if (!target) {
+ return this.emit('error', new Error('not found '+where))
+ }
+ } else {
+ target = this.list[0]
+ if (!target) {
+ return this.emit('error', new Error('cannot set, no confs!'))
+ }
+ }
+ target[key] = value
+ return this
+}
+
+ConfigChain.prototype.get = function (key, where) {
+ if (where) {
+ where = this.sources[where]
+ if (where) where = where.data
+ if (where && Object.hasOwnProperty.call(where, key)) return where[key]
+ return undefined
+ }
+ return this.list[0][key]
+}
+
+ConfigChain.prototype.save = function (where, type, cb) {
+ if (typeof type === 'function') cb = type, type = null
+ var target = this.sources[where]
+ if (!target || !(target.path || target.source) || !target.data) {
+ // TODO: maybe save() to a url target could be a PUT or something?
+ // would be easy to swap out with a reddis type thing, too
+ return this.emit('error', new Error('bad save target: '+where))
+ }
+
+ if (target.source) {
+ var pref = target.prefix || ''
+ Object.keys(target.data).forEach(function (k) {
+ target.source[pref + k] = target.data[k]
+ })
+ return this
+ }
+
+ var type = type || target.type
+ var data = target.data
+ if (target.type === 'json') {
+ data = JSON.stringify(data)
+ } else {
+ data = ini.stringify(data)
+ }
+
+ this._saving ++
+ fs.writeFile(target.path, data, 'utf8', function (er) {
+ this._saving --
+ if (er) {
+ if (cb) return cb(er)
+ else return this.emit('error', er)
+ }
+ if (this._saving === 0) {
+ if (cb) cb()
+ this.emit('save')
+ }
+ }.bind(this))
+ return this
+}
+
+ConfigChain.prototype.addFile = function (file, type, name) {
+ name = name || file
+ var marker = {__source__:name}
+ this.sources[name] = { path: file, type: type }
+ this.push(marker)
+ this._await()
+ fs.readFile(file, 'utf8', function (er, data) {
+ if (er) this.emit('error', er)
+ this.addString(data, file, type, marker)
+ }.bind(this))
+ return this
+}
+
+ConfigChain.prototype.addEnv = function (prefix, env, name) {
+ name = name || 'env'
+ var data = exports.env(prefix, env)
+ this.sources[name] = { data: data, source: env, prefix: prefix }
+ return this.add(data, name)
+}
+
+ConfigChain.prototype.addUrl = function (req, type, name) {
+ this._await()
+ var href = url.format(req)
+ name = name || href
+ var marker = {__source__:name}
+ this.sources[name] = { href: href, type: type }
+ this.push(marker)
+ http.request(req, function (res) {
+ var c = []
+ var ct = res.headers['content-type']
+ if (!type) {
+ type = ct.indexOf('json') !== -1 ? 'json'
+ : ct.indexOf('ini') !== -1 ? 'ini'
+ : href.match(/\.json$/) ? 'json'
+ : href.match(/\.ini$/) ? 'ini'
+ : null
+ marker.type = type
+ }
+
+ res.on('data', c.push.bind(c))
+ .on('end', function () {
+ this.addString(Buffer.concat(c), href, type, marker)
+ }.bind(this))
+ .on('error', this.emit.bind(this, 'error'))
+
+ }.bind(this))
+ .on('error', this.emit.bind(this, 'error'))
+ .end()
+
+ return this
+}
+
+ConfigChain.prototype.addString = function (data, file, type, marker) {
+ data = this.parse(data, file, type)
+ this.add(data, marker)
+ return this
+}
+
+ConfigChain.prototype.add = function (data, marker) {
+ if (marker && typeof marker === 'object') {
+ var i = this.list.indexOf(marker)
+ if (i === -1) {
+ return this.emit('error', new Error('bad marker'))
+ }
+ this.splice(i, 1, data)
+ marker = marker.__source__
+ this.sources[marker] = this.sources[marker] || {}
+ this.sources[marker].data = data
+ // we were waiting for this. maybe emit 'load'
+ this._resolve()
+ } else {
+ if (typeof marker === 'string') {
+ this.sources[marker] = this.sources[marker] || {}
+ this.sources[marker].data = data
+ }
+ // trigger the load event if nothing was already going to do so.
+ this._await()
+ this.push(data)
+ process.nextTick(this._resolve.bind(this))
+ }
+ return this
+}
+
+ConfigChain.prototype.parse = exports.parse
+
+ConfigChain.prototype._await = function () {
+ this._awaiting++
+}
+
+ConfigChain.prototype._resolve = function () {
+ this._awaiting--
+ if (this._awaiting === 0) this.emit('load', this)
+}
diff --git a/source/node_modules/config-chain/package.json b/source/node_modules/config-chain/package.json
new file mode 100644
index 000000000..5b1e87181
--- /dev/null
+++ b/source/node_modules/config-chain/package.json
@@ -0,0 +1,86 @@
+{
+ "_args": [
+ [
+ "config-chain@~1.1.8",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/npmconf"
+ ]
+ ],
+ "_from": "config-chain@>=1.1.8 <1.2.0",
+ "_id": "config-chain@1.1.10",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/config-chain",
+ "_nodeVersion": "5.3.0",
+ "_npmUser": {
+ "email": "dominic.tarr@gmail.com",
+ "name": "dominictarr"
+ },
+ "_npmVersion": "3.3.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "config-chain",
+ "raw": "config-chain@~1.1.8",
+ "rawSpec": "~1.1.8",
+ "scope": null,
+ "spec": ">=1.1.8 <1.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/npmconf"
+ ],
+ "_resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz",
+ "_shasum": "7fc383de0fcc84d711cb465bd176579cad612346",
+ "_shrinkwrap": null,
+ "_spec": "config-chain@~1.1.8",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/npmconf",
+ "author": {
+ "email": "dominic.tarr@gmail.com",
+ "name": "Dominic Tarr",
+ "url": "http://dominictarr.com"
+ },
+ "bugs": {
+ "url": "https://github.com/dominictarr/config-chain/issues"
+ },
+ "dependencies": {
+ "ini": "^1.3.4",
+ "proto-list": "~1.2.1"
+ },
+ "description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
+ "devDependencies": {
+ "tap": "0.3.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "7fc383de0fcc84d711cb465bd176579cad612346",
+ "tarball": "http://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz"
+ },
+ "gitHead": "0b6db3e14b9cdbe31460292bc4caf3983f977816",
+ "homepage": "http://github.com/dominictarr/config-chain",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.githubusercontent.com/dominictarr/config-chain/master/LICENCE"
+ }
+ ],
+ "maintainers": [
+ {
+ "name": "dominictarr",
+ "email": "dominic.tarr@gmail.com"
+ },
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "config-chain",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/dominictarr/config-chain.git"
+ },
+ "scripts": {
+ "test": "tap test/"
+ },
+ "version": "1.1.10"
+}
diff --git a/source/node_modules/config-chain/readme.markdown b/source/node_modules/config-chain/readme.markdown
new file mode 100644
index 000000000..c83a43067
--- /dev/null
+++ b/source/node_modules/config-chain/readme.markdown
@@ -0,0 +1,228 @@
+#config-chain
+
+USE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS
+
+``` js
+
+ //npm install config-chain
+
+ var cc = require('config-chain')
+ , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.
+ , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.
+
+ // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN
+ // EARLIER ITEMS OVERIDE LATER ITEMS
+ // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!
+
+ //strings are interpereted as filenames.
+ //will be loaded synchronously
+
+ var conf =
+ cc(
+ //OVERRIDE SETTINGS WITH COMMAND LINE OPTS
+ opts,
+
+ //ENV VARS IF PREFIXED WITH 'myApp_'
+
+ cc.env('myApp_'), //myApp_foo = 'like this'
+
+ //FILE NAMED BY ENV
+ path.join(__dirname, 'config.' + env + '.json'),
+
+ //IF `env` is PRODUCTION
+ env === 'prod'
+ ? path.join(__dirname, 'special.json') //load a special file
+ : null //NULL IS IGNORED!
+
+ //SUBDIR FOR ENV CONFIG
+ path.join(__dirname, 'config', env, 'config.json'),
+
+ //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE
+ cc.find('config.json'),
+
+ //PUT DEFAULTS LAST
+ {
+ host: 'localhost'
+ port: 8000
+ })
+
+ var host = conf.get('host')
+
+ // or
+
+ var host = conf.store.host
+
+```
+
+FINALLY, EASY FLEXIBLE CONFIGURATIONS!
+
+##see also: [proto-list](https://github.com/isaacs/proto-list/)
+
+WHATS THAT YOU SAY?
+
+YOU WANT A "CLASS" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS?
+
+EXTEND WITH YOUR OWN FUNCTIONALTY!?
+
+## CONFIGCHAIN LIVES TO SERVE ONLY YOU!
+
+```javascript
+var cc = require('config-chain')
+
+// all the stuff you did before
+var config = cc({
+ some: 'object'
+ },
+ cc.find('config.json'),
+ cc.env('myApp_')
+ )
+ // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG!
+ .addUrl('http://configurator:1234/my-configs')
+ // ASYNC FTW!
+ .addFile('/path/to/file.json')
+
+ // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT
+ // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST
+ // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE
+ .add({ another: 'object' })
+
+ // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!
+ .on('error', function (er) {
+ // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW
+ // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\
+ throw er
+ })
+
+ // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!
+ .on('load', function (config) {
+ console.awesome('HOLY SHIT!')
+ })
+```
+
+# BORING API DOCS
+
+## cc(...args)
+
+MAKE A CHAIN AND ADD ALL THE ARGS.
+
+If the arg is a STRING, then it shall be a JSON FILENAME.
+
+SYNC I/O!
+
+RETURN THE CHAIN!
+
+## cc.json(...args)
+
+Join the args INTO A JSON FILENAME!
+
+SYNC I/O!
+
+## cc.find(relativePath)
+
+SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.
+
+RETURN THE FOUND PATH!
+
+SYNC I/O!
+
+## cc.parse(content, file, type)
+
+Parse the content string, and guess the type from either the
+specified type or the filename.
+
+RETURN THE RESULTING OBJECT!
+
+NO I/O!
+
+## cc.env(prefix, env=process.env)
+
+Get all the keys on the provided env object (or process.env) which are
+prefixed by the specified prefix, and put the values on a new object.
+
+RETURN THE RESULTING OBJECT!
+
+NO I/O!
+
+## cc.ConfigChain()
+
+The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!
+
+One of these is returned by the main exported function, as well.
+
+It inherits (prototypically) from
+[ProtoList](https://github.com/isaacs/proto-list/), and also inherits
+(parasitically) from
+[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)
+
+It has all the methods from both, and except where noted, they are
+unchanged.
+
+### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.
+
+## chain.sources
+
+A list of all the places where it got stuff. The keys are the names
+passed to addFile or addUrl etc, and the value is an object with some
+info about the data source.
+
+## chain.addFile(filename, type, [name=filename])
+
+Filename is the name of the file. Name is an arbitrary string to be
+used later if you desire. Type is either 'ini' or 'json', and will
+try to guess intelligently if omitted.
+
+Loaded files can be saved later.
+
+## chain.addUrl(url, type, [name=url])
+
+Same as the filename thing, but with a url.
+
+Can't be saved later.
+
+## chain.addEnv(prefix, env, [name='env'])
+
+Add all the keys from the env object that start with the prefix.
+
+## chain.addString(data, file, type, [name])
+
+Parse the string and add it to the set. (Mainly used internally.)
+
+## chain.add(object, [name])
+
+Add the object to the set.
+
+## chain.root {Object}
+
+The root from which all the other config objects in the set descend
+prototypically.
+
+Put your defaults here.
+
+## chain.set(key, value, name)
+
+Set the key to the value on the named config object. If name is
+unset, then set it on the first config object in the set. (That is,
+the one with the highest priority, which was added first.)
+
+## chain.get(key, [name])
+
+Get the key from the named config object explicitly, or from the
+resolved configs if not specified.
+
+## chain.save(name, type)
+
+Write the named config object back to its origin.
+
+Currently only supported for env and file config types.
+
+For files, encode the data according to the type.
+
+## chain.on('save', function () {})
+
+When one or more files are saved, emits `save` event when they're all
+saved.
+
+## chain.on('load', function (chain) {})
+
+When the config chain has loaded all the specified files and urls and
+such, the 'load' event fires.
diff --git a/source/node_modules/config-chain/test/broken.js b/source/node_modules/config-chain/test/broken.js
new file mode 100644
index 000000000..101a3e4f5
--- /dev/null
+++ b/source/node_modules/config-chain/test/broken.js
@@ -0,0 +1,10 @@
+
+
+var cc = require('..')
+var assert = require('assert')
+
+
+//throw on invalid json
+assert.throws(function () {
+ cc(__dirname + '/broken.json')
+})
diff --git a/source/node_modules/config-chain/test/broken.json b/source/node_modules/config-chain/test/broken.json
new file mode 100644
index 000000000..2107ac18d
--- /dev/null
+++ b/source/node_modules/config-chain/test/broken.json
@@ -0,0 +1,21 @@
+{
+ "name": "config-chain",
+ "version": "0.3.0",
+ "description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
+ "homepage": "http://github.com/dominictarr/config-chain",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dominictarr/config-chain.git"
+ }
+ //missing , and then this comment. this json is intensionally invalid
+ "dependencies": {
+ "proto-list": "1",
+ "ini": "~1.0.2"
+ },
+ "bundleDependencies": ["ini"],
+ "REM": "REMEMBER TO REMOVE BUNDLING WHEN/IF ISAACS MERGES ini#7",
+ "author": "Dominic Tarr (http://dominictarr.com)",
+ "scripts": {
+ "test": "node test/find-file.js && node test/ini.js && node test/env.js"
+ }
+}
diff --git a/source/node_modules/config-chain/test/chain-class.js b/source/node_modules/config-chain/test/chain-class.js
new file mode 100644
index 000000000..bbc0d4cb2
--- /dev/null
+++ b/source/node_modules/config-chain/test/chain-class.js
@@ -0,0 +1,100 @@
+var test = require('tap').test
+var CC = require('../index.js').ConfigChain
+
+var env = { foo_blaz : 'blzaa', foo_env : 'myenv' }
+var jsonObj = { blaz: 'json', json: true }
+var iniObj = { 'x.y.z': 'xyz', blaz: 'ini' }
+
+var fs = require('fs')
+var ini = require('ini')
+
+fs.writeFileSync('/tmp/config-chain-class.json', JSON.stringify(jsonObj))
+fs.writeFileSync('/tmp/config-chain-class.ini', ini.stringify(iniObj))
+
+var http = require('http')
+var reqs = 0
+http.createServer(function (q, s) {
+ if (++reqs === 2) this.close()
+ if (q.url === '/json') {
+ // make sure that the requests come back from the server
+ // out of order. they should still be ordered properly
+ // in the resulting config object set.
+ setTimeout(function () {
+ s.setHeader('content-type', 'application/json')
+ s.end(JSON.stringify({
+ blaz: 'http',
+ http: true,
+ json: true
+ }))
+ }, 200)
+ } else {
+ s.setHeader('content-type', 'application/ini')
+ s.end(ini.stringify({
+ blaz: 'http',
+ http: true,
+ ini: true,
+ json: false
+ }))
+ }
+}).listen(1337)
+
+test('basic class test', function (t) {
+ var cc = new CC()
+ var expectlist =
+ [ { blaz: 'json', json: true },
+ { 'x.y.z': 'xyz', blaz: 'ini' },
+ { blaz: 'blzaa', env: 'myenv' },
+ { blaz: 'http', http: true, json: true },
+ { blaz: 'http', http: true, ini: true, json: false } ]
+
+ cc.addFile('/tmp/config-chain-class.json')
+ .addFile('/tmp/config-chain-class.ini')
+ .addEnv('foo_', env)
+ .addUrl('http://localhost:1337/json')
+ .addUrl('http://localhost:1337/ini')
+ .on('load', function () {
+ t.same(cc.list, expectlist)
+ t.same(cc.snapshot, { blaz: 'json',
+ json: true,
+ 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ ini: true })
+
+ cc.del('blaz', '/tmp/config-chain-class.json')
+ t.same(cc.snapshot, { blaz: 'ini',
+ json: true,
+ 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ ini: true })
+ cc.del('blaz')
+ t.same(cc.snapshot, { json: true,
+ 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { 'x.y.z': 'xyz',
+ env: 'myenv',
+ http: true,
+ json: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { env: 'myenv',
+ http: true,
+ json: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { http: true,
+ json: true,
+ ini: true })
+ cc.shift()
+ t.same(cc.snapshot, { http: true,
+ ini: true,
+ json: false })
+ cc.shift()
+ t.same(cc.snapshot, {})
+ t.end()
+ })
+})
diff --git a/source/node_modules/config-chain/test/env.js b/source/node_modules/config-chain/test/env.js
new file mode 100644
index 000000000..fb718f32b
--- /dev/null
+++ b/source/node_modules/config-chain/test/env.js
@@ -0,0 +1,10 @@
+var cc = require('..')
+var assert = require('assert')
+
+assert.deepEqual({
+ hello: true
+}, cc.env('test_', {
+ 'test_hello': true,
+ 'ignore_this': 4,
+ 'ignore_test_this_too': []
+}))
diff --git a/source/node_modules/config-chain/test/find-file.js b/source/node_modules/config-chain/test/find-file.js
new file mode 100644
index 000000000..23cde52ea
--- /dev/null
+++ b/source/node_modules/config-chain/test/find-file.js
@@ -0,0 +1,13 @@
+
+var fs = require('fs')
+ , assert = require('assert')
+ , objx = {
+ rand: Math.random()
+ }
+
+fs.writeFileSync('/tmp/random-test-config.json', JSON.stringify(objx))
+
+var cc = require('../')
+var path = cc.find('tmp/random-test-config.json')
+
+assert.equal(path, '/tmp/random-test-config.json')
\ No newline at end of file
diff --git a/source/node_modules/config-chain/test/get.js b/source/node_modules/config-chain/test/get.js
new file mode 100644
index 000000000..d6fd79f74
--- /dev/null
+++ b/source/node_modules/config-chain/test/get.js
@@ -0,0 +1,15 @@
+var cc = require("../");
+
+var chain = cc()
+ , name = "forFun";
+
+chain
+ .add({
+ __sample:"for fun only"
+ }, name)
+ .on("load", function() {
+ //It throw exception here
+ console.log(chain.get("__sample", name));
+ //But if I drop the name param, it run normally and return as expected: "for fun only"
+ //console.log(chain.get("__sample"));
+ });
diff --git a/source/node_modules/config-chain/test/ignore-unfound-file.js b/source/node_modules/config-chain/test/ignore-unfound-file.js
new file mode 100644
index 000000000..d742b82ba
--- /dev/null
+++ b/source/node_modules/config-chain/test/ignore-unfound-file.js
@@ -0,0 +1,5 @@
+
+var cc = require('..')
+
+//should not throw
+cc(__dirname, 'non_existing_file')
diff --git a/source/node_modules/config-chain/test/ini.js b/source/node_modules/config-chain/test/ini.js
new file mode 100644
index 000000000..5572a6ed6
--- /dev/null
+++ b/source/node_modules/config-chain/test/ini.js
@@ -0,0 +1,18 @@
+
+
+var cc =require('..')
+var INI = require('ini')
+var assert = require('assert')
+
+function test(obj) {
+
+ var _json, _ini
+ var json = cc.parse (_json = JSON.stringify(obj))
+ var ini = cc.parse (_ini = INI.stringify(obj))
+console.log(_ini, _json)
+ assert.deepEqual(json, ini)
+}
+
+
+test({hello: true})
+
diff --git a/source/node_modules/config-chain/test/save.js b/source/node_modules/config-chain/test/save.js
new file mode 100644
index 000000000..bc97bbd3f
--- /dev/null
+++ b/source/node_modules/config-chain/test/save.js
@@ -0,0 +1,59 @@
+var CC = require('../index.js').ConfigChain
+var test = require('tap').test
+
+var f1 = '/tmp/f1.ini'
+var f2 = '/tmp/f2.json'
+
+var ini = require('ini')
+
+var f1data = {foo: {bar: 'baz'}, bloo: 'jaus'}
+var f2data = {oof: {rab: 'zab'}, oolb: 'suaj'}
+
+var fs = require('fs')
+
+fs.writeFileSync(f1, ini.stringify(f1data), 'utf8')
+fs.writeFileSync(f2, JSON.stringify(f2data), 'utf8')
+
+test('test saving and loading ini files', function (t) {
+ new CC()
+ .add({grelb:'blerg'}, 'opt')
+ .addFile(f1, 'ini', 'inifile')
+ .addFile(f2, 'json', 'jsonfile')
+ .on('load', function (cc) {
+
+ t.same(cc.snapshot, { grelb: 'blerg',
+ bloo: 'jaus',
+ foo: { bar: 'baz' },
+ oof: { rab: 'zab' },
+ oolb: 'suaj' })
+
+ t.same(cc.list, [ { grelb: 'blerg' },
+ { bloo: 'jaus', foo: { bar: 'baz' } },
+ { oof: { rab: 'zab' }, oolb: 'suaj' } ])
+
+ cc.set('grelb', 'brelg', 'opt')
+ .set('foo', 'zoo', 'inifile')
+ .set('oof', 'ooz', 'jsonfile')
+ .save('inifile')
+ .save('jsonfile')
+ .on('save', function () {
+ t.equal(fs.readFileSync(f1, 'utf8'),
+ "bloo=jaus\nfoo=zoo\n")
+ t.equal(fs.readFileSync(f2, 'utf8'),
+ "{\"oof\":\"ooz\",\"oolb\":\"suaj\"}")
+
+ t.same(cc.snapshot, { grelb: 'brelg',
+ bloo: 'jaus',
+ foo: 'zoo',
+ oof: 'ooz',
+ oolb: 'suaj' })
+
+ t.same(cc.list, [ { grelb: 'brelg' },
+ { bloo: 'jaus', foo: 'zoo' },
+ { oof: 'ooz', oolb: 'suaj' } ])
+
+ t.pass('ok')
+ t.end()
+ })
+ })
+})
diff --git a/source/node_modules/core-util-is/LICENSE b/source/node_modules/core-util-is/LICENSE
new file mode 100644
index 000000000..d8d7f9437
--- /dev/null
+++ b/source/node_modules/core-util-is/LICENSE
@@ -0,0 +1,19 @@
+Copyright Node.js contributors. All rights reserved.
+
+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.
diff --git a/source/node_modules/core-util-is/README.md b/source/node_modules/core-util-is/README.md
new file mode 100644
index 000000000..5a76b4149
--- /dev/null
+++ b/source/node_modules/core-util-is/README.md
@@ -0,0 +1,3 @@
+# core-util-is
+
+The `util.is*` functions introduced in Node v0.12.
diff --git a/source/node_modules/core-util-is/float.patch b/source/node_modules/core-util-is/float.patch
new file mode 100644
index 000000000..a06d5c05f
--- /dev/null
+++ b/source/node_modules/core-util-is/float.patch
@@ -0,0 +1,604 @@
+diff --git a/lib/util.js b/lib/util.js
+index a03e874..9074e8e 100644
+--- a/lib/util.js
++++ b/lib/util.js
+@@ -19,430 +19,6 @@
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-var formatRegExp = /%[sdj%]/g;
+-exports.format = function(f) {
+- if (!isString(f)) {
+- var objects = [];
+- for (var i = 0; i < arguments.length; i++) {
+- objects.push(inspect(arguments[i]));
+- }
+- return objects.join(' ');
+- }
+-
+- var i = 1;
+- var args = arguments;
+- var len = args.length;
+- var str = String(f).replace(formatRegExp, function(x) {
+- if (x === '%%') return '%';
+- if (i >= len) return x;
+- switch (x) {
+- case '%s': return String(args[i++]);
+- case '%d': return Number(args[i++]);
+- case '%j':
+- try {
+- return JSON.stringify(args[i++]);
+- } catch (_) {
+- return '[Circular]';
+- }
+- default:
+- return x;
+- }
+- });
+- for (var x = args[i]; i < len; x = args[++i]) {
+- if (isNull(x) || !isObject(x)) {
+- str += ' ' + x;
+- } else {
+- str += ' ' + inspect(x);
+- }
+- }
+- return str;
+-};
+-
+-
+-// Mark that a method should not be used.
+-// Returns a modified function which warns once by default.
+-// If --no-deprecation is set, then it is a no-op.
+-exports.deprecate = function(fn, msg) {
+- // Allow for deprecating things in the process of starting up.
+- if (isUndefined(global.process)) {
+- return function() {
+- return exports.deprecate(fn, msg).apply(this, arguments);
+- };
+- }
+-
+- if (process.noDeprecation === true) {
+- return fn;
+- }
+-
+- var warned = false;
+- function deprecated() {
+- if (!warned) {
+- if (process.throwDeprecation) {
+- throw new Error(msg);
+- } else if (process.traceDeprecation) {
+- console.trace(msg);
+- } else {
+- console.error(msg);
+- }
+- warned = true;
+- }
+- return fn.apply(this, arguments);
+- }
+-
+- return deprecated;
+-};
+-
+-
+-var debugs = {};
+-var debugEnviron;
+-exports.debuglog = function(set) {
+- if (isUndefined(debugEnviron))
+- debugEnviron = process.env.NODE_DEBUG || '';
+- set = set.toUpperCase();
+- if (!debugs[set]) {
+- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+- var pid = process.pid;
+- debugs[set] = function() {
+- var msg = exports.format.apply(exports, arguments);
+- console.error('%s %d: %s', set, pid, msg);
+- };
+- } else {
+- debugs[set] = function() {};
+- }
+- }
+- return debugs[set];
+-};
+-
+-
+-/**
+- * Echos the value of a value. Trys to print the value out
+- * in the best way possible given the different types.
+- *
+- * @param {Object} obj The object to print out.
+- * @param {Object} opts Optional options object that alters the output.
+- */
+-/* legacy: obj, showHidden, depth, colors*/
+-function inspect(obj, opts) {
+- // default options
+- var ctx = {
+- seen: [],
+- stylize: stylizeNoColor
+- };
+- // legacy...
+- if (arguments.length >= 3) ctx.depth = arguments[2];
+- if (arguments.length >= 4) ctx.colors = arguments[3];
+- if (isBoolean(opts)) {
+- // legacy...
+- ctx.showHidden = opts;
+- } else if (opts) {
+- // got an "options" object
+- exports._extend(ctx, opts);
+- }
+- // set default options
+- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+- if (isUndefined(ctx.depth)) ctx.depth = 2;
+- if (isUndefined(ctx.colors)) ctx.colors = false;
+- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+- if (ctx.colors) ctx.stylize = stylizeWithColor;
+- return formatValue(ctx, obj, ctx.depth);
+-}
+-exports.inspect = inspect;
+-
+-
+-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+-inspect.colors = {
+- 'bold' : [1, 22],
+- 'italic' : [3, 23],
+- 'underline' : [4, 24],
+- 'inverse' : [7, 27],
+- 'white' : [37, 39],
+- 'grey' : [90, 39],
+- 'black' : [30, 39],
+- 'blue' : [34, 39],
+- 'cyan' : [36, 39],
+- 'green' : [32, 39],
+- 'magenta' : [35, 39],
+- 'red' : [31, 39],
+- 'yellow' : [33, 39]
+-};
+-
+-// Don't use 'blue' not visible on cmd.exe
+-inspect.styles = {
+- 'special': 'cyan',
+- 'number': 'yellow',
+- 'boolean': 'yellow',
+- 'undefined': 'grey',
+- 'null': 'bold',
+- 'string': 'green',
+- 'date': 'magenta',
+- // "name": intentionally not styling
+- 'regexp': 'red'
+-};
+-
+-
+-function stylizeWithColor(str, styleType) {
+- var style = inspect.styles[styleType];
+-
+- if (style) {
+- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+- '\u001b[' + inspect.colors[style][1] + 'm';
+- } else {
+- return str;
+- }
+-}
+-
+-
+-function stylizeNoColor(str, styleType) {
+- return str;
+-}
+-
+-
+-function arrayToHash(array) {
+- var hash = {};
+-
+- array.forEach(function(val, idx) {
+- hash[val] = true;
+- });
+-
+- return hash;
+-}
+-
+-
+-function formatValue(ctx, value, recurseTimes) {
+- // Provide a hook for user-specified inspect functions.
+- // Check that value is an object with an inspect function on it
+- if (ctx.customInspect &&
+- value &&
+- isFunction(value.inspect) &&
+- // Filter out the util module, it's inspect function is special
+- value.inspect !== exports.inspect &&
+- // Also filter out any prototype objects using the circular check.
+- !(value.constructor && value.constructor.prototype === value)) {
+- var ret = value.inspect(recurseTimes, ctx);
+- if (!isString(ret)) {
+- ret = formatValue(ctx, ret, recurseTimes);
+- }
+- return ret;
+- }
+-
+- // Primitive types cannot have properties
+- var primitive = formatPrimitive(ctx, value);
+- if (primitive) {
+- return primitive;
+- }
+-
+- // Look up the keys of the object.
+- var keys = Object.keys(value);
+- var visibleKeys = arrayToHash(keys);
+-
+- if (ctx.showHidden) {
+- keys = Object.getOwnPropertyNames(value);
+- }
+-
+- // Some type of object without properties can be shortcutted.
+- if (keys.length === 0) {
+- if (isFunction(value)) {
+- var name = value.name ? ': ' + value.name : '';
+- return ctx.stylize('[Function' + name + ']', 'special');
+- }
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- }
+- if (isDate(value)) {
+- return ctx.stylize(Date.prototype.toString.call(value), 'date');
+- }
+- if (isError(value)) {
+- return formatError(value);
+- }
+- }
+-
+- var base = '', array = false, braces = ['{', '}'];
+-
+- // Make Array say that they are Array
+- if (isArray(value)) {
+- array = true;
+- braces = ['[', ']'];
+- }
+-
+- // Make functions say that they are functions
+- if (isFunction(value)) {
+- var n = value.name ? ': ' + value.name : '';
+- base = ' [Function' + n + ']';
+- }
+-
+- // Make RegExps say that they are RegExps
+- if (isRegExp(value)) {
+- base = ' ' + RegExp.prototype.toString.call(value);
+- }
+-
+- // Make dates with properties first say the date
+- if (isDate(value)) {
+- base = ' ' + Date.prototype.toUTCString.call(value);
+- }
+-
+- // Make error with message first say the error
+- if (isError(value)) {
+- base = ' ' + formatError(value);
+- }
+-
+- if (keys.length === 0 && (!array || value.length == 0)) {
+- return braces[0] + base + braces[1];
+- }
+-
+- if (recurseTimes < 0) {
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- } else {
+- return ctx.stylize('[Object]', 'special');
+- }
+- }
+-
+- ctx.seen.push(value);
+-
+- var output;
+- if (array) {
+- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+- } else {
+- output = keys.map(function(key) {
+- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+- });
+- }
+-
+- ctx.seen.pop();
+-
+- return reduceToSingleString(output, base, braces);
+-}
+-
+-
+-function formatPrimitive(ctx, value) {
+- if (isUndefined(value))
+- return ctx.stylize('undefined', 'undefined');
+- if (isString(value)) {
+- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+- .replace(/'/g, "\\'")
+- .replace(/\\"/g, '"') + '\'';
+- return ctx.stylize(simple, 'string');
+- }
+- if (isNumber(value)) {
+- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
+- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
+- if (value === 0 && 1 / value < 0)
+- return ctx.stylize('-0', 'number');
+- return ctx.stylize('' + value, 'number');
+- }
+- if (isBoolean(value))
+- return ctx.stylize('' + value, 'boolean');
+- // For some reason typeof null is "object", so special case here.
+- if (isNull(value))
+- return ctx.stylize('null', 'null');
+-}
+-
+-
+-function formatError(value) {
+- return '[' + Error.prototype.toString.call(value) + ']';
+-}
+-
+-
+-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+- var output = [];
+- for (var i = 0, l = value.length; i < l; ++i) {
+- if (hasOwnProperty(value, String(i))) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- String(i), true));
+- } else {
+- output.push('');
+- }
+- }
+- keys.forEach(function(key) {
+- if (!key.match(/^\d+$/)) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- key, true));
+- }
+- });
+- return output;
+-}
+-
+-
+-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+- var name, str, desc;
+- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+- if (desc.get) {
+- if (desc.set) {
+- str = ctx.stylize('[Getter/Setter]', 'special');
+- } else {
+- str = ctx.stylize('[Getter]', 'special');
+- }
+- } else {
+- if (desc.set) {
+- str = ctx.stylize('[Setter]', 'special');
+- }
+- }
+- if (!hasOwnProperty(visibleKeys, key)) {
+- name = '[' + key + ']';
+- }
+- if (!str) {
+- if (ctx.seen.indexOf(desc.value) < 0) {
+- if (isNull(recurseTimes)) {
+- str = formatValue(ctx, desc.value, null);
+- } else {
+- str = formatValue(ctx, desc.value, recurseTimes - 1);
+- }
+- if (str.indexOf('\n') > -1) {
+- if (array) {
+- str = str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n').substr(2);
+- } else {
+- str = '\n' + str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n');
+- }
+- }
+- } else {
+- str = ctx.stylize('[Circular]', 'special');
+- }
+- }
+- if (isUndefined(name)) {
+- if (array && key.match(/^\d+$/)) {
+- return str;
+- }
+- name = JSON.stringify('' + key);
+- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+- name = name.substr(1, name.length - 2);
+- name = ctx.stylize(name, 'name');
+- } else {
+- name = name.replace(/'/g, "\\'")
+- .replace(/\\"/g, '"')
+- .replace(/(^"|"$)/g, "'");
+- name = ctx.stylize(name, 'string');
+- }
+- }
+-
+- return name + ': ' + str;
+-}
+-
+-
+-function reduceToSingleString(output, base, braces) {
+- var numLinesEst = 0;
+- var length = output.reduce(function(prev, cur) {
+- numLinesEst++;
+- if (cur.indexOf('\n') >= 0) numLinesEst++;
+- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+- }, 0);
+-
+- if (length > 60) {
+- return braces[0] +
+- (base === '' ? '' : base + '\n ') +
+- ' ' +
+- output.join(',\n ') +
+- ' ' +
+- braces[1];
+- }
+-
+- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+-}
+-
+-
+ // NOTE: These type checking functions intentionally don't use `instanceof`
+ // because it is fragile and can be easily faked with `Object.create()`.
+ function isArray(ar) {
+@@ -522,166 +98,10 @@ function isPrimitive(arg) {
+ exports.isPrimitive = isPrimitive;
+
+ function isBuffer(arg) {
+- return arg instanceof Buffer;
++ return Buffer.isBuffer(arg);
+ }
+ exports.isBuffer = isBuffer;
+
+ function objectToString(o) {
+ return Object.prototype.toString.call(o);
+-}
+-
+-
+-function pad(n) {
+- return n < 10 ? '0' + n.toString(10) : n.toString(10);
+-}
+-
+-
+-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+- 'Oct', 'Nov', 'Dec'];
+-
+-// 26 Feb 16:19:34
+-function timestamp() {
+- var d = new Date();
+- var time = [pad(d.getHours()),
+- pad(d.getMinutes()),
+- pad(d.getSeconds())].join(':');
+- return [d.getDate(), months[d.getMonth()], time].join(' ');
+-}
+-
+-
+-// log is just a thin wrapper to console.log that prepends a timestamp
+-exports.log = function() {
+- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+-};
+-
+-
+-/**
+- * Inherit the prototype methods from one constructor into another.
+- *
+- * The Function.prototype.inherits from lang.js rewritten as a standalone
+- * function (not on Function.prototype). NOTE: If this file is to be loaded
+- * during bootstrapping this function needs to be rewritten using some native
+- * functions as prototype setup using normal JavaScript does not work as
+- * expected during bootstrapping (see mirror.js in r114903).
+- *
+- * @param {function} ctor Constructor function which needs to inherit the
+- * prototype.
+- * @param {function} superCtor Constructor function to inherit prototype from.
+- */
+-exports.inherits = function(ctor, superCtor) {
+- ctor.super_ = superCtor;
+- ctor.prototype = Object.create(superCtor.prototype, {
+- constructor: {
+- value: ctor,
+- enumerable: false,
+- writable: true,
+- configurable: true
+- }
+- });
+-};
+-
+-exports._extend = function(origin, add) {
+- // Don't do anything if add isn't an object
+- if (!add || !isObject(add)) return origin;
+-
+- var keys = Object.keys(add);
+- var i = keys.length;
+- while (i--) {
+- origin[keys[i]] = add[keys[i]];
+- }
+- return origin;
+-};
+-
+-function hasOwnProperty(obj, prop) {
+- return Object.prototype.hasOwnProperty.call(obj, prop);
+-}
+-
+-
+-// Deprecated old stuff.
+-
+-exports.p = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- console.error(exports.inspect(arguments[i]));
+- }
+-}, 'util.p: Use console.error() instead');
+-
+-
+-exports.exec = exports.deprecate(function() {
+- return require('child_process').exec.apply(this, arguments);
+-}, 'util.exec is now called `child_process.exec`.');
+-
+-
+-exports.print = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(String(arguments[i]));
+- }
+-}, 'util.print: Use console.log instead');
+-
+-
+-exports.puts = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(arguments[i] + '\n');
+- }
+-}, 'util.puts: Use console.log instead');
+-
+-
+-exports.debug = exports.deprecate(function(x) {
+- process.stderr.write('DEBUG: ' + x + '\n');
+-}, 'util.debug: Use console.error instead');
+-
+-
+-exports.error = exports.deprecate(function(x) {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stderr.write(arguments[i] + '\n');
+- }
+-}, 'util.error: Use console.error instead');
+-
+-
+-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+- var callbackCalled = false;
+-
+- function call(a, b, c) {
+- if (callback && !callbackCalled) {
+- callback(a, b, c);
+- callbackCalled = true;
+- }
+- }
+-
+- readStream.addListener('data', function(chunk) {
+- if (writeStream.write(chunk) === false) readStream.pause();
+- });
+-
+- writeStream.addListener('drain', function() {
+- readStream.resume();
+- });
+-
+- readStream.addListener('end', function() {
+- writeStream.end();
+- });
+-
+- readStream.addListener('close', function() {
+- call();
+- });
+-
+- readStream.addListener('error', function(err) {
+- writeStream.end();
+- call(err);
+- });
+-
+- writeStream.addListener('error', function(err) {
+- readStream.destroy();
+- call(err);
+- });
+-}, 'util.pump(): Use readableStream.pipe() instead');
+-
+-
+-var uv;
+-exports._errnoException = function(err, syscall) {
+- if (isUndefined(uv)) uv = process.binding('uv');
+- var errname = uv.errname(err);
+- var e = new Error(syscall + ' ' + errname);
+- e.code = errname;
+- e.errno = errname;
+- e.syscall = syscall;
+- return e;
+-};
++}
\ No newline at end of file
diff --git a/source/node_modules/core-util-is/lib/util.js b/source/node_modules/core-util-is/lib/util.js
new file mode 100644
index 000000000..ff4c851c0
--- /dev/null
+++ b/source/node_modules/core-util-is/lib/util.js
@@ -0,0 +1,107 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
+ }
+ return objectToString(arg) === '[object Array]';
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = Buffer.isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
diff --git a/source/node_modules/core-util-is/package.json b/source/node_modules/core-util-is/package.json
new file mode 100644
index 000000000..bc095bb7e
--- /dev/null
+++ b/source/node_modules/core-util-is/package.json
@@ -0,0 +1,89 @@
+{
+ "_args": [
+ [
+ "core-util-is@~1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/readable-stream"
+ ]
+ ],
+ "_from": "core-util-is@>=1.0.0 <1.1.0",
+ "_id": "core-util-is@1.0.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/core-util-is",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ "_npmVersion": "3.3.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "core-util-is",
+ "raw": "core-util-is@~1.0.0",
+ "rawSpec": "~1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <1.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/bl/readable-stream",
+ "/concat-stream/readable-stream",
+ "/readable-stream",
+ "/through2/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "_shrinkwrap": null,
+ "_spec": "core-util-is@~1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/readable-stream",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/core-util-is/issues"
+ },
+ "dependencies": {},
+ "description": "The `util.is*` functions introduced in Node v0.12.",
+ "devDependencies": {
+ "tap": "^2.3.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
+ },
+ "gitHead": "a177da234df5638b363ddc15fa324619a38577c8",
+ "homepage": "https://github.com/isaacs/core-util-is#readme",
+ "keywords": [
+ "isArray",
+ "isBuffer",
+ "isNumber",
+ "isRegExp",
+ "isString",
+ "isThat",
+ "isThis",
+ "polyfill",
+ "util"
+ ],
+ "license": "MIT",
+ "main": "lib/util.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "core-util-is",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/core-util-is.git"
+ },
+ "scripts": {
+ "test": "tap test.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/source/node_modules/core-util-is/test.js b/source/node_modules/core-util-is/test.js
new file mode 100644
index 000000000..1a490c65a
--- /dev/null
+++ b/source/node_modules/core-util-is/test.js
@@ -0,0 +1,68 @@
+var assert = require('tap');
+
+var t = require('./lib/util');
+
+assert.equal(t.isArray([]), true);
+assert.equal(t.isArray({}), false);
+
+assert.equal(t.isBoolean(null), false);
+assert.equal(t.isBoolean(true), true);
+assert.equal(t.isBoolean(false), true);
+
+assert.equal(t.isNull(null), true);
+assert.equal(t.isNull(undefined), false);
+assert.equal(t.isNull(false), false);
+assert.equal(t.isNull(), false);
+
+assert.equal(t.isNullOrUndefined(null), true);
+assert.equal(t.isNullOrUndefined(undefined), true);
+assert.equal(t.isNullOrUndefined(false), false);
+assert.equal(t.isNullOrUndefined(), true);
+
+assert.equal(t.isNumber(null), false);
+assert.equal(t.isNumber('1'), false);
+assert.equal(t.isNumber(1), true);
+
+assert.equal(t.isString(null), false);
+assert.equal(t.isString('1'), true);
+assert.equal(t.isString(1), false);
+
+assert.equal(t.isSymbol(null), false);
+assert.equal(t.isSymbol('1'), false);
+assert.equal(t.isSymbol(1), false);
+assert.equal(t.isSymbol(Symbol()), true);
+
+assert.equal(t.isUndefined(null), false);
+assert.equal(t.isUndefined(undefined), true);
+assert.equal(t.isUndefined(false), false);
+assert.equal(t.isUndefined(), true);
+
+assert.equal(t.isRegExp(null), false);
+assert.equal(t.isRegExp('1'), false);
+assert.equal(t.isRegExp(new RegExp()), true);
+
+assert.equal(t.isObject({}), true);
+assert.equal(t.isObject([]), true);
+assert.equal(t.isObject(new RegExp()), true);
+assert.equal(t.isObject(new Date()), true);
+
+assert.equal(t.isDate(null), false);
+assert.equal(t.isDate('1'), false);
+assert.equal(t.isDate(new Date()), true);
+
+assert.equal(t.isError(null), false);
+assert.equal(t.isError({ err: true }), false);
+assert.equal(t.isError(new Error()), true);
+
+assert.equal(t.isFunction(null), false);
+assert.equal(t.isFunction({ }), false);
+assert.equal(t.isFunction(function() {}), true);
+
+assert.equal(t.isPrimitive(null), true);
+assert.equal(t.isPrimitive(''), true);
+assert.equal(t.isPrimitive(0), true);
+assert.equal(t.isPrimitive(new Date()), false);
+
+assert.equal(t.isBuffer(null), false);
+assert.equal(t.isBuffer({}), false);
+assert.equal(t.isBuffer(new Buffer(0)), true);
diff --git a/source/node_modules/cross-spawn-async/.editorconfig b/source/node_modules/cross-spawn-async/.editorconfig
new file mode 100644
index 000000000..8bc4f108d
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/.editorconfig
@@ -0,0 +1,15 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[package.json]
+indent_size = 2
diff --git a/source/node_modules/cross-spawn-async/.jshintrc b/source/node_modules/cross-spawn-async/.jshintrc
new file mode 100644
index 000000000..5595ed2d7
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/.jshintrc
@@ -0,0 +1,62 @@
+{
+ "predef": [
+ "console",
+ "describe",
+ "it",
+ "after",
+ "afterEach",
+ "before",
+ "beforeEach"
+ ],
+
+ "indent": 4,
+ "node": true,
+ "devel": true,
+
+ "bitwise": false,
+ "curly": false,
+ "eqeqeq": true,
+ "forin": false,
+ "immed": true,
+ "latedef": false,
+ "newcap": true,
+ "noarg": true,
+ "noempty": false,
+ "nonew": true,
+ "plusplus": false,
+ "regexp": false,
+ "undef": true,
+ "unused": "vars",
+ "quotmark": "single",
+ "strict": false,
+ "trailing": true,
+ "camelcase": true,
+
+ "asi": false,
+ "boss": true,
+ "debug": false,
+ "eqnull": true,
+ "es5": false,
+ "esnext": false,
+ "evil": false,
+ "expr": true,
+ "funcscope": false,
+ "globalstrict": false,
+ "iterator": false,
+ "lastsemic": false,
+ "laxbreak": true,
+ "laxcomma": false,
+ "loopfunc": true,
+ "multistr": false,
+ "onecase": true,
+ "regexdash": false,
+ "scripturl": false,
+ "smarttabs": false,
+ "shadow": false,
+ "sub": false,
+ "supernew": true,
+ "validthis": false,
+
+ "nomen": false,
+ "white": true
+}
diff --git a/source/node_modules/cross-spawn-async/.npmignore b/source/node_modules/cross-spawn-async/.npmignore
new file mode 100644
index 000000000..93f2f731a
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/.npmignore
@@ -0,0 +1,3 @@
+node_modules/
+npm-debug.*
+test/
diff --git a/source/node_modules/cross-spawn-async/.travis.yml b/source/node_modules/cross-spawn-async/.travis.yml
new file mode 100644
index 000000000..0c27f070e
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'iojs-1'
+ - 'iojs-2'
+ - 'iojs-3'
+ - '4'
diff --git a/source/node_modules/cross-spawn-async/LICENSE b/source/node_modules/cross-spawn-async/LICENSE
new file mode 100644
index 000000000..e898822ad
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 IndigoUnited
+
+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.
diff --git a/source/node_modules/cross-spawn-async/README.md b/source/node_modules/cross-spawn-async/README.md
new file mode 100644
index 000000000..0a8b93526
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/README.md
@@ -0,0 +1,56 @@
+# cross-spawn-async
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
+
+[npm-url]:https://npmjs.org/package/cross-spawn-async
+[downloads-image]:http://img.shields.io/npm/dm/cross-spawn-async.svg
+[npm-image]:http://img.shields.io/npm/v/cross-spawn-async.svg
+[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn-async
+[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn-async.svg
+[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn-async
+[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn-async.svg
+[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn-async
+[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn-async.svg
+[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn-async#info=devDependencies
+[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn-async.svg
+
+A cross platform solution to node's spawn.
+
+
+## Installation
+
+`$ npm install cross-spawn-async`
+
+
+## Why
+
+Node has issues when using spawn on Windows:
+
+- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
+- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
+- It does not allow you to run `del` or `dir`
+- It does not properly escape arguments with spaces or special characters
+
+All these issues are handled correctly by `cross-spawn-async`.
+There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
+
+
+## Usage
+
+Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options), so it's a drop in replacement.
+
+```javascript
+var spawn = require('cross-spawn-async');
+
+var process = spawn('npm', ['list', '-g', '-depth' '0'], { stdio: 'inherit' });
+```
+
+
+## Tests
+
+`$ npm test`
+
+
+## License
+
+Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
diff --git a/source/node_modules/cross-spawn-async/appveyor.yml b/source/node_modules/cross-spawn-async/appveyor.yml
new file mode 100644
index 000000000..02aad115d
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/appveyor.yml
@@ -0,0 +1,31 @@
+# appveyor file
+# http://www.appveyor.com/docs/appveyor-yml
+
+# build version format
+version: "{build}"
+
+# fix lineendings in Windows
+init:
+ - git config --global core.autocrlf input
+
+# what combinations to test
+environment:
+ matrix:
+ - nodejs_version: 0.10
+ - nodejs_version: 0.12
+ - nodejs_version: 1
+ - nodejs_version: 2
+ - nodejs_version: 3
+ - nodejs_version: 4
+
+# get the latest stable version of Node 0.STABLE.latest
+install:
+ - ps: Install-Product node $env:nodejs_version
+ - npm install
+
+build: off
+
+test_script:
+ - node --version
+ - npm --version
+ - cmd: npm test --no-color
diff --git a/source/node_modules/cross-spawn-async/index.js b/source/node_modules/cross-spawn-async/index.js
new file mode 100644
index 000000000..c1c9a59d4
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/index.js
@@ -0,0 +1,25 @@
+var cp = require('child_process');
+var parse = require('./lib/parse');
+var enoent = require('./lib/enoent');
+
+function spawn(command, args, options) {
+ var parsed;
+ var spawned;
+
+ // Parse the arguments
+ parsed = parse(command, args, options);
+
+ // Spawn the child process
+ spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
+
+ // Hook into child process "exit" event to emit an error if the command
+ // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ enoent.hookChildProcess(spawned, parsed);
+
+ return spawned;
+}
+
+module.exports = spawn;
+module.exports.spawn = spawn;
+module.exports._parse = parse;
+module.exports._enoent = enoent;
diff --git a/source/node_modules/cross-spawn-async/lib/enoent.js b/source/node_modules/cross-spawn-async/lib/enoent.js
new file mode 100644
index 000000000..e09d7f57e
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/lib/enoent.js
@@ -0,0 +1,51 @@
+'use strict';
+
+var isWin = process.platform === 'win32';
+
+function notFoundError(command, syscall) {
+ var err;
+
+ err = new Error(syscall + ' ' + command + ' ENOENT');
+ err.code = err.errno = 'ENOENT';
+ err.syscall = syscall + ' ' + command;
+
+ return err;
+}
+
+function hookChildProcess(cp, parsed) {
+ var originalEmit;
+
+ if (!isWin) {
+ return;
+ }
+
+ originalEmit = cp.emit;
+ cp.emit = function (name, arg1) {
+ var err;
+
+ // If emitting "exit" event and exit code is 1, we need to check if
+ // the command exists and emit an "error" instead
+ // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ if (name === 'exit') {
+ err = verifyENOENT(arg1, parsed, 'spawn');
+
+ if (err) {
+ return originalEmit.call(cp, 'error', err);
+ }
+ }
+
+ return originalEmit.apply(cp, arguments);
+ };
+}
+
+function verifyENOENT(status, parsed, syscall) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, syscall);
+ }
+
+ return null;
+}
+
+module.exports.hookChildProcess = hookChildProcess;
+module.exports.verifyENOENT = verifyENOENT;
+module.exports.notFoundError = notFoundError;
diff --git a/source/node_modules/cross-spawn-async/lib/parse.js b/source/node_modules/cross-spawn-async/lib/parse.js
new file mode 100644
index 000000000..8ac08b3cd
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/lib/parse.js
@@ -0,0 +1,126 @@
+var fs = require('fs');
+var LRU = require('lru-cache');
+var resolveCommand = require('./resolveCommand');
+var mixIn = require('./util/mixIn');
+
+var isWin = process.platform === 'win32';
+var shebangCache = LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
+
+function readShebang(command) {
+ var buffer;
+ var fd;
+ var match;
+ var shebang;
+
+ // Check if it is in the cache first
+ if (shebangCache.has(command)) {
+ return shebangCache.get(command);
+ }
+
+ // Read the first 150 bytes from the file
+ buffer = new Buffer(150);
+
+ try {
+ fd = fs.openSync(command, 'r');
+ fs.readSync(fd, buffer, 0, 150, 0);
+ } catch (e) {}
+
+ // Check if it is a shebang
+ match = buffer.toString().trim().match(/\#\!(.+)/i);
+
+ if (match) {
+ shebang = match[1].replace(/\/usr\/bin\/env\s+/i, ''); // Remove /usr/bin/env
+ }
+
+ // Store the shebang in the cache
+ shebangCache.set(command, shebang);
+
+ return shebang;
+}
+
+function escapeArg(arg, quote) {
+ // Convert to string
+ arg = '' + arg;
+
+ // If we are not going to quote the argument,
+ // escape shell metacharacters, including double and single quotes:
+ if (!quote) {
+ arg = arg.replace(/([\(\)%!\^<>&|;,"' ])/g, '^$1');
+ } else {
+ // Sequence of backslashes followed by a double quote:
+ // double up all the backslashes and escape the double quote
+ arg = arg.replace(/(\\*)"/gi, '$1$1\\"');
+
+ // Sequence of backslashes followed by the end of the string
+ // (which will become a double quote later):
+ // double up all the backslashes
+ arg = arg.replace(/(\\*)$/, '$1$1');
+
+ // All other backslashes occur literally
+
+ // Quote the whole thing:
+ arg = '"' + arg + '"';
+ }
+
+ return arg;
+}
+
+function escapeCommand(command) {
+ // Do not escape if this command is not dangerous..
+ // We do this so that commands like "echo" or "ifconfig" work
+ // Quoting them, will make them unnaccessible
+ return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArg(command, true);
+}
+
+function parseCall(command, args, options) {
+ var shebang;
+ var applyQuotes;
+ var file;
+ var original;
+
+ // Normalize arguments, similar to nodejs
+ if (args && !Array.isArray(args)) {
+ options = args;
+ args = null;
+ }
+
+ args = args ? args.slice(0) : []; // Clone array to avoid changing the original
+ options = mixIn({}, options);
+ original = command;
+
+ if (isWin) {
+ // Detect & add support for shebangs
+ file = resolveCommand(command);
+ file = file || resolveCommand(command, true);
+ shebang = file && readShebang(file);
+
+ if (shebang) {
+ args.unshift(file);
+ command = shebang;
+ }
+
+ // Escape command & arguments
+ applyQuotes = command !== 'echo'; // Do not quote arguments for the special "echo" command
+ command = escapeCommand(command);
+ args = args.map(function (arg) {
+ return escapeArg(arg, applyQuotes);
+ });
+
+ // Use cmd.exe
+ args = ['/s', '/c', '"' + command + (args.length ? ' ' + args.join(' ') : '') + '"'];
+ command = process.env.comspec || 'cmd.exe';
+
+ // Tell node's spawn that the arguments are already escaped
+ options.windowsVerbatimArguments = true;
+ }
+
+ return {
+ command: command,
+ args: args,
+ options: options,
+ file: file,
+ original: original
+ };
+}
+
+module.exports = parseCall;
diff --git a/source/node_modules/cross-spawn-async/lib/resolveCommand.js b/source/node_modules/cross-spawn-async/lib/resolveCommand.js
new file mode 100644
index 000000000..943d89551
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/lib/resolveCommand.js
@@ -0,0 +1,31 @@
+'use strict';
+
+var path = require('path');
+var which = require('which');
+var LRU = require('lru-cache');
+
+var resolveCache = LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
+
+function resolveCommand(command, noExtension) {
+ var resolved;
+
+ noExtension = !!noExtension;
+ resolved = resolveCache.get(command + '!' + noExtension);
+
+ // Check if its resolved in the cache
+ if (resolveCache.has(command)) {
+ return resolveCache.get(command);
+ }
+
+ try {
+ resolved = !noExtension ?
+ which.sync(command) :
+ which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') });
+ } catch (e) {}
+
+ resolveCache.set(command + '!' + noExtension, resolved);
+
+ return resolved;
+}
+
+module.exports = resolveCommand;
diff --git a/source/node_modules/cross-spawn-async/lib/util/mixIn.js b/source/node_modules/cross-spawn-async/lib/util/mixIn.js
new file mode 100644
index 000000000..9483f8b8e
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/lib/util/mixIn.js
@@ -0,0 +1,15 @@
+'use strict';
+
+function mixIn(target, source) {
+ var key;
+
+ // No need to check for hasOwnProperty.. this is used
+ // just in plain objects
+ for (key in source) {
+ target[key] = source[key];
+ }
+
+ return target;
+}
+
+module.exports = mixIn;
diff --git a/source/node_modules/cross-spawn-async/package.json b/source/node_modules/cross-spawn-async/package.json
new file mode 100644
index 000000000..c9cc7ab88
--- /dev/null
+++ b/source/node_modules/cross-spawn-async/package.json
@@ -0,0 +1,96 @@
+{
+ "_args": [
+ [
+ "cross-spawn-async@^2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/cross-spawn"
+ ]
+ ],
+ "_from": "cross-spawn-async@>=2.0.0 <3.0.0",
+ "_id": "cross-spawn-async@2.1.8",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/cross-spawn-async",
+ "_nodeVersion": "4.2.4",
+ "_npmUser": {
+ "email": "andremiguelcruz@msn.com",
+ "name": "satazor"
+ },
+ "_npmVersion": "2.14.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "cross-spawn-async",
+ "raw": "cross-spawn-async@^2.0.0",
+ "rawSpec": "^2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/cross-spawn"
+ ],
+ "_resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.1.8.tgz",
+ "_shasum": "2d8769b249d40dbe231fdd0d18cea990328aaf2c",
+ "_shrinkwrap": null,
+ "_spec": "cross-spawn-async@^2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/cross-spawn",
+ "author": {
+ "email": "hello@indigounited.com",
+ "name": "IndigoUnited",
+ "url": "http://indigounited.com"
+ },
+ "bugs": {
+ "url": "https://github.com/IndigoUnited/node-cross-spawn-async/issues/"
+ },
+ "dependencies": {
+ "lru-cache": "^4.0.0",
+ "which": "^1.2.4"
+ },
+ "description": "Cross platform child_process#spawn",
+ "devDependencies": {
+ "expect.js": "^0.3.0",
+ "glob": "^6.0.3",
+ "mkdirp": "^0.5.1",
+ "mocha": "^2.2.5",
+ "rimraf": "^2.5.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "2d8769b249d40dbe231fdd0d18cea990328aaf2c",
+ "tarball": "http://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.1.8.tgz"
+ },
+ "gitHead": "37414fa2ef9e1ed91c5e66f52a609e66c08cf653",
+ "homepage": "https://github.com/IndigoUnited/node-cross-spawn-async",
+ "keywords": [
+ "cmd",
+ "cross",
+ "execute",
+ "ext",
+ "hashbang",
+ "path",
+ "path-ext",
+ "path_ext",
+ "platform",
+ "shebang",
+ "spawn",
+ "windows"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "satazor",
+ "email": "andremiguelcruz@msn.com"
+ }
+ ],
+ "name": "cross-spawn-async",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/IndigoUnited/node-cross-spawn-async.git"
+ },
+ "scripts": {
+ "test": "node test/prepare && mocha --bail test/test"
+ },
+ "version": "2.1.8"
+}
diff --git a/source/node_modules/cross-spawn/.editorconfig b/source/node_modules/cross-spawn/.editorconfig
new file mode 100644
index 000000000..8bc4f108d
--- /dev/null
+++ b/source/node_modules/cross-spawn/.editorconfig
@@ -0,0 +1,15 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[package.json]
+indent_size = 2
diff --git a/source/node_modules/cross-spawn/.jshintrc b/source/node_modules/cross-spawn/.jshintrc
new file mode 100644
index 000000000..5595ed2d7
--- /dev/null
+++ b/source/node_modules/cross-spawn/.jshintrc
@@ -0,0 +1,62 @@
+{
+ "predef": [
+ "console",
+ "describe",
+ "it",
+ "after",
+ "afterEach",
+ "before",
+ "beforeEach"
+ ],
+
+ "indent": 4,
+ "node": true,
+ "devel": true,
+
+ "bitwise": false,
+ "curly": false,
+ "eqeqeq": true,
+ "forin": false,
+ "immed": true,
+ "latedef": false,
+ "newcap": true,
+ "noarg": true,
+ "noempty": false,
+ "nonew": true,
+ "plusplus": false,
+ "regexp": false,
+ "undef": true,
+ "unused": "vars",
+ "quotmark": "single",
+ "strict": false,
+ "trailing": true,
+ "camelcase": true,
+
+ "asi": false,
+ "boss": true,
+ "debug": false,
+ "eqnull": true,
+ "es5": false,
+ "esnext": false,
+ "evil": false,
+ "expr": true,
+ "funcscope": false,
+ "globalstrict": false,
+ "iterator": false,
+ "lastsemic": false,
+ "laxbreak": true,
+ "laxcomma": false,
+ "loopfunc": true,
+ "multistr": false,
+ "onecase": true,
+ "regexdash": false,
+ "scripturl": false,
+ "smarttabs": false,
+ "shadow": false,
+ "sub": false,
+ "supernew": true,
+ "validthis": false,
+
+ "nomen": false,
+ "white": true
+}
diff --git a/source/node_modules/cross-spawn/.npmignore b/source/node_modules/cross-spawn/.npmignore
new file mode 100644
index 000000000..93f2f731a
--- /dev/null
+++ b/source/node_modules/cross-spawn/.npmignore
@@ -0,0 +1,3 @@
+node_modules/
+npm-debug.*
+test/
diff --git a/source/node_modules/cross-spawn/.travis.yml b/source/node_modules/cross-spawn/.travis.yml
new file mode 100644
index 000000000..0c27f070e
--- /dev/null
+++ b/source/node_modules/cross-spawn/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'iojs-1'
+ - 'iojs-2'
+ - 'iojs-3'
+ - '4'
diff --git a/source/node_modules/cross-spawn/LICENSE b/source/node_modules/cross-spawn/LICENSE
new file mode 100644
index 000000000..db5e914de
--- /dev/null
+++ b/source/node_modules/cross-spawn/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 IndigoUnited
+
+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.
diff --git a/source/node_modules/cross-spawn/README.md b/source/node_modules/cross-spawn/README.md
new file mode 100644
index 000000000..6e518e6a6
--- /dev/null
+++ b/source/node_modules/cross-spawn/README.md
@@ -0,0 +1,62 @@
+# cross-spawn
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
+
+[npm-url]:https://npmjs.org/package/cross-spawn
+[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg
+[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg
+[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn
+[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn.svg
+[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
+[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn.svg
+[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn
+[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg
+[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies
+[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg
+
+A cross platform solution to node's spawn and spawnSync.
+
+
+## Installation
+
+`$ npm install cross-spawn`
+
+If you're not using the `spawnSync`, you can use [cross-spawn-async](http://github.com/IndigoUnited/node-cross-spawn-async) which doesn't require a build toolchain, see [#18](https://github.com/IndigoUnited/node-cross-spawn/pull/18)
+
+
+## Why
+
+Node has issues when using spawn on Windows:
+
+- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
+- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
+- It does not allow you to run `del` or `dir`
+- It does not properly escape arguments with spaces or special characters
+
+All these issues are handled correctly by `cross-spawn`.
+There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
+
+
+## Usage
+
+Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
+
+```javascript
+var spawn = require('cross-spawn');
+
+// Spawn NPM asynchronously
+var process = spawn('npm', ['list', '-g', '-depth' '0'], { stdio: 'inherit' });
+
+// Spawn NPM synchronously
+var results = spawn.sync('npm', ['list', '-g', '-depth' '0'], { stdio: 'inherit' });
+```
+
+
+## Tests
+
+`$ npm test`
+
+
+## License
+
+Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
diff --git a/source/node_modules/cross-spawn/appveyor.yml b/source/node_modules/cross-spawn/appveyor.yml
new file mode 100644
index 000000000..02aad115d
--- /dev/null
+++ b/source/node_modules/cross-spawn/appveyor.yml
@@ -0,0 +1,31 @@
+# appveyor file
+# http://www.appveyor.com/docs/appveyor-yml
+
+# build version format
+version: "{build}"
+
+# fix lineendings in Windows
+init:
+ - git config --global core.autocrlf input
+
+# what combinations to test
+environment:
+ matrix:
+ - nodejs_version: 0.10
+ - nodejs_version: 0.12
+ - nodejs_version: 1
+ - nodejs_version: 2
+ - nodejs_version: 3
+ - nodejs_version: 4
+
+# get the latest stable version of Node 0.STABLE.latest
+install:
+ - ps: Install-Product node $env:nodejs_version
+ - npm install
+
+build: off
+
+test_script:
+ - node --version
+ - npm --version
+ - cmd: npm test --no-color
diff --git a/source/node_modules/cross-spawn/index.js b/source/node_modules/cross-spawn/index.js
new file mode 100644
index 000000000..07b1ba40c
--- /dev/null
+++ b/source/node_modules/cross-spawn/index.js
@@ -0,0 +1,55 @@
+'use strict';
+
+var sync = require('spawn-sync');
+var crossSpawn = require('cross-spawn-async');
+var parse = require('cross-spawn-async/lib/parse');
+var enoent = require('cross-spawn-async/lib/enoent');
+var resolveCommand = require('cross-spawn-async/lib/resolveCommand');
+
+var isWin = process.platform === 'win32';
+var isNode10 = process.version.indexOf('v0.10.') === 0;
+
+function verifySyncENOENT(status, parsed) {
+ // First check against the standard enoent.verifyENOENT
+ var err = enoent.verifyENOENT(status, parsed, 'spawnSync');
+
+ if (err) {
+ return err;
+ }
+
+ // If we are in node 10, then we are using spawn-sync; if it exited
+ // with -1 it probably means that the command does not exist
+ if (isNode10 && status === -1) {
+ parsed.file = isWin ? parsed.file : resolveCommand(parsed.original);
+
+ if (!parsed.file) {
+ err = enoent.notFoundError(parsed.original, 'spawnSync');
+ }
+ }
+
+ return err;
+}
+
+function spawn(command, args, options) {
+ return crossSpawn.spawn(command, args, options);
+}
+
+function spawnSync(command, args, options) {
+ var parsed;
+ var result;
+
+ // Parse the arguments
+ parsed = parse(command, args, options);
+
+ // Spawn the child process
+ result = sync(parsed.command, parsed.args, parsed.options);
+
+ // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ result.error = result.error || verifySyncENOENT(result.status, parsed);
+
+ return result;
+}
+
+module.exports = spawn;
+module.exports.spawn = spawn;
+module.exports.sync = spawnSync;
diff --git a/source/node_modules/cross-spawn/package.json b/source/node_modules/cross-spawn/package.json
new file mode 100644
index 000000000..1bcc0fbbf
--- /dev/null
+++ b/source/node_modules/cross-spawn/package.json
@@ -0,0 +1,98 @@
+{
+ "_args": [
+ [
+ "cross-spawn@^2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass"
+ ]
+ ],
+ "_from": "cross-spawn@>=2.0.0 <3.0.0",
+ "_id": "cross-spawn@2.1.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/cross-spawn",
+ "_nodeVersion": "4.2.4",
+ "_npmUser": {
+ "email": "andremiguelcruz@msn.com",
+ "name": "satazor"
+ },
+ "_npmVersion": "2.14.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "cross-spawn",
+ "raw": "cross-spawn@^2.0.0",
+ "rawSpec": "^2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/node-sass"
+ ],
+ "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-2.1.5.tgz",
+ "_shasum": "09e1eefb7617270f4f9cad41766e7fcbd2c6ae6c",
+ "_shrinkwrap": null,
+ "_spec": "cross-spawn@^2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass",
+ "author": {
+ "email": "hello@indigounited.com",
+ "name": "IndigoUnited",
+ "url": "http://indigounited.com"
+ },
+ "bugs": {
+ "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/"
+ },
+ "dependencies": {
+ "cross-spawn-async": "^2.0.0",
+ "spawn-sync": "^1.0.15"
+ },
+ "description": "Cross platform child_process#spawn and child_process#spawnSync",
+ "devDependencies": {
+ "expect.js": "^0.3.0",
+ "glob": "^6.0.3",
+ "mkdirp": "^0.5.1",
+ "mocha": "^2.2.5",
+ "rimraf": "^2.5.0",
+ "which": "^1.2.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "09e1eefb7617270f4f9cad41766e7fcbd2c6ae6c",
+ "tarball": "http://registry.npmjs.org/cross-spawn/-/cross-spawn-2.1.5.tgz"
+ },
+ "gitHead": "a91440123d1d8ec2865cf7643351955e7ad48247",
+ "homepage": "https://github.com/IndigoUnited/node-cross-spawn",
+ "keywords": [
+ "cmd",
+ "cross",
+ "execute",
+ "ext",
+ "hashbang",
+ "path",
+ "path-ext",
+ "path_ext",
+ "platform",
+ "shebang",
+ "spawn",
+ "spawnSync",
+ "windows"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "satazor",
+ "email": "andremiguelcruz@msn.com"
+ }
+ ],
+ "name": "cross-spawn",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/IndigoUnited/node-cross-spawn.git"
+ },
+ "scripts": {
+ "test": "node test/prepare && mocha --bail test/test"
+ },
+ "version": "2.1.5"
+}
diff --git a/source/node_modules/cryptiles/.npmignore b/source/node_modules/cryptiles/.npmignore
new file mode 100644
index 000000000..b3bb51763
--- /dev/null
+++ b/source/node_modules/cryptiles/.npmignore
@@ -0,0 +1,18 @@
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+
diff --git a/source/node_modules/cryptiles/.travis.yml b/source/node_modules/cryptiles/.travis.yml
new file mode 100755
index 000000000..4d8269258
--- /dev/null
+++ b/source/node_modules/cryptiles/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+
+node_js:
+ - 0.10
+ - 4.0
+
+sudo: false
+
diff --git a/source/node_modules/cryptiles/LICENSE b/source/node_modules/cryptiles/LICENSE
new file mode 100755
index 000000000..cda44736a
--- /dev/null
+++ b/source/node_modules/cryptiles/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2014, Eran Hammer and other contributors.
+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.
+ * The names of any contributors may not 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 HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hueniverse/cryptiles/graphs/contributors
diff --git a/source/node_modules/cryptiles/README.md b/source/node_modules/cryptiles/README.md
new file mode 100644
index 000000000..400830501
--- /dev/null
+++ b/source/node_modules/cryptiles/README.md
@@ -0,0 +1,16 @@
+cryptiles
+=========
+
+General purpose crypto utilities
+
+[](http://travis-ci.org/hapijs/cryptiles)
+
+Lead Maintainer - [C J Silverio](https://github.com/ceejbot)
+
+## Methods
+
+### `randomString( size)`
+Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
+
+### `fixedTimeComparison( a, b)`
+Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ.
diff --git a/source/node_modules/cryptiles/lib/index.js b/source/node_modules/cryptiles/lib/index.js
new file mode 100755
index 000000000..f385870ee
--- /dev/null
+++ b/source/node_modules/cryptiles/lib/index.js
@@ -0,0 +1,68 @@
+// Load modules
+
+var Crypto = require('crypto');
+var Boom = require('boom');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Generate a cryptographically strong pseudo-random data
+
+exports.randomString = function (size) {
+
+ var buffer = exports.randomBits((size + 1) * 6);
+ if (buffer instanceof Error) {
+ return buffer;
+ }
+
+ var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
+ return string.slice(0, size);
+};
+
+
+exports.randomBits = function (bits) {
+
+ if (!bits ||
+ bits < 0) {
+
+ return Boom.internal('Invalid random bits count');
+ }
+
+ var bytes = Math.ceil(bits / 8);
+ try {
+ return Crypto.randomBytes(bytes);
+ }
+ catch (err) {
+ return Boom.internal('Failed generating random bits: ' + err.message);
+ }
+};
+
+
+// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match)
+
+exports.fixedTimeComparison = function (a, b) {
+
+ if (typeof a !== 'string' ||
+ typeof b !== 'string') {
+
+ return false;
+ }
+
+ var mismatch = (a.length === b.length ? 0 : 1);
+ if (mismatch) {
+ b = a;
+ }
+
+ for (var i = 0, il = a.length; i < il; ++i) {
+ var ac = a.charCodeAt(i);
+ var bc = b.charCodeAt(i);
+ mismatch |= (ac ^ bc);
+ }
+
+ return (mismatch === 0);
+};
+
+
diff --git a/source/node_modules/cryptiles/package.json b/source/node_modules/cryptiles/package.json
new file mode 100644
index 000000000..d3097466f
--- /dev/null
+++ b/source/node_modules/cryptiles/package.json
@@ -0,0 +1,86 @@
+{
+ "_args": [
+ [
+ "cryptiles@2.x.x",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/hawk"
+ ]
+ ],
+ "_from": "cryptiles@>=2.0.0 <3.0.0",
+ "_id": "cryptiles@2.0.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/cryptiles",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "eran@hammer.io",
+ "name": "hueniverse"
+ },
+ "_npmVersion": "2.14.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "cryptiles",
+ "raw": "cryptiles@2.x.x",
+ "rawSpec": "2.x.x",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/hawk"
+ ],
+ "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
+ "_shrinkwrap": null,
+ "_spec": "cryptiles@2.x.x",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/hawk",
+ "bugs": {
+ "url": "https://github.com/hapijs/cryptiles/issues"
+ },
+ "dependencies": {
+ "boom": "2.x.x"
+ },
+ "description": "General purpose crypto utilities",
+ "devDependencies": {
+ "code": "1.x.x",
+ "lab": "5.x.x"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
+ "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.40"
+ },
+ "gitHead": "9bc5a852f01cd51e615814e1cb255fe2df810649",
+ "homepage": "https://github.com/hapijs/cryptiles#readme",
+ "keywords": [
+ "cryptography",
+ "security",
+ "utilites"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "lib/index.js",
+ "maintainers": [
+ {
+ "name": "hueniverse",
+ "email": "eran@hueniverse.com"
+ },
+ {
+ "name": "ceejbot",
+ "email": "ceejceej@gmail.com"
+ }
+ ],
+ "name": "cryptiles",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hapijs/cryptiles.git"
+ },
+ "scripts": {
+ "test": "lab -a code -t 100 -L",
+ "test-cov-html": "lab -a code -r html -o coverage.html"
+ },
+ "version": "2.0.5"
+}
diff --git a/source/node_modules/cryptiles/test/index.js b/source/node_modules/cryptiles/test/index.js
new file mode 100755
index 000000000..170393f9b
--- /dev/null
+++ b/source/node_modules/cryptiles/test/index.js
@@ -0,0 +1,102 @@
+// Load modules
+
+var Code = require('code');
+var Cryptiles = require('..');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.describe;
+var it = lab.it;
+var expect = Code.expect;
+
+
+describe('randomString()', function () {
+
+ it('should generate the right length string', function (done) {
+
+ for (var i = 1; i <= 1000; ++i) {
+ expect(Cryptiles.randomString(i).length).to.equal(i);
+ }
+
+ done();
+ });
+
+ it('returns an error on invalid bits size', function (done) {
+
+ expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/);
+ done();
+ });
+});
+
+describe('randomBits()', function () {
+
+ it('returns an error on invalid input', function (done) {
+
+ expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
+ done();
+ });
+});
+
+describe('fixedTimeComparison()', function () {
+
+ var a = Cryptiles.randomString(50000);
+ var b = Cryptiles.randomString(150000);
+
+ it('should take the same amount of time comparing different string sizes', function (done) {
+
+ var now = Date.now();
+ Cryptiles.fixedTimeComparison(b, a);
+ var t1 = Date.now() - now;
+
+ now = Date.now();
+ Cryptiles.fixedTimeComparison(b, b);
+ var t2 = Date.now() - now;
+
+ expect(t2 - t1).to.be.within(-20, 20);
+ done();
+ });
+
+ it('should return true for equal strings', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
+ done();
+ });
+
+ it('should return false for different strings (size, a < b)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
+ done();
+ });
+
+ it('should return false for different strings (size, a > b)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
+ done();
+ });
+
+ it('should return false for different strings (size, a = b)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
+ done();
+ });
+
+ it('should return false when not a string', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
+ done();
+ });
+
+ it('should return false when not a string (left)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
+ done();
+ });
+});
diff --git a/source/node_modules/d/.lint b/source/node_modules/d/.lint
new file mode 100644
index 000000000..858b75353
--- /dev/null
+++ b/source/node_modules/d/.lint
@@ -0,0 +1,12 @@
+@root
+
+es5
+module
+
+tabs
+indent 2
+maxlen 80
+
+ass
+nomen
+plusplus
diff --git a/source/node_modules/d/.npmignore b/source/node_modules/d/.npmignore
new file mode 100644
index 000000000..155e41f69
--- /dev/null
+++ b/source/node_modules/d/.npmignore
@@ -0,0 +1,4 @@
+.DS_Store
+/node_modules
+/npm-debug.log
+/.lintcache
diff --git a/source/node_modules/d/.travis.yml b/source/node_modules/d/.travis.yml
new file mode 100644
index 000000000..50008b23e
--- /dev/null
+++ b/source/node_modules/d/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - 0.8
+ - 0.10
+ - 0.11
+
+notifications:
+ email:
+ - medikoo+d@medikoo.com
diff --git a/source/node_modules/d/CHANGES b/source/node_modules/d/CHANGES
new file mode 100644
index 000000000..45233f747
--- /dev/null
+++ b/source/node_modules/d/CHANGES
@@ -0,0 +1,7 @@
+v0.1.1 -- 2014.04.24
+- Add `autoBind` and `lazy` utilities
+- Allow to pass other options to be merged onto created descriptor.
+ Useful when used with other custom utilties
+
+v0.1.0 -- 2013.06.20
+Initial (derived from es5-ext project)
diff --git a/source/node_modules/d/LICENCE b/source/node_modules/d/LICENCE
new file mode 100644
index 000000000..aaf35282f
--- /dev/null
+++ b/source/node_modules/d/LICENCE
@@ -0,0 +1,19 @@
+Copyright (C) 2013 Mariusz Nowak (www.medikoo.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/d/README.md b/source/node_modules/d/README.md
new file mode 100644
index 000000000..872d493ed
--- /dev/null
+++ b/source/node_modules/d/README.md
@@ -0,0 +1,108 @@
+# D - Property descriptor factory
+
+_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._
+
+Defining properties with descriptors is very verbose:
+
+```javascript
+var Account = function () {};
+Object.defineProperties(Account.prototype, {
+ deposit: { value: function () {
+ /* ... */
+ }, configurable: true, enumerable: false, writable: true },
+ whithdraw: { value: function () {
+ /* ... */
+ }, configurable: true, enumerable: false, writable: true },
+ balance: { get: function () {
+ /* ... */
+ }, configurable: true, enumerable: false }
+});
+```
+
+D cuts that to:
+
+```javascript
+var d = require('d');
+
+var Account = function () {};
+Object.defineProperties(Account.prototype, {
+ deposit: d(function () {
+ /* ... */
+ }),
+ whithdraw: d(function () {
+ /* ... */
+ }),
+ balance: d.gs(function () {
+ /* ... */
+ })
+});
+```
+
+By default, created descriptor follow characteristics of native ES5 properties, and defines values as:
+
+```javascript
+{ configurable: true, enumerable: false, writable: true }
+```
+
+You can overwrite it by preceding _value_ argument with instruction:
+```javascript
+d('c', value); // { configurable: true, enumerable: false, writable: false }
+d('ce', value); // { configurable: true, enumerable: true, writable: false }
+d('e', value); // { configurable: false, enumerable: true, writable: false }
+
+// Same way for get/set:
+d.gs('e', value); // { configurable: false, enumerable: true }
+```
+
+### Other utilities
+
+#### autoBind(obj, props) _(d/auto-bind)_
+
+Define methods which will be automatically bound to its instances
+
+```javascript
+var d = require('d');
+var autoBind = require('d/auto-bind');
+
+var Foo = function () { this._count = 0; };
+autoBind(Foo.prototype, {
+ increment: d(function () { ++this._count; });
+});
+
+var foo = new Foo();
+
+// Increment foo counter on each domEl click
+domEl.addEventListener('click', foo.increment, false);
+```
+
+#### lazy(obj, props) _(d/lazy)_
+
+Define lazy properties, which will be resolved on first access
+
+```javascript
+var d = require('d');
+var lazy = require('d/lazy');
+
+var Foo = function () {};
+lazy(Foo.prototype, {
+ items: d(function () { return []; })
+});
+
+var foo = new Foo();
+foo.items.push(1, 2); // foo.items array created
+```
+
+## Installation
+### NPM
+
+In your project path:
+
+ $ npm install d
+
+### Browser
+
+You can easily bundle _D_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake)
+
+## Tests [](https://travis-ci.org/medikoo/d)
+
+ $ npm test
diff --git a/source/node_modules/d/auto-bind.js b/source/node_modules/d/auto-bind.js
new file mode 100644
index 000000000..1b00dba3c
--- /dev/null
+++ b/source/node_modules/d/auto-bind.js
@@ -0,0 +1,31 @@
+'use strict';
+
+var copy = require('es5-ext/object/copy')
+ , map = require('es5-ext/object/map')
+ , callable = require('es5-ext/object/valid-callable')
+ , validValue = require('es5-ext/object/valid-value')
+
+ , bind = Function.prototype.bind, defineProperty = Object.defineProperty
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , define;
+
+define = function (name, desc, bindTo) {
+ var value = validValue(desc) && callable(desc.value), dgs;
+ dgs = copy(desc);
+ delete dgs.writable;
+ delete dgs.value;
+ dgs.get = function () {
+ if (hasOwnProperty.call(this, name)) return value;
+ desc.value = bind.call(value, (bindTo == null) ? this : this[bindTo]);
+ defineProperty(this, name, desc);
+ return this[name];
+ };
+ return dgs;
+};
+
+module.exports = function (props/*, bindTo*/) {
+ var bindTo = arguments[1];
+ return map(props, function (desc, name) {
+ return define(name, desc, bindTo);
+ });
+};
diff --git a/source/node_modules/d/index.js b/source/node_modules/d/index.js
new file mode 100644
index 000000000..076ae465f
--- /dev/null
+++ b/source/node_modules/d/index.js
@@ -0,0 +1,63 @@
+'use strict';
+
+var assign = require('es5-ext/object/assign')
+ , normalizeOpts = require('es5-ext/object/normalize-options')
+ , isCallable = require('es5-ext/object/is-callable')
+ , contains = require('es5-ext/string/#/contains')
+
+ , d;
+
+d = module.exports = function (dscr, value/*, options*/) {
+ var c, e, w, options, desc;
+ if ((arguments.length < 2) || (typeof dscr !== 'string')) {
+ options = value;
+ value = dscr;
+ dscr = null;
+ } else {
+ options = arguments[2];
+ }
+ if (dscr == null) {
+ c = w = true;
+ e = false;
+ } else {
+ c = contains.call(dscr, 'c');
+ e = contains.call(dscr, 'e');
+ w = contains.call(dscr, 'w');
+ }
+
+ desc = { value: value, configurable: c, enumerable: e, writable: w };
+ return !options ? desc : assign(normalizeOpts(options), desc);
+};
+
+d.gs = function (dscr, get, set/*, options*/) {
+ var c, e, options, desc;
+ if (typeof dscr !== 'string') {
+ options = set;
+ set = get;
+ get = dscr;
+ dscr = null;
+ } else {
+ options = arguments[3];
+ }
+ if (get == null) {
+ get = undefined;
+ } else if (!isCallable(get)) {
+ options = get;
+ get = set = undefined;
+ } else if (set == null) {
+ set = undefined;
+ } else if (!isCallable(set)) {
+ options = set;
+ set = undefined;
+ }
+ if (dscr == null) {
+ c = true;
+ e = false;
+ } else {
+ c = contains.call(dscr, 'c');
+ e = contains.call(dscr, 'e');
+ }
+
+ desc = { get: get, set: set, configurable: c, enumerable: e };
+ return !options ? desc : assign(normalizeOpts(options), desc);
+};
diff --git a/source/node_modules/d/lazy.js b/source/node_modules/d/lazy.js
new file mode 100644
index 000000000..61e466535
--- /dev/null
+++ b/source/node_modules/d/lazy.js
@@ -0,0 +1,111 @@
+'use strict';
+
+var map = require('es5-ext/object/map')
+ , isCallable = require('es5-ext/object/is-callable')
+ , validValue = require('es5-ext/object/valid-value')
+ , contains = require('es5-ext/string/#/contains')
+
+ , call = Function.prototype.call
+ , defineProperty = Object.defineProperty
+ , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
+ , getPrototypeOf = Object.getPrototypeOf
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , cacheDesc = { configurable: false, enumerable: false, writable: false,
+ value: null }
+ , define;
+
+define = function (name, options) {
+ var value, dgs, cacheName, desc, writable = false, resolvable
+ , flat;
+ options = Object(validValue(options));
+ cacheName = options.cacheName;
+ flat = options.flat;
+ if (cacheName == null) cacheName = name;
+ delete options.cacheName;
+ value = options.value;
+ resolvable = isCallable(value);
+ delete options.value;
+ dgs = { configurable: Boolean(options.configurable),
+ enumerable: Boolean(options.enumerable) };
+ if (name !== cacheName) {
+ dgs.get = function () {
+ if (hasOwnProperty.call(this, cacheName)) return this[cacheName];
+ cacheDesc.value = resolvable ? call.call(value, this, options) : value;
+ cacheDesc.writable = writable;
+ defineProperty(this, cacheName, cacheDesc);
+ cacheDesc.value = null;
+ if (desc) defineProperty(this, name, desc);
+ return this[cacheName];
+ };
+ } else if (!flat) {
+ dgs.get = function self() {
+ var ownDesc;
+ if (hasOwnProperty.call(this, name)) {
+ ownDesc = getOwnPropertyDescriptor(this, name);
+ // It happens in Safari, that getter is still called after property
+ // was defined with a value, following workarounds that
+ if (ownDesc.hasOwnProperty('value')) return ownDesc.value;
+ if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) {
+ return ownDesc.get.call(this);
+ }
+ return value;
+ }
+ desc.value = resolvable ? call.call(value, this, options) : value;
+ defineProperty(this, name, desc);
+ desc.value = null;
+ return this[name];
+ };
+ } else {
+ dgs.get = function self() {
+ var base = this, ownDesc;
+ if (hasOwnProperty.call(this, name)) {
+ // It happens in Safari, that getter is still called after property
+ // was defined with a value, following workarounds that
+ ownDesc = getOwnPropertyDescriptor(this, name);
+ if (ownDesc.hasOwnProperty('value')) return ownDesc.value;
+ if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) {
+ return ownDesc.get.call(this);
+ }
+ }
+ while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base);
+ desc.value = resolvable ? call.call(value, base, options) : value;
+ defineProperty(base, name, desc);
+ desc.value = null;
+ return base[name];
+ };
+ }
+ dgs.set = function (value) {
+ dgs.get.call(this);
+ this[cacheName] = value;
+ };
+ if (options.desc) {
+ desc = {
+ configurable: contains.call(options.desc, 'c'),
+ enumerable: contains.call(options.desc, 'e')
+ };
+ if (cacheName === name) {
+ desc.writable = contains.call(options.desc, 'w');
+ desc.value = null;
+ } else {
+ writable = contains.call(options.desc, 'w');
+ desc.get = dgs.get;
+ desc.set = dgs.set;
+ }
+ delete options.desc;
+ } else if (cacheName === name) {
+ desc = {
+ configurable: Boolean(options.configurable),
+ enumerable: Boolean(options.enumerable),
+ writable: Boolean(options.writable),
+ value: null
+ };
+ }
+ delete options.configurable;
+ delete options.enumerable;
+ delete options.writable;
+ return dgs;
+};
+
+module.exports = function (props) {
+ return map(props, function (desc, name) { return define(name, desc); });
+};
diff --git a/source/node_modules/d/package.json b/source/node_modules/d/package.json
new file mode 100644
index 000000000..6e03a9960
--- /dev/null
+++ b/source/node_modules/d/package.json
@@ -0,0 +1,85 @@
+{
+ "_args": [
+ [
+ "d@~0.1.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/es6-symbol"
+ ]
+ ],
+ "_from": "d@>=0.1.1 <0.2.0",
+ "_id": "d@0.1.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/d",
+ "_npmUser": {
+ "email": "medikoo+npm@medikoo.com",
+ "name": "medikoo"
+ },
+ "_npmVersion": "1.4.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "d",
+ "raw": "d@~0.1.1",
+ "rawSpec": "~0.1.1",
+ "scope": null,
+ "spec": ">=0.1.1 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/es6-iterator",
+ "/es6-symbol"
+ ],
+ "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz",
+ "_shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
+ "_shrinkwrap": null,
+ "_spec": "d@~0.1.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/es6-symbol",
+ "author": {
+ "email": "medyk@medikoo.com",
+ "name": "Mariusz Nowak",
+ "url": "http://www.medikoo.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/medikoo/d/issues"
+ },
+ "dependencies": {
+ "es5-ext": "~0.10.2"
+ },
+ "description": "Property descriptor factory",
+ "devDependencies": {
+ "tad": "~0.1.21"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
+ "tarball": "http://registry.npmjs.org/d/-/d-0.1.1.tgz"
+ },
+ "homepage": "https://github.com/medikoo/d",
+ "keywords": [
+ "descriptor",
+ "descriptors",
+ "ecma",
+ "ecmascript",
+ "es",
+ "meta",
+ "properties",
+ "property"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "medikoo",
+ "email": "medikoo+npm@medikoo.com"
+ }
+ ],
+ "name": "d",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/medikoo/d.git"
+ },
+ "scripts": {
+ "test": "node node_modules/tad/bin/tad"
+ },
+ "version": "0.1.1"
+}
diff --git a/source/node_modules/d/test/auto-bind.js b/source/node_modules/d/test/auto-bind.js
new file mode 100644
index 000000000..89edfb88b
--- /dev/null
+++ b/source/node_modules/d/test/auto-bind.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var d = require('../');
+
+module.exports = function (t, a) {
+ var o = Object.defineProperties({}, t({
+ bar: d(function () { return this === o; }),
+ bar2: d(function () { return this; })
+ }));
+
+ a.deep([(o.bar)(), (o.bar2)()], [true, o]);
+};
diff --git a/source/node_modules/d/test/index.js b/source/node_modules/d/test/index.js
new file mode 100644
index 000000000..3db0af10a
--- /dev/null
+++ b/source/node_modules/d/test/index.js
@@ -0,0 +1,182 @@
+'use strict';
+
+var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+
+module.exports = function (t, a) {
+ var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg
+ , dfs;
+
+ o = Object.create(Object.prototype, {
+ c: t('c', c = {}),
+ cgs: t.gs('c', cg = function () {}, cs = function () {}),
+ ce: t('ce', ce = {}),
+ cegs: t.gs('ce', ceg = function () {}, ces = function () {}),
+ cew: t('cew', cew = {}),
+ cw: t('cw', cw = {}),
+ e: t('e', e = {}),
+ egs: t.gs('e', eg = function () {}, es = function () {}),
+ ew: t('ew', ew = {}),
+ v: t('', v = {}),
+ vgs: t.gs('', vg = function () {}, vs = function () {}),
+ w: t('w', w = {}),
+
+ df: t(df = {}),
+ dfgs: t.gs(dfg = function () {}, dfs = function () {})
+ });
+
+ return {
+ c: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'c');
+ a(d.value, c, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, true, "Configurable");
+ a(d.enumerable, false, "Enumerable");
+ a(d.writable, false, "Writable");
+
+ d = getOwnPropertyDescriptor(o, 'cgs');
+ a(d.value, undefined, "GS Value");
+ a(d.get, cg, "GS Get");
+ a(d.set, cs, "GS Set");
+ a(d.configurable, true, "GS Configurable");
+ a(d.enumerable, false, "GS Enumerable");
+ a(d.writable, undefined, "GS Writable");
+ },
+ ce: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'ce');
+ a(d.value, ce, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, true, "Configurable");
+ a(d.enumerable, true, "Enumerable");
+ a(d.writable, false, "Writable");
+
+ d = getOwnPropertyDescriptor(o, 'cegs');
+ a(d.value, undefined, "GS Value");
+ a(d.get, ceg, "GS Get");
+ a(d.set, ces, "GS Set");
+ a(d.configurable, true, "GS Configurable");
+ a(d.enumerable, true, "GS Enumerable");
+ a(d.writable, undefined, "GS Writable");
+ },
+ cew: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'cew');
+ a(d.value, cew, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, true, "Configurable");
+ a(d.enumerable, true, "Enumerable");
+ a(d.writable, true, "Writable");
+ },
+ cw: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'cw');
+ a(d.value, cw, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, true, "Configurable");
+ a(d.enumerable, false, "Enumerable");
+ a(d.writable, true, "Writable");
+ },
+ e: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'e');
+ a(d.value, e, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, false, "Configurable");
+ a(d.enumerable, true, "Enumerable");
+ a(d.writable, false, "Writable");
+
+ d = getOwnPropertyDescriptor(o, 'egs');
+ a(d.value, undefined, "GS Value");
+ a(d.get, eg, "GS Get");
+ a(d.set, es, "GS Set");
+ a(d.configurable, false, "GS Configurable");
+ a(d.enumerable, true, "GS Enumerable");
+ a(d.writable, undefined, "GS Writable");
+ },
+ ew: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'ew');
+ a(d.value, ew, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, false, "Configurable");
+ a(d.enumerable, true, "Enumerable");
+ a(d.writable, true, "Writable");
+ },
+ v: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'v');
+ a(d.value, v, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, false, "Configurable");
+ a(d.enumerable, false, "Enumerable");
+ a(d.writable, false, "Writable");
+
+ d = getOwnPropertyDescriptor(o, 'vgs');
+ a(d.value, undefined, "GS Value");
+ a(d.get, vg, "GS Get");
+ a(d.set, vs, "GS Set");
+ a(d.configurable, false, "GS Configurable");
+ a(d.enumerable, false, "GS Enumerable");
+ a(d.writable, undefined, "GS Writable");
+ },
+ w: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'w');
+ a(d.value, w, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, false, "Configurable");
+ a(d.enumerable, false, "Enumerable");
+ a(d.writable, true, "Writable");
+ },
+ d: function (a) {
+ var d = getOwnPropertyDescriptor(o, 'df');
+ a(d.value, df, "Value");
+ a(d.get, undefined, "Get");
+ a(d.set, undefined, "Set");
+ a(d.configurable, true, "Configurable");
+ a(d.enumerable, false, "Enumerable");
+ a(d.writable, true, "Writable");
+
+ d = getOwnPropertyDescriptor(o, 'dfgs');
+ a(d.value, undefined, "GS Value");
+ a(d.get, dfg, "GS Get");
+ a(d.set, dfs, "GS Set");
+ a(d.configurable, true, "GS Configurable");
+ a(d.enumerable, false, "GS Enumerable");
+ a(d.writable, undefined, "GS Writable");
+ },
+ Options: {
+ v: function (a) {
+ var x = {}, d = t(x, { foo: true });
+ a.deep(d, { configurable: true, enumerable: false, writable: true,
+ value: x, foo: true }, "No descriptor");
+ d = t('c', 'foo', { marko: 'elo' });
+ a.deep(d, { configurable: true, enumerable: false, writable: false,
+ value: 'foo', marko: 'elo' }, "Descriptor");
+ },
+ gs: function (a) {
+ var gFn = function () {}, sFn = function () {}, d;
+ d = t.gs(gFn, sFn, { foo: true });
+ a.deep(d, { configurable: true, enumerable: false, get: gFn, set: sFn,
+ foo: true }, "No descriptor");
+ d = t.gs(null, sFn, { foo: true });
+ a.deep(d, { configurable: true, enumerable: false, get: undefined,
+ set: sFn, foo: true }, "No descriptor: Just set");
+ d = t.gs(gFn, { foo: true });
+ a.deep(d, { configurable: true, enumerable: false, get: gFn,
+ set: undefined, foo: true }, "No descriptor: Just get");
+
+ d = t.gs('e', gFn, sFn, { bar: true });
+ a.deep(d, { configurable: false, enumerable: true, get: gFn, set: sFn,
+ bar: true }, "Descriptor");
+ d = t.gs('e', null, sFn, { bar: true });
+ a.deep(d, { configurable: false, enumerable: true, get: undefined,
+ set: sFn, bar: true }, "Descriptor: Just set");
+ d = t.gs('e', gFn, { bar: true });
+ a.deep(d, { configurable: false, enumerable: true, get: gFn,
+ set: undefined, bar: true }, "Descriptor: Just get");
+ }
+ }
+ };
+};
diff --git a/source/node_modules/d/test/lazy.js b/source/node_modules/d/test/lazy.js
new file mode 100644
index 000000000..8266deb24
--- /dev/null
+++ b/source/node_modules/d/test/lazy.js
@@ -0,0 +1,77 @@
+'use strict';
+
+var d = require('../')
+
+ , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+
+module.exports = function (t, a) {
+ var Foo = function () {}, i = 1, o, o2, desc;
+ Object.defineProperties(Foo.prototype, t({
+ bar: d(function () { return ++i; }),
+ bar2: d(function () { return this.bar + 23; }),
+ bar3: d(function () { return this.bar2 + 34; }, { desc: 'ew' }),
+ bar4: d(function () { return this.bar3 + 12; }, { cacheName: '_bar4_' }),
+ bar5: d(function () { return this.bar4 + 3; },
+ { cacheName: '_bar5_', desc: 'e' })
+ }));
+
+ desc = getOwnPropertyDescriptor(Foo.prototype, 'bar');
+ a(desc.configurable, true, "Configurable: default");
+ a(desc.enumerable, false, "Enumerable: default");
+
+ o = new Foo();
+ a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74],
+ "Values");
+
+ a.deep(getOwnPropertyDescriptor(o, 'bar3'), { configurable: false,
+ enumerable: true, writable: true, value: 59 }, "Desc");
+ a(o.hasOwnProperty('bar4'), false, "Cache not exposed");
+ desc = getOwnPropertyDescriptor(o, 'bar5');
+ a.deep(desc, { configurable: false,
+ enumerable: true, get: desc.get, set: desc.set }, "Cache & Desc: desc");
+
+ o2 = Object.create(o);
+ o2.bar = 30;
+ o2.bar3 = 100;
+
+ a.deep([o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115],
+ "Extension Values");
+
+ Foo = function () {};
+ Object.defineProperties(Foo.prototype, t({
+ test: d('w', function () { return 'raz'; }),
+ test2: d('', function () { return 'raz'; }, { desc: 'w' }),
+ test3: d('', function () { return 'raz'; },
+ { cacheName: '__test3__', desc: 'w' }),
+ test4: d('w', 'bar')
+ }));
+
+ o = new Foo();
+ o.test = 'marko';
+ a.deep(getOwnPropertyDescriptor(o, 'test'),
+ { configurable: false, enumerable: false, writable: true, value: 'marko' },
+ "Set before get");
+ o.test2 = 'marko2';
+ a.deep(getOwnPropertyDescriptor(o, 'test2'),
+ { configurable: false, enumerable: false, writable: true, value: 'marko2' },
+ "Set before get: Custom desc");
+ o.test3 = 'marko3';
+ a.deep(getOwnPropertyDescriptor(o, '__test3__'),
+ { configurable: false, enumerable: false, writable: true, value: 'marko3' },
+ "Set before get: Custom cache name");
+ a(o.test4, 'bar', "Resolve by value");
+
+ a.h1("Flat");
+ Object.defineProperties(Foo.prototype, t({
+ flat: d(function () { return 'foo'; }, { flat: true }),
+ flat2: d(function () { return 'bar'; }, { flat: true })
+ }));
+
+ a.h2("Instance");
+ a(o.flat, 'foo', "Value");
+ a(o.hasOwnProperty('flat'), false, "Instance");
+ a(Foo.prototype.flat, 'foo', "Prototype");
+
+ a.h2("Direct");
+ a(Foo.prototype.flat2, 'bar');
+};
diff --git a/source/node_modules/dashdash/README.md b/source/node_modules/dashdash/README.md
new file mode 100644
index 000000000..e47b106e6
--- /dev/null
+++ b/source/node_modules/dashdash/README.md
@@ -0,0 +1,574 @@
+A light, featureful and explicit option parsing library for node.js.
+
+[Why another one? See below](#why). tl;dr: The others I've tried are one of
+too loosey goosey (not explicit), too big/too many deps, or ill specified.
+YMMV.
+
+Follow @trentmick
+for updates to node-dashdash.
+
+# Install
+
+ npm install dashdash
+
+
+# Usage
+
+```javascript
+var dashdash = require('dashdash');
+
+// Specify the options. Minimally `name` (or `names`) and `type`
+// must be given for each.
+var options = [
+ {
+ // `names` or a single `name`. First element is the `opts.KEY`.
+ names: ['help', 'h'],
+ // See "Option specs" below for types.
+ type: 'bool',
+ help: 'Print this help and exit.'
+ }
+];
+
+// Shortcut form. As called it infers `process.argv`. See below for
+// the longer form to use methods like `.help()` on the Parser object.
+var opts = dashdash.parse({options: options});
+
+console.log("opts:", opts);
+console.log("args:", opts._args);
+```
+
+
+# Longer Example
+
+A more realistic [starter script "foo.js"](./examples/foo.js) is as follows.
+This also shows using `parser.help()` for formatted option help.
+
+```javascript
+var dashdash = require('./lib/dashdash');
+
+var options = [
+ {
+ name: 'version',
+ type: 'bool',
+ help: 'Print tool version and exit.'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Print this help and exit.'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'arrayOfBool',
+ help: 'Verbose output. Use multiple times for more verbose.'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'File to process',
+ helpArg: 'FILE'
+ }
+];
+
+var parser = dashdash.createParser({options: options});
+try {
+ var opts = parser.parse(process.argv);
+} catch (e) {
+ console.error('foo: error: %s', e.message);
+ process.exit(1);
+}
+
+console.log("# opts:", opts);
+console.log("# args:", opts._args);
+
+// Use `parser.help()` for formatted options help.
+if (opts.help) {
+ var help = parser.help({includeEnv: true}).trimRight();
+ console.log('usage: node foo.js [OPTIONS]\n'
+ + 'options:\n'
+ + help);
+ process.exit(0);
+}
+
+// ...
+```
+
+
+Some example output from this script (foo.js):
+
+```
+$ node foo.js -h
+# opts: { help: true,
+ _order: [ { name: 'help', value: true, from: 'argv' } ],
+ _args: [] }
+# args: []
+usage: node foo.js [OPTIONS]
+options:
+ --version Print tool version and exit.
+ -h, --help Print this help and exit.
+ -v, --verbose Verbose output. Use multiple times for more verbose.
+ -f FILE, --file=FILE File to process
+
+$ node foo.js -v
+# opts: { verbose: [ true ],
+ _order: [ { name: 'verbose', value: true, from: 'argv' } ],
+ _args: [] }
+# args: []
+
+$ node foo.js --version arg1
+# opts: { version: true,
+ _order: [ { name: 'version', value: true, from: 'argv' } ],
+ _args: [ 'arg1' ] }
+# args: [ 'arg1' ]
+
+$ node foo.js -f bar.txt
+# opts: { file: 'bar.txt',
+ _order: [ { name: 'file', value: 'bar.txt', from: 'argv' } ],
+ _args: [] }
+# args: []
+
+$ node foo.js -vvv --file=blah
+# opts: { verbose: [ true, true, true ],
+ file: 'blah',
+ _order:
+ [ { name: 'verbose', value: true, from: 'argv' },
+ { name: 'verbose', value: true, from: 'argv' },
+ { name: 'verbose', value: true, from: 'argv' },
+ { name: 'file', value: 'blah', from: 'argv' } ],
+ _args: [] }
+# args: []
+```
+
+
+See the ["examples"](examples/) dir for a number of starter examples using
+some of dashdash's features.
+
+
+# Environment variable integration
+
+If you want to allow environment variables to specify options to your tool,
+dashdash makes this easy. We can change the 'verbose' option in the example
+above to include an 'env' field:
+
+```javascript
+ {
+ names: ['verbose', 'v'],
+ type: 'arrayOfBool',
+ env: 'FOO_VERBOSE', // <--- add this line
+ help: 'Verbose output. Use multiple times for more verbose.'
+ },
+```
+
+then the **"FOO_VERBOSE" environment variable** can be used to set this
+option:
+
+```shell
+$ FOO_VERBOSE=1 node foo.js
+# opts: { verbose: [ true ],
+ _order: [ { name: 'verbose', value: true, from: 'env' } ],
+ _args: [] }
+# args: []
+```
+
+Boolean options will interpret the empty string as unset, '0' as false
+and anything else as true.
+
+```shell
+$ FOO_VERBOSE= node examples/foo.js # not set
+# opts: { _order: [], _args: [] }
+# args: []
+
+$ FOO_VERBOSE=0 node examples/foo.js # '0' is false
+# opts: { verbose: [ false ],
+ _order: [ { key: 'verbose', value: false, from: 'env' } ],
+ _args: [] }
+# args: []
+
+$ FOO_VERBOSE=1 node examples/foo.js # true
+# opts: { verbose: [ true ],
+ _order: [ { key: 'verbose', value: true, from: 'env' } ],
+ _args: [] }
+# args: []
+
+$ FOO_VERBOSE=boogabooga node examples/foo.js # true
+# opts: { verbose: [ true ],
+ _order: [ { key: 'verbose', value: true, from: 'env' } ],
+ _args: [] }
+# args: []
+```
+
+Non-booleans can be used as well. Strings:
+
+```shell
+$ FOO_FILE=data.txt node examples/foo.js
+# opts: { file: 'data.txt',
+ _order: [ { key: 'file', value: 'data.txt', from: 'env' } ],
+ _args: [] }
+# args: []
+```
+
+Numbers:
+
+```shell
+$ FOO_TIMEOUT=5000 node examples/foo.js
+# opts: { timeout: 5000,
+ _order: [ { key: 'timeout', value: 5000, from: 'env' } ],
+ _args: [] }
+# args: []
+
+$ FOO_TIMEOUT=blarg node examples/foo.js
+foo: error: arg for "FOO_TIMEOUT" is not a positive integer: "blarg"
+```
+
+With the `includeEnv: true` config to `parser.help()` the environment
+variable can also be included in **help output**:
+
+ usage: node foo.js [OPTIONS]
+ options:
+ --version Print tool version and exit.
+ -h, --help Print this help and exit.
+ -v, --verbose Verbose output. Use multiple times for more verbose.
+ Environment: FOO_VERBOSE=1
+ -f FILE, --file=FILE File to process
+
+
+# Bash completion
+
+Dashdash provides a simple way to create a Bash completion file that you
+can place in your "bash_completion.d" directory -- sometimes that is
+"/usr/local/etc/bash_completion.d/"). Features:
+
+- Support for short and long opts
+- Support for knowing which options take arguments
+- Support for subcommands (e.g. 'git log ' to show just options for the
+ log subcommand). See
+ [node-cmdln](https://github.com/trentm/node-cmdln#bash-completion) for
+ how to integrate that.
+- Does the right thing with "--" to stop options.
+- Custom optarg and arg types for custom completions.
+
+Dashdash will return bash completion file content given a parser instance:
+
+ var parser = dashdash.createParser({options: options});
+ console.log( parser.bashCompletion({name: 'mycli'}) );
+
+or directly from a `options` array of options specs:
+
+ var code = dashdash.bashCompletionFromOptions({
+ name: 'mycli',
+ options: OPTIONS
+ });
+
+Write that content to "/usr/local/etc/bash_completion.d/mycli" and you will
+have Bash completions for `mycli`. Alternatively you can write it to
+any file (e.g. "~/.bashrc") and source it.
+
+You could add a `--completion` hidden option to your tool that emits the
+completion content and document for your users to call that to install
+Bash completions.
+
+See [examples/ddcompletion.js](examples/ddcompletion.js) for a complete
+example, including how one can define bash functions for completion of custom
+option types. Also see [node-cmdln](https://github.com/trentm/node-cmdln) for
+how it uses this for Bash completion for full multi-subcommand tools.
+
+- TODO: document specExtra
+- TODO: document includeHidden
+- TODO: document custom types, `function complete\_FOO` guide, completionType
+- TODO: document argtypes
+
+
+# Parser config
+
+Parser construction (i.e. `dashdash.createParser(CONFIG)`) takes the
+following fields:
+
+- `options` (Array of option specs). Required. See the
+ [Option specs](#option-specs) section below.
+
+- `interspersed` (Boolean). Optional. Default is true. If true this allows
+ interspersed arguments and options. I.e.:
+
+ node ./tool.js -v arg1 arg2 -h # '-h' is after interspersed args
+
+ Set it to false to have '-h' **not** get parsed as an option in the above
+ example.
+
+- `allowUnknown` (Boolean). Optional. Default is false. If false, this causes
+ unknown arguments to throw an error. I.e.:
+
+ node ./tool.js -v arg1 --afe8asefksjefhas
+
+ Set it to true to treat the unknown option as a positional
+ argument.
+
+ **Caveat**: When a shortopt group, such as `-xaz` contains a mix of
+ known and unknown options, the *entire* group is passed through
+ unmolested as a positional argument.
+
+ Consider if you have a known short option `-a`, and parse the
+ following command line:
+
+ node ./tool.js -xaz
+
+ where `-x` and `-z` are unknown. There are multiple ways to
+ interpret this:
+
+ 1. `-x` takes a value: `{x: 'az'}`
+ 2. `-x` and `-z` are both booleans: `{x:true,a:true,z:true}`
+
+ Since dashdash does not know what `-x` and `-z` are, it can't know
+ if you'd prefer to receive `{a:true,_args:['-x','-z']}` or
+ `{x:'az'}`, or `{_args:['-xaz']}`. Leaving the positional arg unprocessed
+ is the easiest mistake for the user to recover from.
+
+
+# Option specs
+
+Example using all fields (required fields are noted):
+
+```javascript
+{
+ names: ['file', 'f'], // Required (one of `names` or `name`).
+ type: 'string', // Required.
+ completionType: 'filename',
+ env: 'MYTOOL_FILE',
+ help: 'Config file to load before running "mytool"',
+ helpArg: 'PATH',
+ helpWrap: false,
+ default: path.resolve(process.env.HOME, '.mytoolrc')
+}
+```
+
+Each option spec in the `options` array must/can have the following fields:
+
+- `name` (String) or `names` (Array). Required. These give the option name
+ and aliases. The first name (if more than one given) is the key for the
+ parsed `opts` object.
+
+- `type` (String). Required. One of:
+
+ - bool
+ - string
+ - number
+ - integer
+ - positiveInteger
+ - date (epoch seconds, e.g. 1396031701, or ISO 8601 format
+ `YYYY-MM-DD[THH:MM:SS[.sss][Z]]`, e.g. "2014-03-28T18:35:01.489Z")
+ - arrayOfBool
+ - arrayOfString
+ - arrayOfNumber
+ - arrayOfInteger
+ - arrayOfPositiveInteger
+ - arrayOfDate
+
+ FWIW, these names attempt to match with asserts on
+ [assert-plus](https://github.com/mcavage/node-assert-plus).
+ You can add your own custom option types with `dashdash.addOptionType`.
+ See below.
+
+- `completionType` (String). Optional. This is used for [Bash
+ completion](#bash-completion) for an option argument. If not specified,
+ then the value of `type` is used. Any string may be specified, but only the
+ following values have meaning:
+
+ - `none`: Provide no completions.
+ - `file`: Bash's default completion (i.e. `complete -o default`), which
+ includes filenames.
+ - *Any string FOO for which a `function complete_FOO` Bash function is
+ defined.* This is for custom completions for a given tool. Typically
+ these custom functions are provided in the `specExtra` argument to
+ `dashdash.bashCompletionFromOptions()`. See
+ ["examples/ddcompletion.js"](examples/ddcompletion.js) for an example.
+
+- `env` (String or Array of String). Optional. An environment variable name
+ (or names) that can be used as a fallback for this option. For example,
+ given a "foo.js" like this:
+
+ var options = [{names: ['dry-run', 'n'], env: 'FOO_DRY_RUN'}];
+ var opts = dashdash.parse({options: options});
+
+ Both `node foo.js --dry-run` and `FOO_DRY_RUN=1 node foo.js` would result
+ in `opts.dry_run = true`.
+
+ An environment variable is only used as a fallback, i.e. it is ignored if
+ the associated option is given in `argv`.
+
+- `help` (String). Optional. Used for `parser.help()` output.
+
+- `helpArg` (String). Optional. Used in help output as the placeholder for
+ the option argument, e.g. the "PATH" in:
+
+ ...
+ -f PATH, --file=PATH File to process
+ ...
+
+- `helpWrap` (Boolean). Optional, default true. Set this to `false` to have
+ that option's `help` *not* be text wrapped in `.help()` output.
+
+- `default`. Optional. A default value used for this option, if the
+ option isn't specified in argv.
+
+- `hidden` (Boolean). Optional, default false. If true, help output will not
+ include this option. See also the `includeHidden` option to
+ `bashCompletionFromOptions()` for [Bash completion](#bash-completion).
+
+
+# Option group headings
+
+You can add headings between option specs in the `options` array. To do so,
+simply add an object with only a `group` property -- the string to print as
+the heading for the subsequent options in the array. For example:
+
+```javascript
+var options = [
+ {
+ group: 'Armament Options'
+ },
+ {
+ names: [ 'weapon', 'w' ],
+ type: 'string'
+ },
+ {
+ group: 'General Options'
+ },
+ {
+ names: [ 'help', 'h' ],
+ type: 'bool'
+ }
+];
+...
+```
+
+Note: You can use an empty string, `{group: ''}`, to get a blank line in help
+output between groups of options.
+
+
+# Help config
+
+The `parser.help(...)` function is configurable as follows:
+
+ Options:
+ Armament Options:
+ ^^ -w WEAPON, --weapon=WEAPON Weapon with which to crush. One of: |
+ / sword, spear, maul |
+ / General Options: |
+ / -h, --help Print this help and exit. |
+ / ^^^^ ^ |
+ \ `-- indent `-- helpCol maxCol ---'
+ `-- headingIndent
+
+- `indent` (Number or String). Default 4. Set to a number (for that many
+ spaces) or a string for the literal indent.
+- `headingIndent` (Number or String). Default half length of `indent`. Set to
+ a number (for that many spaces) or a string for the literal indent. This
+ indent applies to group heading lines, between normal option lines.
+- `nameSort` (String). Default is 'length'. By default the names are
+ sorted to put the short opts first (i.e. '-h, --help' preferred
+ to '--help, -h'). Set to 'none' to not do this sorting.
+- `maxCol` (Number). Default 80. Note that reflow is just done on whitespace
+ so a long token in the option help can overflow maxCol.
+- `helpCol` (Number). If not set a reasonable value will be determined
+ between `minHelpCol` and `maxHelpCol`.
+- `minHelpCol` (Number). Default 20.
+- `maxHelpCol` (Number). Default 40.
+- `helpWrap` (Boolean). Default true. Set to `false` to have option `help`
+ strings *not* be textwrapped to the helpCol..maxCol range.
+- `includeEnv` (Boolean). Default false. If the option has associated
+ environment variables (via the `env` option spec attribute), then
+ append mentioned of those envvars to the help string.
+- `includeDefault` (Boolean). Default false. If the option has a default value
+ (via the `default` option spec attribute, or a default on the option's type),
+ then a "Default: VALUE" string will be appended to the help string.
+
+
+# Custom option types
+
+Dashdash includes a good starter set of option types that it will parse for
+you. However, you can add your own via:
+
+ var dashdash = require('dashdash');
+ dashdash.addOptionType({
+ name: '...',
+ takesArg: true,
+ helpArg: '...',
+ parseArg: function (option, optstr, arg) {
+ ...
+ },
+ array: false, // optional
+ arrayFlatten: false, // optional
+ default: ..., // optional
+ completionType: ... // optional
+ });
+
+For example, a simple option type that accepts 'yes', 'y', 'no' or 'n' as
+a boolean argument would look like:
+
+ var dashdash = require('dashdash');
+
+ function parseYesNo(option, optstr, arg) {
+ var argLower = arg.toLowerCase()
+ if (~['yes', 'y'].indexOf(argLower)) {
+ return true;
+ } else if (~['no', 'n'].indexOf(argLower)) {
+ return false;
+ } else {
+ throw new Error(format(
+ 'arg for "%s" is not "yes" or "no": "%s"',
+ optstr, arg));
+ }
+ }
+
+ dashdash.addOptionType({
+ name: 'yesno'
+ takesArg: true,
+ helpArg: '',
+ parseArg: parseYesNo
+ });
+
+ var options = {
+ {names: ['answer', 'a'], type: 'yesno'}
+ };
+ var opts = dashdash.parse({options: options});
+
+See "examples/custom-option-\*.js" for other examples.
+See the `addOptionType` block comment in "lib/dashdash.js" for more details.
+Please let me know [with an
+issue](https://github.com/trentm/node-dashdash/issues/new) if you write a
+generally useful one.
+
+
+
+# Why
+
+Why another node.js option parsing lib?
+
+- `nopt` really is just for "tools like npm". Implicit opts (e.g. '--no-foo'
+ works for every '--foo'). Can't disable abbreviated opts. Can't do multiple
+ usages of same opt, e.g. '-vvv' (I think). Can't do grouped short opts.
+
+- `optimist` has surprise interpretation of options (at least to me).
+ Implicit opts mean ambiguities and poor error handling for fat-fingering.
+ `process.exit` calls makes it hard to use as a libary.
+
+- `optparse` Incomplete docs. Is this an attempted clone of Python's `optparse`.
+ Not clear. Some divergence. `parser.on("name", ...)` API is weird.
+
+- `argparse` Dep on underscore. No thanks just for option processing.
+ `find lib | wc -l` -> `26`. Overkill.
+ Argparse is a bit different anyway. Not sure I want that.
+
+- `posix-getopt` No type validation. Though that isn't a killer. AFAIK can't
+ have a long opt without a short alias. I.e. no `getopt_long` semantics.
+ Also, no whizbang features like generated help output.
+
+- ["commander.js"](https://github.com/visionmedia/commander.js): I wrote
+ [a critique](http://trentm.com/2014/01/a-critique-of-commander-for-nodejs.html)
+ a while back. It seems fine, but last I checked had
+ [an outstanding bug](https://github.com/visionmedia/commander.js/pull/121)
+ that would prevent me from using it.
+
+
+# License
+
+MIT. See LICENSE.txt.
diff --git a/source/node_modules/dashdash/etc/dashdash.bash_completion.in b/source/node_modules/dashdash/etc/dashdash.bash_completion.in
new file mode 100644
index 000000000..50b7d6e0e
--- /dev/null
+++ b/source/node_modules/dashdash/etc/dashdash.bash_completion.in
@@ -0,0 +1,388 @@
+#!/bin/bash
+#
+# Bash completion generated for '{{name}}' at {{date}}.
+#
+# The original template lives here:
+# https://github.com/trentm/node-dashdash/blob/master/etc/dashdash.bash_completion.in
+#
+
+#
+# Copyright 2016 Trent Mick
+# Copyright 2016 Joyent, Inc.
+#
+#
+# A generic Bash completion driver script.
+#
+# This is meant to provide a re-usable chunk of Bash to use for
+# "etc/bash_completion.d/" files for individual tools. Only the "Configuration"
+# section with tool-specific info need differ. Features:
+#
+# - support for short and long opts
+# - support for knowing which options take arguments
+# - support for subcommands (e.g. 'git log ' to show just options for the
+# log subcommand)
+# - does the right thing with "--" to stop options
+# - custom optarg and arg types for custom completions
+# - (TODO) support for shells other than Bash (tcsh, zsh, fish?, etc.)
+#
+#
+# Examples/design:
+#
+# 1. Bash "default" completion. By default Bash's 'complete -o default' is
+# enabled. That means when there are no completions (e.g. if no opts match
+# the current word), then you'll get Bash's default completion. Most notably
+# that means you get filename completion. E.g.:
+# $ tool ./
+# $ tool READ
+#
+# 2. all opts and subcmds:
+# $ tool
+# $ tool -v # assuming '-v' doesn't take an arg
+# $ tool - # matching opts
+# $ git lo # matching subcmds
+#
+# Long opt completions are given *without* the '=', i.e. we prefer space
+# separated because that's easier for good completions.
+#
+# 3. long opt arg with '='
+# $ tool --file=
+# $ tool --file=./d
+# We maintain the "--file=" prefix. Limitation: With the attached prefix
+# the 'complete -o filenames' doesn't know to do dirname '/' suffixing. Meh.
+#
+# 4. envvars:
+# $ tool $
+# $ tool $P
+# Limitation: Currently only getting exported vars, so we miss "PS1" and
+# others.
+#
+# 5. Defer to other completion in a subshell:
+# $ tool --file $(cat ./
+# We get this from 'complete -o default ...'.
+#
+# 6. Custom completion types from a provided bash function.
+# $ tool --profile # complete available "profiles"
+#
+#
+# Dev Notes:
+# - compgen notes, from http://unix.stackexchange.com/questions/151118/understand-compgen-builtin-command
+# - https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html
+#
+
+
+# Debugging this completion:
+# 1. Uncomment the "_{{name}}_log_file=..." line.
+# 2. 'tail -f /var/tmp/dashdash-completion.log' in one terminal.
+# 3. Re-source this bash completion file.
+#_{{name}}_log=/var/tmp/dashdash-completion.log
+
+function _{{name}}_completer {
+
+ # ---- cmd definition
+
+ {{spec}}
+
+
+ # ---- locals
+
+ declare -a argv
+
+
+ # ---- support functions
+
+ function trace {
+ [[ -n "$_{{name}}_log" ]] && echo "$*" >&2
+ }
+
+ function _dashdash_complete {
+ local idx context
+ idx=$1
+ context=$2
+
+ local shortopts longopts optargs subcmds allsubcmds argtypes
+ shortopts="$(eval "echo \${cmd${context}_shortopts}")"
+ longopts="$(eval "echo \${cmd${context}_longopts}")"
+ optargs="$(eval "echo \${cmd${context}_optargs}")"
+ subcmds="$(eval "echo \${cmd${context}_subcmds}")"
+ allsubcmds="$(eval "echo \${cmd${context}_allsubcmds}")"
+ IFS=', ' read -r -a argtypes <<< "$(eval "echo \${cmd${context}_argtypes}")"
+
+ trace ""
+ trace "_dashdash_complete(idx=$idx, context=$context)"
+ trace " shortopts: $shortopts"
+ trace " longopts: $longopts"
+ trace " optargs: $optargs"
+ trace " subcmds: $subcmds"
+ trace " allsubcmds: $allsubcmds"
+
+ # Get 'state' of option parsing at this COMP_POINT.
+ # Copying "dashdash.js#parse()" behaviour here.
+ local state=
+ local nargs=0
+ local i=$idx
+ local argtype
+ local optname
+ local prefix
+ local word
+ local dashdashseen=
+ while [[ $i -lt $len && $i -le $COMP_CWORD ]]; do
+ argtype=
+ optname=
+ prefix=
+ word=
+
+ arg=${argv[$i]}
+ trace " consider argv[$i]: '$arg'"
+
+ if [[ "$arg" == "--" && $i -lt $COMP_CWORD ]]; then
+ trace " dashdash seen"
+ dashdashseen=yes
+ state=arg
+ word=$arg
+ elif [[ -z "$dashdashseen" && "${arg:0:2}" == "--" ]]; then
+ arg=${arg:2}
+ if [[ "$arg" == *"="* ]]; then
+ optname=${arg%%=*}
+ val=${arg##*=}
+ trace " long opt: optname='$optname' val='$val'"
+ state=arg
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ word=$val
+ prefix="--$optname="
+ else
+ optname=$arg
+ val=
+ trace " long opt: optname='$optname'"
+ state=longopt
+ word=--$optname
+
+ if [[ "$optargs" == *"-$optname="* && $i -lt $COMP_CWORD ]]; then
+ i=$(( $i + 1 ))
+ state=arg
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ word=${argv[$i]}
+ trace " takes arg (consume argv[$i], word='$word')"
+ fi
+ fi
+ elif [[ -z "$dashdashseen" && "${arg:0:1}" == "-" ]]; then
+ trace " short opt group"
+ state=shortopt
+ word=$arg
+
+ local j=1
+ while [[ $j -lt ${#arg} ]]; do
+ optname=${arg:$j:1}
+ trace " consider index $j: optname '$optname'"
+
+ if [[ "$optargs" == *"-$optname="* ]]; then
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ if [[ $(( $j + 1 )) -lt ${#arg} ]]; then
+ state=arg
+ word=${arg:$(( $j + 1 ))}
+ trace " takes arg (rest of this arg, word='$word', argtype='$argtype')"
+ elif [[ $i -lt $COMP_CWORD ]]; then
+ state=arg
+ i=$(( $i + 1 ))
+ word=${argv[$i]}
+ trace " takes arg (word='$word', argtype='$argtype')"
+ fi
+ break
+ fi
+
+ j=$(( $j + 1 ))
+ done
+ elif [[ $i -lt $COMP_CWORD && -n "$arg" ]] && $(echo "$allsubcmds" | grep -w "$arg" >/dev/null); then
+ trace " complete subcmd: recurse _dashdash_complete"
+ _dashdash_complete $(( $i + 1 )) "${context}__${arg/-/_}"
+ return
+ else
+ trace " not an opt or a complete subcmd"
+ state=arg
+ word=$arg
+ nargs=$(( $nargs + 1 ))
+ if [[ ${#argtypes[@]} -gt 0 ]]; then
+ argtype="${argtypes[$(( $nargs - 1 ))]}"
+ if [[ -z "$argtype" ]]; then
+ # If we have more args than argtypes, we use the
+ # last type.
+ argtype="${argtypes[@]: -1:1}"
+ fi
+ fi
+ fi
+
+ trace " state=$state prefix='$prefix' word='$word'"
+ i=$(( $i + 1 ))
+ done
+
+ trace " parsed: state=$state optname='$optname' argtype='$argtype' prefix='$prefix' word='$word' dashdashseen=$dashdashseen"
+ local compgen_opts=
+ if [[ -n "$prefix" ]]; then
+ compgen_opts="$compgen_opts -P $prefix"
+ fi
+
+ case $state in
+ shortopt)
+ compgen $compgen_opts -W "$shortopts $longopts" -- "$word"
+ ;;
+ longopt)
+ compgen $compgen_opts -W "$longopts" -- "$word"
+ ;;
+ arg)
+ # If we don't know what completion to do, then emit nothing. We
+ # expect that we are running with:
+ # complete -o default ...
+ # where "default" means: "Use Readline's default completion if
+ # the compspec generates no matches." This gives us the good filename
+ # completion, completion in subshells/backticks.
+ #
+ # We cannot support an argtype="directory" because
+ # compgen -S '/' -A directory -- "$word"
+ # doesn't give a satisfying result. It doesn't stop at the trailing '/'
+ # so you cannot descend into dirs.
+ if [[ "${word:0:1}" == '$' ]]; then
+ # By default, Bash will complete '$' to all envvars. Apparently
+ # 'complete -o default' does *not* give us that. The following
+ # gets *close* to the same completions: '-A export' misses envvars
+ # like "PS1".
+ trace " completing envvars"
+ compgen $compgen_opts -P '$' -A export -- "${word:1}"
+ elif [[ -z "$argtype" ]]; then
+ # Only include opts in completions if $word is not empty.
+ # This is to avoid completing the leading '-', which foils
+ # using 'default' completion.
+ if [[ -n "$dashdashseen" ]]; then
+ trace " completing subcmds, if any (no argtype, dashdash seen)"
+ compgen $compgen_opts -W "$subcmds" -- "$word"
+ elif [[ -z "$word" ]]; then
+ trace " completing subcmds, if any (no argtype, empty word)"
+ compgen $compgen_opts -W "$subcmds" -- "$word"
+ else
+ trace " completing opts & subcmds (no argtype)"
+ compgen $compgen_opts -W "$shortopts $longopts $subcmds" -- "$word"
+ fi
+ elif [[ $argtype == "none" ]]; then
+ # We want *no* completions, i.e. some way to get the active
+ # 'complete -o default' to not do filename completion.
+ trace " completing 'none' (hack to imply no completions)"
+ echo "##-no completions-##"
+ elif [[ $argtype == "file" ]]; then
+ # 'complete -o default' gives the best filename completion, at least
+ # on Mac.
+ trace " completing 'file' (let 'complete -o default' handle it)"
+ echo ""
+ elif ! type complete_$argtype 2>/dev/null >/dev/null; then
+ trace " completing '$argtype' (fallback to default b/c complete_$argtype is unknown)"
+ echo ""
+ else
+ trace " completing custom '$argtype'"
+ completions=$(complete_$argtype "$word")
+ if [[ -z "$completions" ]]; then
+ trace " no custom '$argtype' completions"
+ # These are in alpha order so they show up correctly.
+ echo "##-no -$argtype- completions-##"
+ else
+ echo $completions
+ fi
+ fi
+ ;;
+ *)
+ trace " unknown state: $state"
+ ;;
+ esac
+ }
+
+
+ trace ""
+ trace "-- $(date)"
+ #trace "\$IFS: '$IFS'"
+ #trace "\$@: '$@'"
+ #trace "COMP_WORDBREAKS: '$COMP_WORDBREAKS'"
+ trace "COMP_CWORD: '$COMP_CWORD'"
+ trace "COMP_LINE: '$COMP_LINE'"
+ trace "COMP_POINT: $COMP_POINT"
+
+ # Guard against negative COMP_CWORD. This is a Bash bug at least on
+ # Mac 10.10.4's bash. See
+ # .
+ if [[ $COMP_CWORD -lt 0 ]]; then
+ trace "abort on negative COMP_CWORD"
+ exit 1;
+ fi
+
+ # I don't know how to do array manip on argv vars,
+ # so copy over to argv array to work on them.
+ shift # the leading '--'
+ i=0
+ len=$#
+ while [[ $# -gt 0 ]]; do
+ argv[$i]=$1
+ shift;
+ i=$(( $i + 1 ))
+ done
+ trace "argv: '${argv[@]}'"
+ trace "argv[COMP_CWORD-1]: '${argv[$(( $COMP_CWORD - 1 ))]}'"
+ trace "argv[COMP_CWORD]: '${argv[$COMP_CWORD]}'"
+ trace "argv len: '$len'"
+
+ _dashdash_complete 1 ""
+}
+
+
+# ---- mainline
+
+# Note: This if-block to help work with 'compdef' and 'compctl' is
+# adapted from 'npm completion'.
+if type complete &>/dev/null; then
+ function _{{name}}_completion {
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
+ COMP_LINE="$COMP_LINE" \
+ COMP_POINT="$COMP_POINT" \
+ _{{name}}_completer -- "${COMP_WORDS[@]}" \
+ 2>$_log_file)) || return $?
+ }
+ complete -o default -F _{{name}}_completion {{name}}
+elif type compdef &>/dev/null; then
+ function _{{name}}_completion {
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ compadd -- $(COMP_CWORD=$((CURRENT-1)) \
+ COMP_LINE=$BUFFER \
+ COMP_POINT=0 \
+ _{{name}}_completer -- "${words[@]}" \
+ 2>$_log_file)
+ }
+ compdef _{{name}}_completion {{name}}
+elif type compctl &>/dev/null; then
+ function _{{name}}_completion {
+ local cword line point words si
+ read -Ac words
+ read -cn cword
+ let cword-=1
+ read -l line
+ read -ln point
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ reply=($(COMP_CWORD="$cword" \
+ COMP_LINE="$line" \
+ COMP_POINT="$point" \
+ _{{name}}_completer -- "${words[@]}" \
+ 2>$_log_file)) || return $?
+ }
+ compctl -K _{{name}}_completion {{name}}
+fi
+
+
+##
+## This is a Bash completion file for the '{{name}}' command. You can install
+## with either:
+##
+## cp FILE /usr/local/etc/bash_completion.d/{{name}} # Mac
+## cp FILE /etc/bash_completion.d/{{name}} # Linux
+##
+## or:
+##
+## cp FILE > ~/.{{name}}.completion
+## echo "source ~/.{{name}}.completion" >> ~/.bashrc
+##
\ No newline at end of file
diff --git a/source/node_modules/dashdash/lib/dashdash.js b/source/node_modules/dashdash/lib/dashdash.js
new file mode 100644
index 000000000..572b00ede
--- /dev/null
+++ b/source/node_modules/dashdash/lib/dashdash.js
@@ -0,0 +1,1022 @@
+/**
+ * dashdash - A light, featureful and explicit option parsing library for
+ * node.js.
+ */
+// vim: set ts=4 sts=4 sw=4 et:
+
+var assert = require('assert-plus');
+var format = require('util').format;
+var fs = require('fs');
+var path = require('path');
+
+
+var DEBUG = true;
+if (DEBUG) {
+ var debug = console.warn;
+} else {
+ var debug = function () {};
+}
+
+
+
+// ---- internal support stuff
+
+// Replace {{variable}} in `s` with the template data in `d`.
+function renderTemplate(s, d) {
+ return s.replace(/{{([a-zA-Z]+)}}/g, function (match, key) {
+ return d.hasOwnProperty(key) ? d[key] : match;
+ });
+}
+
+/**
+ * Return a shallow copy of the given object;
+ */
+function shallowCopy(obj) {
+ if (!obj) {
+ return (obj);
+ }
+ var copy = {};
+ Object.keys(obj).forEach(function (k) {
+ copy[k] = obj[k];
+ });
+ return (copy);
+}
+
+
+function space(n) {
+ var s = '';
+ for (var i = 0; i < n; i++) {
+ s += ' ';
+ }
+ return s;
+}
+
+
+function makeIndent(arg, deflen, name) {
+ if (arg === null || arg === undefined)
+ return space(deflen);
+ else if (typeof (arg) === 'number')
+ return space(arg);
+ else if (typeof (arg) === 'string')
+ return arg;
+ else
+ assert.fail('invalid "' + name + '": not a string or number: ' + arg);
+}
+
+
+/**
+ * Return an array of lines wrapping the given text to the given width.
+ * This splits on whitespace. Single tokens longer than `width` are not
+ * broken up.
+ */
+function textwrap(s, width) {
+ var words = s.trim().split(/\s+/);
+ var lines = [];
+ var line = '';
+ words.forEach(function (w) {
+ var newLength = line.length + w.length;
+ if (line.length > 0)
+ newLength += 1;
+ if (newLength > width) {
+ lines.push(line);
+ line = '';
+ }
+ if (line.length > 0)
+ line += ' ';
+ line += w;
+ });
+ lines.push(line);
+ return lines;
+}
+
+
+/**
+ * Transform an option name to a "key" that is used as the field
+ * on the `opts` object returned from `.parse()`.
+ *
+ * Transformations:
+ * - '-' -> '_': This allow one to use hyphen in option names (common)
+ * but not have to do silly things like `opt["dry-run"]` to access the
+ * parsed results.
+ */
+function optionKeyFromName(name) {
+ return name.replace(/-/g, '_');
+}
+
+
+
+// ---- Option types
+
+function parseBool(option, optstr, arg) {
+ return Boolean(arg);
+}
+
+function parseString(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ return arg;
+}
+
+function parseNumber(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var num = Number(arg);
+ if (isNaN(num)) {
+ throw new Error(format('arg for "%s" is not a number: "%s"',
+ optstr, arg));
+ }
+ return num;
+}
+
+function parseInteger(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var num = Number(arg);
+ if (!/^[0-9-]+$/.test(arg) || isNaN(num)) {
+ throw new Error(format('arg for "%s" is not an integer: "%s"',
+ optstr, arg));
+ }
+ return num;
+}
+
+function parsePositiveInteger(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var num = Number(arg);
+ if (!/^[0-9]+$/.test(arg) || isNaN(num) || num === 0) {
+ throw new Error(format('arg for "%s" is not a positive integer: "%s"',
+ optstr, arg));
+ }
+ return num;
+}
+
+/**
+ * Supported date args:
+ * - epoch second times (e.g. 1396031701)
+ * - ISO 8601 format: YYYY-MM-DD[THH:MM:SS[.sss][Z]]
+ * 2014-03-28T18:35:01.489Z
+ * 2014-03-28T18:35:01.489
+ * 2014-03-28T18:35:01Z
+ * 2014-03-28T18:35:01
+ * 2014-03-28
+ */
+function parseDate(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var date;
+ if (/^\d+$/.test(arg)) {
+ // epoch seconds
+ date = new Date(Number(arg) * 1000);
+ /* JSSTYLED */
+ } else if (/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?Z?)?$/i.test(arg)) {
+ // ISO 8601 format
+ date = new Date(arg);
+ } else {
+ throw new Error(format('arg for "%s" is not a valid date format: "%s"',
+ optstr, arg));
+ }
+ if (date.toString() === 'Invalid Date') {
+ throw new Error(format('arg for "%s" is an invalid date: "%s"',
+ optstr, arg));
+ }
+ return date;
+}
+
+var optionTypes = {
+ bool: {
+ takesArg: false,
+ parseArg: parseBool
+ },
+ string: {
+ takesArg: true,
+ helpArg: 'ARG',
+ parseArg: parseString
+ },
+ number: {
+ takesArg: true,
+ helpArg: 'NUM',
+ parseArg: parseNumber
+ },
+ integer: {
+ takesArg: true,
+ helpArg: 'INT',
+ parseArg: parseInteger
+ },
+ positiveInteger: {
+ takesArg: true,
+ helpArg: 'INT',
+ parseArg: parsePositiveInteger
+ },
+ date: {
+ takesArg: true,
+ helpArg: 'DATE',
+ parseArg: parseDate
+ },
+ arrayOfBool: {
+ takesArg: false,
+ array: true,
+ parseArg: parseBool
+ },
+ arrayOfString: {
+ takesArg: true,
+ helpArg: 'ARG',
+ array: true,
+ parseArg: parseString
+ },
+ arrayOfNumber: {
+ takesArg: true,
+ helpArg: 'NUM',
+ array: true,
+ parseArg: parseNumber
+ },
+ arrayOfInteger: {
+ takesArg: true,
+ helpArg: 'INT',
+ array: true,
+ parseArg: parseInteger
+ },
+ arrayOfPositiveInteger: {
+ takesArg: true,
+ helpArg: 'INT',
+ array: true,
+ parseArg: parsePositiveInteger
+ },
+ arrayOfDate: {
+ takesArg: true,
+ helpArg: 'INT',
+ array: true,
+ parseArg: parseDate
+ },
+};
+
+
+
+// ---- Parser
+
+/**
+ * Parser constructor.
+ *
+ * @param config {Object} The parser configuration
+ * - options {Array} Array of option specs. See the README for how to
+ * specify each option spec.
+ * - allowUnknown {Boolean} Default false. Whether to throw on unknown
+ * options. If false, then unknown args are included in the _args array.
+ * - interspersed {Boolean} Default true. Whether to allow interspersed
+ * arguments (non-options) and options. E.g.:
+ * node tool.js arg1 arg2 -v
+ * '-v' is after some args here. If `interspersed: false` then '-v'
+ * would not be parsed out. Note that regardless of `interspersed`
+ * the presence of '--' will stop option parsing, as all good
+ * option parsers should.
+ */
+function Parser(config) {
+ assert.object(config, 'config');
+ assert.arrayOfObject(config.options, 'config.options');
+ assert.optionalBool(config.interspersed, 'config.interspersed');
+ var self = this;
+
+ // Allow interspersed arguments (true by default).
+ this.interspersed = (config.interspersed !== undefined
+ ? config.interspersed : true);
+
+ // Don't allow unknown flags (true by default).
+ this.allowUnknown = (config.allowUnknown !== undefined
+ ? config.allowUnknown : false);
+
+ this.options = config.options.map(function (o) { return shallowCopy(o); });
+ this.optionFromName = {};
+ this.optionFromEnv = {};
+ for (var i = 0; i < this.options.length; i++) {
+ var o = this.options[i];
+ if (o.group !== undefined && o.group !== null) {
+ assert.optionalString(o.group,
+ format('config.options.%d.group', i));
+ continue;
+ }
+ assert.ok(optionTypes[o.type],
+ format('invalid config.options.%d.type: "%s" in %j',
+ i, o.type, o));
+ assert.optionalString(o.name, format('config.options.%d.name', i));
+ assert.optionalArrayOfString(o.names,
+ format('config.options.%d.names', i));
+ assert.ok((o.name || o.names) && !(o.name && o.names),
+ format('exactly one of "name" or "names" required: %j', o));
+ assert.optionalString(o.help, format('config.options.%d.help', i));
+ var env = o.env || [];
+ if (typeof (env) === 'string') {
+ env = [env];
+ }
+ assert.optionalArrayOfString(env, format('config.options.%d.env', i));
+ assert.optionalString(o.helpGroup,
+ format('config.options.%d.helpGroup', i));
+ assert.optionalBool(o.helpWrap,
+ format('config.options.%d.helpWrap', i));
+ assert.optionalBool(o.hidden, format('config.options.%d.hidden', i));
+
+ if (o.name) {
+ o.names = [o.name];
+ } else {
+ assert.string(o.names[0],
+ format('config.options.%d.names is empty', i));
+ }
+ o.key = optionKeyFromName(o.names[0]);
+ o.names.forEach(function (n) {
+ if (self.optionFromName[n]) {
+ throw new Error(format(
+ 'option name collision: "%s" used in %j and %j',
+ n, self.optionFromName[n], o));
+ }
+ self.optionFromName[n] = o;
+ });
+ env.forEach(function (n) {
+ if (self.optionFromEnv[n]) {
+ throw new Error(format(
+ 'option env collision: "%s" used in %j and %j',
+ n, self.optionFromEnv[n], o));
+ }
+ self.optionFromEnv[n] = o;
+ });
+ }
+}
+
+Parser.prototype.optionTakesArg = function optionTakesArg(option) {
+ return optionTypes[option.type].takesArg;
+};
+
+/**
+ * Parse options from the given argv.
+ *
+ * @param inputs {Object} Optional.
+ * - argv {Array} Optional. The argv to parse. Defaults to
+ * `process.argv`.
+ * - slice {Number} The index into argv at which options/args begin.
+ * Default is 2, as appropriate for `process.argv`.
+ * - env {Object} Optional. The env to use for 'env' entries in the
+ * option specs. Defaults to `process.env`.
+ * @returns {Object} Parsed `opts`. It has special keys `_args` (the
+ * remaining args from `argv`) and `_order` (gives the order that
+ * options were specified).
+ */
+Parser.prototype.parse = function parse(inputs) {
+ var self = this;
+
+ // Old API was `parse([argv, [slice]])`
+ if (Array.isArray(arguments[0])) {
+ inputs = {argv: arguments[0], slice: arguments[1]};
+ }
+
+ assert.optionalObject(inputs, 'inputs');
+ if (!inputs) {
+ inputs = {};
+ }
+ assert.optionalArrayOfString(inputs.argv, 'inputs.argv');
+ //assert.optionalNumber(slice, 'slice');
+ var argv = inputs.argv || process.argv;
+ var slice = inputs.slice !== undefined ? inputs.slice : 2;
+ var args = argv.slice(slice);
+ var env = inputs.env || process.env;
+ var opts = {};
+ var _order = [];
+
+ function addOpt(option, optstr, key, val, from) {
+ var type = optionTypes[option.type];
+ var parsedVal = type.parseArg(option, optstr, val);
+ if (type.array) {
+ if (!opts[key]) {
+ opts[key] = [];
+ }
+ if (type.arrayFlatten && Array.isArray(parsedVal)) {
+ for (var i = 0; i < parsedVal.length; i++) {
+ opts[key].push(parsedVal[i]);
+ }
+ } else {
+ opts[key].push(parsedVal);
+ }
+ } else {
+ opts[key] = parsedVal;
+ }
+ var item = { key: key, value: parsedVal, from: from };
+ _order.push(item);
+ }
+
+ // Parse args.
+ var _args = [];
+ var i = 0;
+ outer: while (i < args.length) {
+ var arg = args[i];
+
+ // End of options marker.
+ if (arg === '--') {
+ i++;
+ break;
+
+ // Long option
+ } else if (arg.slice(0, 2) === '--') {
+ var name = arg.slice(2);
+ var val = null;
+ var idx = name.indexOf('=');
+ if (idx !== -1) {
+ val = name.slice(idx + 1);
+ name = name.slice(0, idx);
+ }
+ var option = this.optionFromName[name];
+ if (!option) {
+ if (!this.allowUnknown)
+ throw new Error(format('unknown option: "--%s"', name));
+ else if (this.interspersed)
+ _args.push(arg);
+ else
+ break outer;
+ } else {
+ var takesArg = this.optionTakesArg(option);
+ if (val !== null && !takesArg) {
+ throw new Error(format('argument given to "--%s" option '
+ + 'that does not take one: "%s"', name, arg));
+ }
+ if (!takesArg) {
+ addOpt(option, '--'+name, option.key, true, 'argv');
+ } else if (val !== null) {
+ addOpt(option, '--'+name, option.key, val, 'argv');
+ } else if (i + 1 >= args.length) {
+ throw new Error(format('do not have enough args for "--%s" '
+ + 'option', name));
+ } else {
+ addOpt(option, '--'+name, option.key, args[i + 1], 'argv');
+ i++;
+ }
+ }
+
+ // Short option
+ } else if (arg[0] === '-' && arg.length > 1) {
+ var j = 1;
+ var allFound = true;
+ while (j < arg.length) {
+ var name = arg[j];
+ var option = this.optionFromName[name];
+ if (!option) {
+ allFound = false;
+ if (this.allowUnknown) {
+ if (this.interspersed) {
+ _args.push(arg);
+ break;
+ } else
+ break outer;
+ } else if (arg.length > 2) {
+ throw new Error(format(
+ 'unknown option: "-%s" in "%s" group',
+ name, arg));
+ } else {
+ throw new Error(format('unknown option: "-%s"', name));
+ }
+ } else if (this.optionTakesArg(option)) {
+ break;
+ }
+ j++;
+ }
+
+ j = 1;
+ while (allFound && j < arg.length) {
+ var name = arg[j];
+ var val = arg.slice(j + 1); // option val if it takes an arg
+ var option = this.optionFromName[name];
+ var takesArg = this.optionTakesArg(option);
+ if (!takesArg) {
+ addOpt(option, '-'+name, option.key, true, 'argv');
+ } else if (val) {
+ addOpt(option, '-'+name, option.key, val, 'argv');
+ break;
+ } else {
+ if (i + 1 >= args.length) {
+ throw new Error(format('do not have enough args '
+ + 'for "-%s" option', name));
+ }
+ addOpt(option, '-'+name, option.key, args[i + 1], 'argv');
+ i++;
+ break;
+ }
+ j++;
+ }
+
+ // An interspersed arg
+ } else if (this.interspersed) {
+ _args.push(arg);
+
+ // An arg and interspersed args are not allowed, so done options.
+ } else {
+ break outer;
+ }
+ i++;
+ }
+ _args = _args.concat(args.slice(i));
+
+ // Parse environment.
+ Object.keys(this.optionFromEnv).forEach(function (envname) {
+ var val = env[envname];
+ if (val === undefined)
+ return;
+ var option = self.optionFromEnv[envname];
+ if (opts[option.key] !== undefined)
+ return;
+ var takesArg = self.optionTakesArg(option);
+ if (takesArg) {
+ addOpt(option, envname, option.key, val, 'env');
+ } else if (val !== '') {
+ // Boolean envvar handling:
+ // - VAR= not set (as if the VAR was not set)
+ // - VAR=0 false
+ // - anything else true
+ addOpt(option, envname, option.key, (val !== '0'), 'env');
+ }
+ });
+
+ // Apply default values.
+ this.options.forEach(function (o) {
+ if (opts[o.key] === undefined) {
+ if (o.default !== undefined) {
+ opts[o.key] = o.default;
+ } else if (o.type && optionTypes[o.type].default !== undefined) {
+ opts[o.key] = optionTypes[o.type].default;
+ }
+ }
+ });
+
+ opts._order = _order;
+ opts._args = _args;
+ return opts;
+};
+
+
+/**
+ * Return help output for the current options.
+ *
+ * E.g.: if the current options are:
+ * [{names: ['help', 'h'], type: 'bool', help: 'Show help and exit.'}]
+ * then this would return:
+ * ' -h, --help Show help and exit.\n'
+ *
+ * @param config {Object} Config for controlling the option help output.
+ * - indent {Number|String} Default 4. An indent/prefix to use for
+ * each option line.
+ * - nameSort {String} Default is 'length'. By default the names are
+ * sorted to put the short opts first (i.e. '-h, --help' preferred
+ * to '--help, -h'). Set to 'none' to not do this sorting.
+ * - maxCol {Number} Default 80. Note that long tokens in a help string
+ * can go past this.
+ * - helpCol {Number} Set to specify a specific column at which
+ * option help will be aligned. By default this is determined
+ * automatically.
+ * - minHelpCol {Number} Default 20.
+ * - maxHelpCol {Number} Default 40.
+ * - includeEnv {Boolean} Default false. If true, a note stating the `env`
+ * envvar (if specified for this option) will be appended to the help
+ * output.
+ * - includeDefault {Boolean} Default false. If true, a note stating
+ * the `default` for this option, if any, will be appended to the help
+ * output.
+ * - helpWrap {Boolean} Default true. Wrap help text in helpCol..maxCol
+ * bounds.
+ * @returns {String}
+ */
+Parser.prototype.help = function help(config) {
+ config = config || {};
+ assert.object(config, 'config');
+
+ var indent = makeIndent(config.indent, 4, 'config.indent');
+ var headingIndent = makeIndent(config.headingIndent,
+ Math.round(indent.length / 2), 'config.headingIndent');
+
+ assert.optionalString(config.nameSort, 'config.nameSort');
+ var nameSort = config.nameSort || 'length';
+ assert.ok(~['length', 'none'].indexOf(nameSort),
+ 'invalid "config.nameSort"');
+ assert.optionalNumber(config.maxCol, 'config.maxCol');
+ assert.optionalNumber(config.maxHelpCol, 'config.maxHelpCol');
+ assert.optionalNumber(config.minHelpCol, 'config.minHelpCol');
+ assert.optionalNumber(config.helpCol, 'config.helpCol');
+ assert.optionalBool(config.includeEnv, 'config.includeEnv');
+ assert.optionalBool(config.includeDefault, 'config.includeDefault');
+ assert.optionalBool(config.helpWrap, 'config.helpWrap');
+ var maxCol = config.maxCol || 80;
+ var minHelpCol = config.minHelpCol || 20;
+ var maxHelpCol = config.maxHelpCol || 40;
+
+ var lines = [];
+ var maxWidth = 0;
+ this.options.forEach(function (o) {
+ if (o.hidden) {
+ return;
+ }
+ if (o.group !== undefined && o.group !== null) {
+ // We deal with groups in the next pass
+ lines.push(null);
+ return;
+ }
+ var type = optionTypes[o.type];
+ var arg = o.helpArg || type.helpArg || 'ARG';
+ var line = '';
+ var names = o.names.slice();
+ if (nameSort === 'length') {
+ names.sort(function (a, b) {
+ if (a.length < b.length)
+ return -1;
+ else if (b.length < a.length)
+ return 1;
+ else
+ return 0;
+ })
+ }
+ names.forEach(function (name, i) {
+ if (i > 0)
+ line += ', ';
+ if (name.length === 1) {
+ line += '-' + name
+ if (type.takesArg)
+ line += ' ' + arg;
+ } else {
+ line += '--' + name
+ if (type.takesArg)
+ line += '=' + arg;
+ }
+ });
+ maxWidth = Math.max(maxWidth, line.length);
+ lines.push(line);
+ });
+
+ // Add help strings.
+ var helpCol = config.helpCol;
+ if (!helpCol) {
+ helpCol = maxWidth + indent.length + 2;
+ helpCol = Math.min(Math.max(helpCol, minHelpCol), maxHelpCol);
+ }
+ var i = -1;
+ this.options.forEach(function (o) {
+ if (o.hidden) {
+ return;
+ }
+ i++;
+
+ if (o.group !== undefined && o.group !== null) {
+ if (o.group === '') {
+ // Support a empty string "group" to have a blank line between
+ // sets of options.
+ lines[i] = '';
+ } else {
+ // Render the group heading with the heading-specific indent.
+ lines[i] = (i === 0 ? '' : '\n') + headingIndent +
+ o.group + ':';
+ }
+ return;
+ }
+
+ var helpDefault;
+ if (config.includeDefault) {
+ if (o.default !== undefined) {
+ helpDefault = format('Default: %j', o.default);
+ } else if (o.type && optionTypes[o.type].default !== undefined) {
+ helpDefault = format('Default: %j',
+ optionTypes[o.type].default);
+ }
+ }
+
+ var line = lines[i] = indent + lines[i];
+ if (!o.help && !(config.includeEnv && o.env) && !helpDefault) {
+ return;
+ }
+ var n = helpCol - line.length;
+ if (n >= 0) {
+ line += space(n);
+ } else {
+ line += '\n' + space(helpCol);
+ }
+
+ var helpEnv = '';
+ if (o.env && o.env.length && config.includeEnv) {
+ helpEnv += 'Environment: ';
+ var type = optionTypes[o.type];
+ var arg = o.helpArg || type.helpArg || 'ARG';
+ var envs = (Array.isArray(o.env) ? o.env : [o.env]).map(
+ function (e) {
+ if (type.takesArg) {
+ return e + '=' + arg;
+ } else {
+ return e + '=1';
+ }
+ }
+ );
+ helpEnv += envs.join(', ');
+ }
+ var help = (o.help || '').trim();
+ if (o.helpWrap !== false && config.helpWrap !== false) {
+ // Wrap help description normally.
+ if (help.length && !~'.!?"\''.indexOf(help.slice(-1))) {
+ help += '.';
+ }
+ if (help.length) {
+ help += ' ';
+ }
+ help += helpEnv;
+ if (helpDefault) {
+ if (helpEnv) {
+ help += '. ';
+ }
+ help += helpDefault;
+ }
+ line += textwrap(help, maxCol - helpCol).join(
+ '\n' + space(helpCol));
+ } else {
+ // Do not wrap help description, but indent newlines appropriately.
+ var helpLines = help.split('\n').filter(
+ function (ln) { return ln.length });
+ if (helpEnv !== '') {
+ helpLines.push(helpEnv);
+ }
+ if (helpDefault) {
+ helpLines.push(helpDefault);
+ }
+ line += helpLines.join('\n' + space(helpCol));
+ }
+
+ lines[i] = line;
+ });
+
+ var rv = '';
+ if (lines.length > 0) {
+ rv = lines.join('\n') + '\n';
+ }
+ return rv;
+};
+
+
+/**
+ * Return a string suitable for a Bash completion file for this tool.
+ *
+ * @param args.name {String} The tool name.
+ * @param args.specExtra {String} Optional. Extra Bash code content to add
+ * to the end of the "spec". Typically this is used to append Bash
+ * "complete_TYPE" functions for custom option types. See
+ * "examples/ddcompletion.js" for an example.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+Parser.prototype.bashCompletion = function bashCompletion(args) {
+ assert.object(args, 'args');
+ assert.string(args.name, 'args.name');
+ assert.optionalString(args.specExtra, 'args.specExtra');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ return bashCompletionFromOptions({
+ name: args.name,
+ specExtra: args.specExtra,
+ argtypes: args.argtypes,
+ options: this.options
+ });
+};
+
+
+// ---- Bash completion
+
+const BASH_COMPLETION_TEMPLATE_PATH = path.join(
+ __dirname, '../etc/dashdash.bash_completion.in');
+
+/**
+ * Return the Bash completion "spec" (the string value for the "{{spec}}"
+ * var in the "dashdash.bash_completion.in" template) for this tool.
+ *
+ * The "spec" is Bash code that defines the CLI options and subcmds for
+ * the template's completion code. It looks something like this:
+ *
+ * local cmd_shortopts="-J ..."
+ * local cmd_longopts="--help ..."
+ * local cmd_optargs="-p=tritonprofile ..."
+ *
+ * @param args.options {Array} The array of dashdash option specs.
+ * @param args.context {String} Optional. A context string for the "local cmd*"
+ * vars in the spec. By default it is the empty string. When used to
+ * scope for completion on a *sub-command* (e.g. for "git log" on a "git"
+ * tool), then it would have a value (e.g. "__log"). See
+ * Bash completion for details.
+ * @param opts.includeHidden {Boolean} Optional. Default false. By default
+ * hidden options and subcmds are "excluded". Here excluded means they
+ * won't be offered as a completion, but if used, their argument type
+ * will be completed. "Hidden" options and subcmds are ones with the
+ * `hidden: true` attribute to exclude them from default help output.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+function bashCompletionSpecFromOptions(args) {
+ assert.object(args, 'args');
+ assert.object(args.options, 'args.options');
+ assert.optionalString(args.context, 'args.context');
+ assert.optionalBool(args.includeHidden, 'args.includeHidden');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ var context = args.context || '';
+ var includeHidden = (args.includeHidden === undefined
+ ? false : args.includeHidden);
+
+ var spec = [];
+ var shortopts = [];
+ var longopts = [];
+ var optargs = [];
+ (args.options || []).forEach(function (o) {
+ if (o.group) {
+ // Skip group headers.
+ return;
+ }
+
+ var optNames = o.names || [o.name];
+ var optType = getOptionType(o.type);
+ if (optType.takesArg) {
+ var completionType = o.completionType ||
+ optType.completionType || o.type;
+ optNames.forEach(function (optName) {
+ if (optName.length === 1) {
+ if (includeHidden || !o.hidden) {
+ shortopts.push('-' + optName);
+ }
+ // Include even hidden options in `optargs` so that bash
+ // completion of its arg still works.
+ optargs.push('-' + optName + '=' + completionType);
+ } else {
+ if (includeHidden || !o.hidden) {
+ longopts.push('--' + optName);
+ }
+ optargs.push('--' + optName + '=' + completionType);
+ }
+ });
+ } else {
+ optNames.forEach(function (optName) {
+ if (includeHidden || !o.hidden) {
+ if (optName.length === 1) {
+ shortopts.push('-' + optName);
+ } else {
+ longopts.push('--' + optName);
+ }
+ }
+ });
+ }
+ });
+
+ spec.push(format('local cmd%s_shortopts="%s"',
+ context, shortopts.sort().join(' ')));
+ spec.push(format('local cmd%s_longopts="%s"',
+ context, longopts.sort().join(' ')));
+ spec.push(format('local cmd%s_optargs="%s"',
+ context, optargs.sort().join(' ')));
+ if (args.argtypes) {
+ spec.push(format('local cmd%s_argtypes="%s"',
+ context, args.argtypes.join(' ')));
+ }
+ return spec.join('\n');
+}
+
+
+/**
+ * Return a string suitable for a Bash completion file for this tool.
+ *
+ * @param args.name {String} The tool name.
+ * @param args.options {Array} The array of dashdash option specs.
+ * @param args.specExtra {String} Optional. Extra Bash code content to add
+ * to the end of the "spec". Typically this is used to append Bash
+ * "complete_TYPE" functions for custom option types. See
+ * "examples/ddcompletion.js" for an example.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+function bashCompletionFromOptions(args) {
+ assert.object(args, 'args');
+ assert.object(args.options, 'args.options');
+ assert.string(args.name, 'args.name');
+ assert.optionalString(args.specExtra, 'args.specExtra');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ // Gather template data.
+ var data = {
+ name: args.name,
+ date: new Date(),
+ spec: bashCompletionSpecFromOptions({
+ options: args.options,
+ argtypes: args.argtypes
+ }),
+ };
+ if (args.specExtra) {
+ data.spec += '\n\n' + args.specExtra;
+ }
+
+ // Render template.
+ var template = fs.readFileSync(BASH_COMPLETION_TEMPLATE_PATH, 'utf8');
+ return renderTemplate(template, data);
+}
+
+
+
+// ---- exports
+
+function createParser(config) {
+ return new Parser(config);
+}
+
+/**
+ * Parse argv with the given options.
+ *
+ * @param config {Object} A merge of all the available fields from
+ * `dashdash.Parser` and `dashdash.Parser.parse`: options, interspersed,
+ * argv, env, slice.
+ */
+function parse(config) {
+ assert.object(config, 'config');
+ assert.optionalArrayOfString(config.argv, 'config.argv');
+ assert.optionalObject(config.env, 'config.env');
+ var config = shallowCopy(config);
+ var argv = config.argv;
+ delete config.argv;
+ var env = config.env;
+ delete config.env;
+
+ var parser = new Parser(config);
+ return parser.parse({argv: argv, env: env});
+}
+
+
+/**
+ * Add a new option type.
+ *
+ * @params optionType {Object}:
+ * - name {String} Required.
+ * - takesArg {Boolean} Required. Whether this type of option takes an
+ * argument on process.argv. Typically this is true for all but the
+ * "bool" type.
+ * - helpArg {String} Required iff `takesArg === true`. The string to
+ * show in generated help for options of this type.
+ * - parseArg {Function} Require. `function (option, optstr, arg)` parser
+ * that takes a string argument and returns an instance of the
+ * appropriate type, or throws an error if the arg is invalid.
+ * - array {Boolean} Optional. Set to true if this is an 'arrayOf' type
+ * that collects multiple usages of the option in process.argv and
+ * puts results in an array.
+ * - arrayFlatten {Boolean} Optional. XXX
+ * - default Optional. Default value for options of this type, if no
+ * default is specified in the option type usage.
+ */
+function addOptionType(optionType) {
+ assert.object(optionType, 'optionType');
+ assert.string(optionType.name, 'optionType.name');
+ assert.bool(optionType.takesArg, 'optionType.takesArg');
+ if (optionType.takesArg) {
+ assert.string(optionType.helpArg, 'optionType.helpArg');
+ }
+ assert.func(optionType.parseArg, 'optionType.parseArg');
+ assert.optionalBool(optionType.array, 'optionType.array');
+ assert.optionalBool(optionType.arrayFlatten, 'optionType.arrayFlatten');
+
+ optionTypes[optionType.name] = {
+ takesArg: optionType.takesArg,
+ helpArg: optionType.helpArg,
+ parseArg: optionType.parseArg,
+ array: optionType.array,
+ arrayFlatten: optionType.arrayFlatten,
+ default: optionType.default
+ }
+}
+
+
+function getOptionType(name) {
+ assert.string(name, 'name');
+ return optionTypes[name];
+}
+
+
+module.exports = {
+ createParser: createParser,
+ Parser: Parser,
+ parse: parse,
+ addOptionType: addOptionType,
+ getOptionType: getOptionType,
+
+ // Bash completion-related exports
+ BASH_COMPLETION_TEMPLATE_PATH: BASH_COMPLETION_TEMPLATE_PATH,
+ bashCompletionFromOptions: bashCompletionFromOptions,
+ bashCompletionSpecFromOptions: bashCompletionSpecFromOptions,
+
+ // Export the parseFoo parsers because they might be useful as primitives
+ // for custom option types.
+ parseBool: parseBool,
+ parseString: parseString,
+ parseNumber: parseNumber,
+ parseInteger: parseInteger,
+ parsePositiveInteger: parsePositiveInteger,
+ parseDate: parseDate
+};
diff --git a/source/node_modules/dashdash/node_modules/assert-plus/AUTHORS b/source/node_modules/dashdash/node_modules/assert-plus/AUTHORS
new file mode 100644
index 000000000..1923524fe
--- /dev/null
+++ b/source/node_modules/dashdash/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy
+Fred Kuo
+Lars-Magnus Skog
+Mark Cavage
+Patrick Mooney
+Rob Gulewich
diff --git a/source/node_modules/dashdash/node_modules/assert-plus/CHANGES.md b/source/node_modules/dashdash/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 000000000..57d92bfdb
--- /dev/null
+++ b/source/node_modules/dashdash/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/source/node_modules/dashdash/node_modules/assert-plus/README.md b/source/node_modules/dashdash/node_modules/assert-plus/README.md
new file mode 100644
index 000000000..ec200d161
--- /dev/null
+++ b/source/node_modules/dashdash/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object. (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+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.
+
+## Bugs
+
+See .
diff --git a/source/node_modules/dashdash/node_modules/assert-plus/assert.js b/source/node_modules/dashdash/node_modules/assert-plus/assert.js
new file mode 100644
index 000000000..26f944eec
--- /dev/null
+++ b/source/node_modules/dashdash/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/source/node_modules/dashdash/node_modules/assert-plus/package.json b/source/node_modules/dashdash/node_modules/assert-plus/package.json
new file mode 100644
index 000000000..57257971f
--- /dev/null
+++ b/source/node_modules/dashdash/node_modules/assert-plus/package.json
@@ -0,0 +1,107 @@
+{
+ "_args": [
+ [
+ "assert-plus@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/dashdash"
+ ]
+ ],
+ "_from": "assert-plus@>=1.0.0 <2.0.0",
+ "_id": "assert-plus@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/dashdash/assert-plus",
+ "_nodeVersion": "0.10.40",
+ "_npmUser": {
+ "email": "patrick.f.mooney@gmail.com",
+ "name": "pfmooney"
+ },
+ "_npmVersion": "3.3.9",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "assert-plus",
+ "raw": "assert-plus@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/dashdash"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "_shrinkwrap": null,
+ "_spec": "assert-plus@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/dashdash",
+ "author": {
+ "email": "mcavage@gmail.com",
+ "name": "Mark Cavage"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
+ },
+ {
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
+ },
+ {
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
+ }
+ ],
+ "dependencies": {},
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {
+ "faucet": "0.0.1",
+ "tape": "4.2.2"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "license": "MIT",
+ "main": "./assert.js",
+ "maintainers": [
+ {
+ "name": "mcavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
+ }
+ ],
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "scripts": {
+ "test": "tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/dashdash/package.json b/source/node_modules/dashdash/package.json
new file mode 100644
index 000000000..f47bb074a
--- /dev/null
+++ b/source/node_modules/dashdash/package.json
@@ -0,0 +1,116 @@
+{
+ "_args": [
+ [
+ "dashdash@>=1.10.1 <2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/sshpk"
+ ]
+ ],
+ "_from": "dashdash@>=1.10.1 <2.0.0",
+ "_id": "dashdash@1.13.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/dashdash",
+ "_npmOperationalInternal": {
+ "host": "packages-5-east.internal.npmjs.com",
+ "tmp": "tmp/dashdash-1.13.0.tgz_1455248887432_0.5643249636050314"
+ },
+ "_npmUser": {
+ "email": "trentm@gmail.com",
+ "name": "trentm"
+ },
+ "_npmVersion": "1.4.29",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "dashdash",
+ "raw": "dashdash@>=1.10.1 <2.0.0",
+ "rawSpec": ">=1.10.1 <2.0.0",
+ "scope": null,
+ "spec": ">=1.10.1 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/sshpk"
+ ],
+ "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.13.0.tgz",
+ "_shasum": "a5aae6fd9d8e156624eb0dd9259eb12ba245385a",
+ "_shrinkwrap": null,
+ "_spec": "dashdash@>=1.10.1 <2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/sshpk",
+ "author": {
+ "email": "trentm@gmail.com",
+ "name": "Trent Mick",
+ "url": "http://trentm.com"
+ },
+ "bugs": {
+ "url": "https://github.com/trentm/node-dashdash/issues"
+ },
+ "contributors": [
+ {
+ "name": "Trent Mick",
+ "email": "trentm@gmail.com",
+ "url": "http://trentm.com"
+ },
+ {
+ "name": "Isaac Schlueter",
+ "url": "https://github.com/isaacs"
+ },
+ {
+ "name": "Joshua M. Clulow",
+ "url": "https://github.com/jclulow"
+ },
+ {
+ "name": "Patrick Mooney",
+ "url": "https://github.com/pfmooney"
+ },
+ {
+ "name": "Dave Pacheco",
+ "url": "https://github.com/davepacheco"
+ }
+ ],
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ },
+ "description": "A light, featureful and explicit option parsing library.",
+ "devDependencies": {
+ "nodeunit": "0.9.x"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "a5aae6fd9d8e156624eb0dd9259eb12ba245385a",
+ "tarball": "http://registry.npmjs.org/dashdash/-/dashdash-1.13.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "gitHead": "69425c9d9000d72c95e78ca43e3f84675f8f73ff",
+ "homepage": "https://github.com/trentm/node-dashdash",
+ "keywords": [
+ "args",
+ "bash",
+ "cli",
+ "command",
+ "completion",
+ "option",
+ "parser",
+ "parsing"
+ ],
+ "license": "MIT",
+ "main": "./lib/dashdash.js",
+ "maintainers": [
+ {
+ "name": "trentm",
+ "email": "trentm@gmail.com"
+ }
+ ],
+ "name": "dashdash",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/trentm/node-dashdash.git"
+ },
+ "scripts": {
+ "test": "nodeunit test/*.test.js"
+ },
+ "version": "1.13.0"
+}
diff --git a/source/node_modules/dateformat/.npmignore b/source/node_modules/dateformat/.npmignore
new file mode 100644
index 000000000..830d0ff74
--- /dev/null
+++ b/source/node_modules/dateformat/.npmignore
@@ -0,0 +1,57 @@
+# .gitignore
+#
+# Copyright (c) 2014 Charlike Mike Reagent, contributors.
+# Released under the MIT license.
+#
+
+# Always-ignore dirs #
+# ####################
+_gh_pages
+node_modules
+bower_components
+components
+vendor
+build
+dest
+dist
+src
+lib-cov
+coverage
+nbproject
+cache
+temp
+tmp
+
+# Packages #
+# ##########
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+
+# OS, Logs and databases #
+# #########################
+*.pid
+*.dat
+*.log
+*.sql
+*.sqlite
+*~
+~*
+
+# Another files #
+# ###############
+Icon?
+.DS_Store*
+Thumbs.db
+ehthumbs.db
+Desktop.ini
+npm-debug.log
+.directory
+._*
+
+koa-better-body
\ No newline at end of file
diff --git a/source/node_modules/dateformat/.travis.yml b/source/node_modules/dateformat/.travis.yml
new file mode 100644
index 000000000..18ae2d89c
--- /dev/null
+++ b/source/node_modules/dateformat/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.11"
+ - "0.10"
diff --git a/source/node_modules/dateformat/LICENSE b/source/node_modules/dateformat/LICENSE
new file mode 100644
index 000000000..57d44e2ac
--- /dev/null
+++ b/source/node_modules/dateformat/LICENSE
@@ -0,0 +1,20 @@
+(c) 2007-2009 Steven Levithan
+
+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.
diff --git a/source/node_modules/dateformat/Readme.md b/source/node_modules/dateformat/Readme.md
new file mode 100644
index 000000000..0aaf1e822
--- /dev/null
+++ b/source/node_modules/dateformat/Readme.md
@@ -0,0 +1,82 @@
+# dateformat
+
+A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.
+
+[](https://travis-ci.org/felixge/node-dateformat)
+
+## Modifications
+
+* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.
+* Added a `module.exports = dateFormat;` statement at the bottom
+* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week
+
+## Installation
+
+```bash
+$ npm install dateformat
+$ dateformat --help
+```
+
+## Usage
+
+As taken from Steven's post, modified to match the Modifications listed above:
+```js
+ var dateFormat = require('dateformat');
+ var now = new Date();
+
+ // Basic usage
+ dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
+ // Saturday, June 9th, 2007, 5:46:21 PM
+
+ // You can use one of several named masks
+ dateFormat(now, "isoDateTime");
+ // 2007-06-09T17:46:21
+
+ // ...Or add your own
+ dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"';
+ dateFormat(now, "hammerTime");
+ // 17:46! Can't touch this!
+
+ // When using the standalone dateFormat function,
+ // you can also provide the date as a string
+ dateFormat("Jun 9 2007", "fullDate");
+ // Saturday, June 9, 2007
+
+ // Note that if you don't include the mask argument,
+ // dateFormat.masks.default is used
+ dateFormat(now);
+ // Sat Jun 09 2007 17:46:21
+
+ // And if you don't include the date argument,
+ // the current date and time is used
+ dateFormat();
+ // Sat Jun 09 2007 17:46:22
+
+ // You can also skip the date argument (as long as your mask doesn't
+ // contain any numbers), in which case the current date/time is used
+ dateFormat("longTime");
+ // 5:46:22 PM EST
+
+ // And finally, you can convert local time to UTC time. Simply pass in
+ // true as an additional argument (no argument skipping allowed in this case):
+ dateFormat(now, "longTime", true);
+ // 10:46:21 PM UTC
+
+ // ...Or add the prefix "UTC:" or "GMT:" to your mask.
+ dateFormat(now, "UTC:h:MM:ss TT Z");
+ // 10:46:21 PM UTC
+
+ // You can also get the ISO 8601 week of the year:
+ dateFormat(now, "W");
+ // 42
+
+ // and also get the ISO 8601 numeric representation of the day of the week:
+ dateFormat(now,"N");
+ // 6
+```
+## License
+
+(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.
+
+[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format
+[stevenlevithan]: http://stevenlevithan.com/
diff --git a/source/node_modules/dateformat/bin/cli.js b/source/node_modules/dateformat/bin/cli.js
new file mode 100755
index 000000000..e095ddc68
--- /dev/null
+++ b/source/node_modules/dateformat/bin/cli.js
@@ -0,0 +1,75 @@
+#!/usr/bin/env node
+/**
+ * dateformat
+ *
+ * Copyright (c) 2014 Charlike Mike Reagent (cli), contributors.
+ * Released under the MIT license.
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ */
+
+var dateFormat = require('../lib/dateformat');
+var meow = require('meow');
+var stdin = require('get-stdin');
+
+var cli = meow({
+ pkg: '../package.json',
+ help: [
+ 'Options',
+ ' --help Show this help',
+ ' --version Current version of package',
+ ' -d | --date Date that want to format (Date object as Number or String)',
+ ' -m | --mask Mask that will use to format the date',
+ ' -u | --utc Convert local time to UTC time or use `UTC:` prefix in mask',
+ ' -g | --gmt You can use `GMT:` prefix in mask',
+ '',
+ 'Usage',
+ ' dateformat [date] [mask]',
+ ' dateformat "Nov 26 2014" "fullDate"',
+ ' dateformat 1416985417095 "dddd, mmmm dS, yyyy, h:MM:ss TT"',
+ ' dateformat 1315361943159 "W"',
+ ' dateformat "UTC:h:MM:ss TT Z"',
+ ' dateformat "longTime" true',
+ ' dateformat "longTime" false true',
+ ' dateformat "Jun 9 2007" "fullDate" true',
+ ' date +%s | dateformat',
+ ''
+ ].join('\n')
+})
+
+var date = cli.input[0] || cli.flags.d || cli.flags.date || Date.now();
+var mask = cli.input[1] || cli.flags.m || cli.flags.mask || dateFormat.masks.default;
+var utc = cli.input[2] || cli.flags.u || cli.flags.utc || false;
+var gmt = cli.input[3] || cli.flags.g || cli.flags.gmt || false;
+
+utc = utc === 'true' ? true : false;
+gmt = gmt === 'true' ? true : false;
+
+if (!cli.input.length) {
+ stdin(function(date) {
+ console.log(dateFormat(date, dateFormat.masks.default, utc, gmt));
+ });
+ return;
+}
+
+if (cli.input.length === 1 && date) {
+ mask = date;
+ date = Date.now();
+ console.log(dateFormat(date, mask, utc, gmt));
+ return;
+}
+
+if (cli.input.length >= 2 && date && mask) {
+ if (mask === 'true' || mask === 'false') {
+ utc = mask === 'true' ? true : false;
+ gmt = !utc;
+ mask = date
+ date = Date.now();
+ }
+ console.log(dateFormat(date, mask, utc, gmt));
+ return;
+}
diff --git a/source/node_modules/dateformat/lib/dateformat.js b/source/node_modules/dateformat/lib/dateformat.js
new file mode 100644
index 000000000..eb2574649
--- /dev/null
+++ b/source/node_modules/dateformat/lib/dateformat.js
@@ -0,0 +1,226 @@
+/*
+ * Date Format 1.2.3
+ * (c) 2007-2009 Steven Levithan
+ * MIT license
+ *
+ * Includes enhancements by Scott Trenda
+ * and Kris Kowal
+ *
+ * Accepts a date, a mask, or a date and a mask.
+ * Returns a formatted version of the given date.
+ * The date defaults to the current date/time.
+ * The mask defaults to dateFormat.masks.default.
+ */
+
+(function(global) {
+ 'use strict';
+
+ var dateFormat = (function() {
+ var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g;
+ var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g;
+ var timezoneClip = /[^-+\dA-Z]/g;
+
+ // Regexes and supporting functions are cached through closure
+ return function (date, mask, utc, gmt) {
+
+ // You can't provide utc if you skip other args (use the 'UTC:' mask prefix)
+ if (arguments.length === 1 && kindOf(date) === 'string' && !/\d/.test(date)) {
+ mask = date;
+ date = undefined;
+ }
+
+ date = date || new Date;
+
+ if(!(date instanceof Date)) {
+ date = new Date(date);
+ }
+
+ if (isNaN(date)) {
+ throw TypeError('Invalid date');
+ }
+
+ mask = String(dateFormat.masks[mask] || mask || dateFormat.masks['default']);
+
+ // Allow setting the utc/gmt argument via the mask
+ var maskSlice = mask.slice(0, 4);
+ if (maskSlice === 'UTC:' || maskSlice === 'GMT:') {
+ mask = mask.slice(4);
+ utc = true;
+ if (maskSlice === 'GMT:') {
+ gmt = true;
+ }
+ }
+
+ var _ = utc ? 'getUTC' : 'get';
+ var d = date[_ + 'Date']();
+ var D = date[_ + 'Day']();
+ var m = date[_ + 'Month']();
+ var y = date[_ + 'FullYear']();
+ var H = date[_ + 'Hours']();
+ var M = date[_ + 'Minutes']();
+ var s = date[_ + 'Seconds']();
+ var L = date[_ + 'Milliseconds']();
+ var o = utc ? 0 : date.getTimezoneOffset();
+ var W = getWeek(date);
+ var N = getDayOfWeek(date);
+ var flags = {
+ d: d,
+ dd: pad(d),
+ ddd: dateFormat.i18n.dayNames[D],
+ dddd: dateFormat.i18n.dayNames[D + 7],
+ m: m + 1,
+ mm: pad(m + 1),
+ mmm: dateFormat.i18n.monthNames[m],
+ mmmm: dateFormat.i18n.monthNames[m + 12],
+ yy: String(y).slice(2),
+ yyyy: y,
+ h: H % 12 || 12,
+ hh: pad(H % 12 || 12),
+ H: H,
+ HH: pad(H),
+ M: M,
+ MM: pad(M),
+ s: s,
+ ss: pad(s),
+ l: pad(L, 3),
+ L: pad(Math.round(L / 10)),
+ t: H < 12 ? 'a' : 'p',
+ tt: H < 12 ? 'am' : 'pm',
+ T: H < 12 ? 'A' : 'P',
+ TT: H < 12 ? 'AM' : 'PM',
+ Z: gmt ? 'GMT' : utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''),
+ o: (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
+ S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10],
+ W: W,
+ N: N
+ };
+
+ return mask.replace(token, function (match) {
+ if (match in flags) {
+ return flags[match];
+ }
+ return match.slice(1, match.length - 1);
+ });
+ };
+ })();
+
+ dateFormat.masks = {
+ 'default': 'ddd mmm dd yyyy HH:MM:ss',
+ 'shortDate': 'm/d/yy',
+ 'mediumDate': 'mmm d, yyyy',
+ 'longDate': 'mmmm d, yyyy',
+ 'fullDate': 'dddd, mmmm d, yyyy',
+ 'shortTime': 'h:MM TT',
+ 'mediumTime': 'h:MM:ss TT',
+ 'longTime': 'h:MM:ss TT Z',
+ 'isoDate': 'yyyy-mm-dd',
+ 'isoTime': 'HH:MM:ss',
+ 'isoDateTime': 'yyyy-mm-dd\'T\'HH:MM:sso',
+ 'isoUtcDateTime': 'UTC:yyyy-mm-dd\'T\'HH:MM:ss\'Z\'',
+ 'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z'
+ };
+
+ // Internationalization strings
+ dateFormat.i18n = {
+ dayNames: [
+ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat',
+ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
+ ],
+ monthNames: [
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',
+ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
+ ]
+ };
+
+function pad(val, len) {
+ val = String(val);
+ len = len || 2;
+ while (val.length < len) {
+ val = '0' + val;
+ }
+ return val;
+}
+
+/**
+ * Get the ISO 8601 week number
+ * Based on comments from
+ * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html
+ *
+ * @param {Object} `date`
+ * @return {Number}
+ */
+function getWeek(date) {
+ // Remove time components of date
+ var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate());
+
+ // Change date to Thursday same week
+ targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3);
+
+ // Take January 4th as it is always in week 1 (see ISO 8601)
+ var firstThursday = new Date(targetThursday.getFullYear(), 0, 4);
+
+ // Change date to Thursday same week
+ firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3);
+
+ // Check if daylight-saving-time-switch occured and correct for it
+ var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset();
+ targetThursday.setHours(targetThursday.getHours() - ds);
+
+ // Number of weeks between target Thursday and first Thursday
+ var weekDiff = (targetThursday - firstThursday) / (86400000*7);
+ return 1 + Math.floor(weekDiff);
+}
+
+/**
+ * Get ISO-8601 numeric representation of the day of the week
+ * 1 (for Monday) through 7 (for Sunday)
+ *
+ * @param {Object} `date`
+ * @return {Number}
+ */
+function getDayOfWeek(date) {
+ var dow = date.getDay();
+ if(dow === 0) {
+ dow = 7;
+ }
+ return dow;
+}
+
+/**
+ * kind-of shortcut
+ * @param {*} val
+ * @return {String}
+ */
+function kindOf(val) {
+ if (val === null) {
+ return 'null';
+ }
+
+ if (val === undefined) {
+ return 'undefined';
+ }
+
+ if (typeof val !== 'object') {
+ return typeof val;
+ }
+
+ if (Array.isArray(val)) {
+ return 'array';
+ }
+
+ return {}.toString.call(val)
+ .slice(8, -1).toLowerCase();
+};
+
+
+
+ if (typeof define === 'function' && define.amd) {
+ define(function () {
+ return dateFormat;
+ });
+ } else if (typeof exports === 'object') {
+ module.exports = dateFormat;
+ } else {
+ global.dateFormat = dateFormat;
+ }
+})(this);
diff --git a/source/node_modules/dateformat/package.json b/source/node_modules/dateformat/package.json
new file mode 100644
index 000000000..70da62616
--- /dev/null
+++ b/source/node_modules/dateformat/package.json
@@ -0,0 +1,100 @@
+{
+ "_args": [
+ [
+ "dateformat@^1.0.11",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "dateformat@>=1.0.11 <2.0.0",
+ "_id": "dateformat@1.0.12",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/dateformat",
+ "_nodeVersion": "0.12.7",
+ "_npmUser": {
+ "email": "felix@debuggable.com",
+ "name": "felixge"
+ },
+ "_npmVersion": "2.11.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "dateformat",
+ "raw": "dateformat@^1.0.11",
+ "rawSpec": "^1.0.11",
+ "scope": null,
+ "spec": ">=1.0.11 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
+ "_shasum": "9f124b67594c937ff706932e4a642cca8dbbfee9",
+ "_shrinkwrap": null,
+ "_spec": "dateformat@^1.0.11",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util",
+ "author": {
+ "name": "Steven Levithan"
+ },
+ "bin": {
+ "dateformat": "bin/cli.js"
+ },
+ "bugs": {
+ "url": "https://github.com/felixge/node-dateformat/issues"
+ },
+ "contributors": [
+ {
+ "name": "Steven Levithan"
+ },
+ {
+ "name": "Felix Geisendörfer",
+ "email": "felix@debuggable.com"
+ },
+ {
+ "name": "Christoph Tavan",
+ "email": "dev@tavan.de"
+ }
+ ],
+ "dependencies": {
+ "get-stdin": "^4.0.1",
+ "meow": "^3.3.0"
+ },
+ "description": "A node.js package for Steven Levithan's excellent dateFormat() function.",
+ "devDependencies": {
+ "mocha": "2.0.1",
+ "underscore": "1.7.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9f124b67594c937ff706932e4a642cca8dbbfee9",
+ "tarball": "http://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "gitHead": "17364d40e61c06f6de228ab94f3660a27f357f01",
+ "homepage": "https://github.com/felixge/node-dateformat",
+ "license": "MIT",
+ "main": "lib/dateformat",
+ "maintainers": [
+ {
+ "name": "felixge",
+ "email": "felix@debuggable.com"
+ },
+ {
+ "name": "ctavan",
+ "email": "dev@tavan.de"
+ }
+ ],
+ "name": "dateformat",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/felixge/node-dateformat.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.12"
+}
diff --git a/source/node_modules/dateformat/test/test_dayofweek.js b/source/node_modules/dateformat/test/test_dayofweek.js
new file mode 100644
index 000000000..7f37407cd
--- /dev/null
+++ b/source/node_modules/dateformat/test/test_dayofweek.js
@@ -0,0 +1,15 @@
+var assert = require('assert');
+
+var dateFormat = require('./../lib/dateformat');
+
+describe('dayOfWeek', function() {
+ it('should correctly format the timezone part', function(done) {
+ var start = 10; // the 10 of March 2013 is a Sunday
+ for(var dow = 1; dow <= 7; dow++){
+ var date = new Date('2013-03-' + (start + dow));
+ var N = dateFormat(date, 'N');
+ assert.strictEqual(N, String(dow));
+ }
+ done();
+ });
+});
diff --git a/source/node_modules/dateformat/test/test_formats.js b/source/node_modules/dateformat/test/test_formats.js
new file mode 100644
index 000000000..df186caef
--- /dev/null
+++ b/source/node_modules/dateformat/test/test_formats.js
@@ -0,0 +1,76 @@
+var assert = require('assert');
+
+var _ = require('underscore');
+
+var dateFormat = require('../lib/dateformat');
+
+var expects = {
+ 'default': 'Wed Nov 26 2014 13:19:44',
+ 'shortDate': '11/26/14',
+ 'mediumDate': 'Nov 26, 2014',
+ 'longDate': 'November 26, 2014',
+ 'fullDate': 'Wednesday, November 26, 2014',
+ 'shortTime': '1:19 PM',
+ 'mediumTime': '1:19:44 PM',
+ 'longTime': '1:19:44 PM %TZ_PREFIX%%TZ_OFFSET%',
+ 'isoDate': '2014-11-26',
+ 'isoTime': '13:19:44',
+ 'isoDateTime': '2014-11-26T13:19:44%TZ_OFFSET%',
+ 'isoUtcDateTime': '',
+ 'expiresHeaderFormat': 'Wed, 26 Nov 2014 13:19:44 %TZ_PREFIX%%TZ_OFFSET%'
+};
+
+function pad(num, size) {
+ var s = num + '';
+ while (s.length < size) {
+ s = '0' + s;
+ }
+ return s;
+}
+
+function parseOffset(date) {
+ var offset = date.getTimezoneOffset();
+ var hours = Math.floor(-1 * offset / 60);
+ var minutes = (-1 * offset) - (hours * 60);
+ var sign = offset > 0 ? '-' : '+';
+ return {
+ offset: offset,
+ hours: hours,
+ minutes: minutes,
+ sign: sign,
+ };
+}
+
+function timezoneOffset(date) {
+ var offset = parseOffset(date);
+ return offset.sign + pad(offset.hours, 2) + pad(offset.minutes, 2);
+}
+
+describe('dateformat([now], [mask])', function() {
+ _.each(dateFormat.masks, function(value, key) {
+ it('should format `' + key + '` mask', function(done) {
+ var now = new Date(2014, 10, 26, 13, 19, 44);
+ var tzOffset = timezoneOffset(now);
+ var expected = expects[key].replace(/%TZ_PREFIX%/, 'GMT')
+ .replace(/%TZ_OFFSET%/g, tzOffset)
+ .replace(/GMT\+0000/g, 'UTC');
+ if (key === 'isoUtcDateTime') {
+ var offset = parseOffset(now);
+ now.setHours(now.getHours() - offset.hours,
+ now.getMinutes() - offset.minutes);
+ var expected = now.toISOString().replace(/\.000/g, '');
+ }
+ var actual = dateFormat(now, key);
+ assert.strictEqual(actual, expected);
+ done();
+ });
+ });
+ it('should use `default` mask, when `mask` is empty', function(done) {
+ var now = new Date(2014, 10, 26, 13, 19, 44);
+ var expected = expects['default'];
+ var actual = dateFormat(now);
+
+ assert.strictEqual(actual, expected);
+ done();
+ });
+});
diff --git a/source/node_modules/dateformat/test/test_isoutcdatetime.js b/source/node_modules/dateformat/test/test_isoutcdatetime.js
new file mode 100644
index 000000000..886b7a5bd
--- /dev/null
+++ b/source/node_modules/dateformat/test/test_isoutcdatetime.js
@@ -0,0 +1,11 @@
+var assert = require('assert');
+
+var dateFormat = require('./../lib/dateformat');
+
+describe('isoUtcDateTime', function() {
+ it('should correctly format the timezone part', function(done) {
+ var actual = dateFormat('2014-06-02T13:23:21-08:00', 'isoUtcDateTime');
+ assert.strictEqual(actual, '2014-06-02T21:23:21Z');
+ done();
+ });
+});
diff --git a/source/node_modules/dateformat/test/weekofyear/test_weekofyear.js b/source/node_modules/dateformat/test/weekofyear/test_weekofyear.js
new file mode 100644
index 000000000..d1ddbe818
--- /dev/null
+++ b/source/node_modules/dateformat/test/weekofyear/test_weekofyear.js
@@ -0,0 +1,4 @@
+var dateFormat = require('../lib/dateformat.js');
+
+var val = process.argv[2] || new Date();
+console.log(dateFormat(val, 'W'));
diff --git a/source/node_modules/dateformat/test/weekofyear/test_weekofyear.sh b/source/node_modules/dateformat/test/weekofyear/test_weekofyear.sh
new file mode 100644
index 000000000..3c3e69b31
--- /dev/null
+++ b/source/node_modules/dateformat/test/weekofyear/test_weekofyear.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# this just takes php's date() function as a reference to check if week of year
+# is calculated correctly in the range from 1970 .. 2038 by brute force...
+
+SEQ="seq"
+SYSTEM=`uname`
+if [ "$SYSTEM" = "Darwin" ]; then
+ SEQ="jot"
+fi
+
+for YEAR in {1970..2038}; do
+ for MONTH in {1..12}; do
+ DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}')
+ for DAY in $( $SEQ $DAYS ); do
+ DATE=$YEAR-$MONTH-$DAY
+ echo -n $DATE ...
+ NODEVAL=$(node test_weekofyear.js $DATE)
+ PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));")
+ if [ "$NODEVAL" -ne "$PHPVAL" ]; then
+ echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE"
+ else
+ echo " OK"
+ fi
+ done
+ done
+done
diff --git a/source/node_modules/debug/.jshintrc b/source/node_modules/debug/.jshintrc
new file mode 100644
index 000000000..299877f26
--- /dev/null
+++ b/source/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/source/node_modules/debug/.npmignore b/source/node_modules/debug/.npmignore
new file mode 100644
index 000000000..7e6163db0
--- /dev/null
+++ b/source/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/source/node_modules/debug/History.md b/source/node_modules/debug/History.md
new file mode 100644
index 000000000..854c9711c
--- /dev/null
+++ b/source/node_modules/debug/History.md
@@ -0,0 +1,195 @@
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/source/node_modules/debug/Makefile b/source/node_modules/debug/Makefile
new file mode 100644
index 000000000..5cf4a5962
--- /dev/null
+++ b/source/node_modules/debug/Makefile
@@ -0,0 +1,36 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/source/node_modules/debug/Readme.md b/source/node_modules/debug/Readme.md
new file mode 100644
index 000000000..b4f45e3cc
--- /dev/null
+++ b/source/node_modules/debug/Readme.md
@@ -0,0 +1,188 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ 
+
+ 
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ 
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ 
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ 
+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+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.
diff --git a/source/node_modules/debug/bower.json b/source/node_modules/debug/bower.json
new file mode 100644
index 000000000..6af573ff5
--- /dev/null
+++ b/source/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.2.0",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk "
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/source/node_modules/debug/browser.js b/source/node_modules/debug/browser.js
new file mode 100644
index 000000000..7c7645221
--- /dev/null
+++ b/source/node_modules/debug/browser.js
@@ -0,0 +1,168 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/source/node_modules/debug/component.json b/source/node_modules/debug/component.json
new file mode 100644
index 000000000..ca1063724
--- /dev/null
+++ b/source/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.2.0",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/source/node_modules/debug/debug.js b/source/node_modules/debug/debug.js
new file mode 100644
index 000000000..7571a8605
--- /dev/null
+++ b/source/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/source/node_modules/debug/node.js b/source/node_modules/debug/node.js
new file mode 100644
index 000000000..1d392a81d
--- /dev/null
+++ b/source/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/source/node_modules/debug/package.json b/source/node_modules/debug/package.json
new file mode 100644
index 000000000..429e2602e
--- /dev/null
+++ b/source/node_modules/debug/package.json
@@ -0,0 +1,98 @@
+{
+ "_args": [
+ [
+ "debug@^2.2.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/array-index"
+ ]
+ ],
+ "_from": "debug@>=2.2.0 <3.0.0",
+ "_id": "debug@2.2.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/debug",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "email": "nathan@tootallnate.net",
+ "name": "tootallnate"
+ },
+ "_npmVersion": "2.7.4",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "debug",
+ "raw": "debug@^2.2.0",
+ "rawSpec": "^2.2.0",
+ "scope": null,
+ "spec": ">=2.2.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/array-index"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "_shrinkwrap": null,
+ "_spec": "debug@^2.2.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/array-index",
+ "author": {
+ "email": "tj@vision-media.ca",
+ "name": "TJ Holowaychuk"
+ },
+ "browser": "./browser.js",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "component": {
+ "scripts": {
+ "debug/debug.js": "debug.js",
+ "debug/index.js": "browser.js"
+ }
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ }
+ ],
+ "dependencies": {
+ "ms": "0.7.1"
+ },
+ "description": "small debugging utility",
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "tarball": "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
+ },
+ "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35",
+ "homepage": "https://github.com/visionmedia/debug",
+ "keywords": [
+ "debug",
+ "debugger",
+ "log"
+ ],
+ "license": "MIT",
+ "main": "./node.js",
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "name": "debug",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "scripts": {},
+ "version": "2.2.0"
+}
diff --git a/source/node_modules/decamelize/index.js b/source/node_modules/decamelize/index.js
new file mode 100644
index 000000000..4f58b35f3
--- /dev/null
+++ b/source/node_modules/decamelize/index.js
@@ -0,0 +1,16 @@
+'use strict';
+var escapeStringRegexp = require('escape-string-regexp');
+
+module.exports = function (str, sep) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ sep = typeof sep === 'undefined' ? '_' : sep;
+
+ var reSep = escapeStringRegexp(sep);
+
+ return str.replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
+ .replace(new RegExp('(' + reSep + '[A-Z])([A-Z])', 'g'), '$1' + reSep + '$2')
+ .toLowerCase();
+};
diff --git a/source/node_modules/decamelize/license b/source/node_modules/decamelize/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/source/node_modules/decamelize/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/decamelize/package.json b/source/node_modules/decamelize/package.json
new file mode 100644
index 000000000..edfa04011
--- /dev/null
+++ b/source/node_modules/decamelize/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ "decamelize@^1.1.2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/meow"
+ ]
+ ],
+ "_from": "decamelize@>=1.1.2 <2.0.0",
+ "_id": "decamelize@1.1.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/decamelize",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "decamelize",
+ "raw": "decamelize@^1.1.2",
+ "rawSpec": "^1.1.2",
+ "scope": null,
+ "spec": ">=1.1.2 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/meow",
+ "/yargs"
+ ],
+ "_resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.1.2.tgz",
+ "_shasum": "dcc93727be209632e98b02718ef4cb79602322f2",
+ "_shrinkwrap": null,
+ "_spec": "decamelize@^1.1.2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/meow",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/decamelize/issues"
+ },
+ "dependencies": {
+ "escape-string-regexp": "^1.0.4"
+ },
+ "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "dcc93727be209632e98b02718ef4cb79602322f2",
+ "tarball": "http://registry.npmjs.org/decamelize/-/decamelize-1.1.2.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "82c87d3382126375ab0c3b7f5438bfd5eccb18c3",
+ "homepage": "https://github.com/sindresorhus/decamelize",
+ "keywords": [
+ "camelcase",
+ "case",
+ "convert",
+ "dash",
+ "decamelcase",
+ "decamelize",
+ "hyphen",
+ "lowercase",
+ "str",
+ "string",
+ "text"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "decamelize",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/decamelize.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.1.2"
+}
diff --git a/source/node_modules/decamelize/readme.md b/source/node_modules/decamelize/readme.md
new file mode 100644
index 000000000..b7b8fa15a
--- /dev/null
+++ b/source/node_modules/decamelize/readme.md
@@ -0,0 +1,48 @@
+# decamelize [](https://travis-ci.org/sindresorhus/decamelize)
+
+> Convert a camelized string into a lowercased one with a custom separator
+> Example: `unicornRainbow` → `unicorn_rainbow`
+
+
+## Install
+
+```
+$ npm install --save decamelize
+```
+
+
+## Usage
+
+```js
+const decamelize = require('decamelize');
+
+decamelize('unicornRainbow');
+//=> 'unicorn_rainbow'
+
+decamelize('unicornRainbow', '-');
+//=> 'unicorn-rainbow'
+```
+
+
+## API
+
+### decamelize(input, [separator])
+
+#### input
+
+Type: `string`
+
+#### separator
+
+Type: `string`
+Default: `_`
+
+
+## Related
+
+See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/defaults/.npmignore b/source/node_modules/defaults/.npmignore
new file mode 100644
index 000000000..3c3629e64
--- /dev/null
+++ b/source/node_modules/defaults/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/source/node_modules/defaults/LICENSE b/source/node_modules/defaults/LICENSE
new file mode 100644
index 000000000..d88b07207
--- /dev/null
+++ b/source/node_modules/defaults/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Elijah Insua
+
+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.
diff --git a/source/node_modules/defaults/README.md b/source/node_modules/defaults/README.md
new file mode 100644
index 000000000..1a4a2ea9c
--- /dev/null
+++ b/source/node_modules/defaults/README.md
@@ -0,0 +1,43 @@
+# defaults
+
+A simple one level options merge utility
+
+## install
+
+`npm install defaults`
+
+## use
+
+```javascript
+
+var defaults = require('defaults');
+
+var handle = function(options, fn) {
+ options = defaults(options, {
+ timeout: 100
+ });
+
+ setTimeout(function() {
+ fn(options);
+ }, options.timeout);
+}
+
+handle({ timeout: 1000 }, function() {
+ // we're here 1000 ms later
+});
+
+handle({ timeout: 10000 }, function() {
+ // we're here 10s later
+});
+
+```
+
+## summary
+
+this module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults`
+
+Sidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto.
+
+## license
+
+[MIT](LICENSE)
diff --git a/source/node_modules/defaults/index.js b/source/node_modules/defaults/index.js
new file mode 100644
index 000000000..cb7d75c9c
--- /dev/null
+++ b/source/node_modules/defaults/index.js
@@ -0,0 +1,13 @@
+var clone = require('clone');
+
+module.exports = function(options, defaults) {
+ options = options || {};
+
+ Object.keys(defaults).forEach(function(key) {
+ if (typeof options[key] === 'undefined') {
+ options[key] = clone(defaults[key]);
+ }
+ });
+
+ return options;
+};
\ No newline at end of file
diff --git a/source/node_modules/defaults/package.json b/source/node_modules/defaults/package.json
new file mode 100644
index 000000000..4192a454b
--- /dev/null
+++ b/source/node_modules/defaults/package.json
@@ -0,0 +1,80 @@
+{
+ "_args": [
+ [
+ "defaults@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs"
+ ]
+ ],
+ "_from": "defaults@>=1.0.0 <2.0.0",
+ "_id": "defaults@1.0.3",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/defaults",
+ "_nodeVersion": "4.1.1",
+ "_npmUser": {
+ "email": "tmpvar@gmail.com",
+ "name": "tmpvar"
+ },
+ "_npmVersion": "2.14.4",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "defaults",
+ "raw": "defaults@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/vinyl-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
+ "_shasum": "c656051e9817d9ff08ed881477f3fe4019f3ef7d",
+ "_shrinkwrap": null,
+ "_spec": "defaults@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs",
+ "author": {
+ "email": "tmpvar@gmail.com",
+ "name": "Elijah Insua"
+ },
+ "bugs": {
+ "url": "https://github.com/tmpvar/defaults/issues"
+ },
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "description": "merge single level defaults over a config object",
+ "devDependencies": {
+ "tap": "^2.0.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c656051e9817d9ff08ed881477f3fe4019f3ef7d",
+ "tarball": "http://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz"
+ },
+ "gitHead": "8831ec32a5f999bfae1a8c9bf32880971ed7c6f2",
+ "homepage": "https://github.com/tmpvar/defaults#readme",
+ "keywords": [
+ "config",
+ "defaults"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "tmpvar",
+ "email": "tmpvar@gmail.com"
+ }
+ ],
+ "name": "defaults",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/tmpvar/defaults.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.3"
+}
diff --git a/source/node_modules/defaults/test.js b/source/node_modules/defaults/test.js
new file mode 100644
index 000000000..60e0ffba8
--- /dev/null
+++ b/source/node_modules/defaults/test.js
@@ -0,0 +1,34 @@
+var defaults = require('./'),
+ test = require('tap').test;
+
+test("ensure options is an object", function(t) {
+ var options = defaults(false, { a : true });
+ t.ok(options.a);
+ t.end()
+});
+
+test("ensure defaults override keys", function(t) {
+ var result = defaults({}, { a: false, b: true });
+ t.ok(result.b, 'b merges over undefined');
+ t.equal(result.a, false, 'a merges over undefined');
+ t.end();
+});
+
+test("ensure defined keys are not overwritten", function(t) {
+ var result = defaults({ b: false }, { a: false, b: true });
+ t.equal(result.b, false, 'b not merged');
+ t.equal(result.a, false, 'a merges over undefined');
+ t.end();
+});
+
+test("ensure defaults clone nested objects", function(t) {
+ var d = { a: [1,2,3], b: { hello : 'world' } };
+ var result = defaults({}, d);
+ t.equal(result.a.length, 3, 'objects should be clones');
+ t.ok(result.a !== d.a, 'objects should be clones');
+
+ t.equal(Object.keys(result.b).length, 1, 'objects should be clones');
+ t.ok(result.b !== d.b, 'objects should be clones');
+ t.end();
+});
+
diff --git a/source/node_modules/delayed-stream/.npmignore b/source/node_modules/delayed-stream/.npmignore
new file mode 100644
index 000000000..9daeafb98
--- /dev/null
+++ b/source/node_modules/delayed-stream/.npmignore
@@ -0,0 +1 @@
+test
diff --git a/source/node_modules/delayed-stream/License b/source/node_modules/delayed-stream/License
new file mode 100644
index 000000000..4804b7ab4
--- /dev/null
+++ b/source/node_modules/delayed-stream/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Debuggable Limited
+
+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.
diff --git a/source/node_modules/delayed-stream/Makefile b/source/node_modules/delayed-stream/Makefile
new file mode 100644
index 000000000..b4ff85a33
--- /dev/null
+++ b/source/node_modules/delayed-stream/Makefile
@@ -0,0 +1,7 @@
+SHELL := /bin/bash
+
+test:
+ @./test/run.js
+
+.PHONY: test
+
diff --git a/source/node_modules/delayed-stream/Readme.md b/source/node_modules/delayed-stream/Readme.md
new file mode 100644
index 000000000..aca36f9f0
--- /dev/null
+++ b/source/node_modules/delayed-stream/Readme.md
@@ -0,0 +1,141 @@
+# delayed-stream
+
+Buffers events from a stream until you are ready to handle them.
+
+## Installation
+
+``` bash
+npm install delayed-stream
+```
+
+## Usage
+
+The following example shows how to write a http echo server that delays its
+response by 1000 ms.
+
+``` javascript
+var DelayedStream = require('delayed-stream');
+var http = require('http');
+
+http.createServer(function(req, res) {
+ var delayed = DelayedStream.create(req);
+
+ setTimeout(function() {
+ res.writeHead(200);
+ delayed.pipe(res);
+ }, 1000);
+});
+```
+
+If you are not using `Stream#pipe`, you can also manually release the buffered
+events by calling `delayedStream.resume()`:
+
+``` javascript
+var delayed = DelayedStream.create(req);
+
+setTimeout(function() {
+ // Emit all buffered events and resume underlaying source
+ delayed.resume();
+}, 1000);
+```
+
+## Implementation
+
+In order to use this meta stream properly, here are a few things you should
+know about the implementation.
+
+### Event Buffering / Proxying
+
+All events of the `source` stream are hijacked by overwriting the `source.emit`
+method. Until node implements a catch-all event listener, this is the only way.
+
+However, delayed-stream still continues to emit all events it captures on the
+`source`, regardless of whether you have released the delayed stream yet or
+not.
+
+Upon creation, delayed-stream captures all `source` events and stores them in
+an internal event buffer. Once `delayedStream.release()` is called, all
+buffered events are emitted on the `delayedStream`, and the event buffer is
+cleared. After that, delayed-stream merely acts as a proxy for the underlaying
+source.
+
+### Error handling
+
+Error events on `source` are buffered / proxied just like any other events.
+However, `delayedStream.create` attaches a no-op `'error'` listener to the
+`source`. This way you only have to handle errors on the `delayedStream`
+object, rather than in two places.
+
+### Buffer limits
+
+delayed-stream provides a `maxDataSize` property that can be used to limit
+the amount of data being buffered. In order to protect you from bad `source`
+streams that don't react to `source.pause()`, this feature is enabled by
+default.
+
+## API
+
+### DelayedStream.create(source, [options])
+
+Returns a new `delayedStream`. Available options are:
+
+* `pauseStream`
+* `maxDataSize`
+
+The description for those properties can be found below.
+
+### delayedStream.source
+
+The `source` stream managed by this object. This is useful if you are
+passing your `delayedStream` around, and you still want to access properties
+on the `source` object.
+
+### delayedStream.pauseStream = true
+
+Whether to pause the underlaying `source` when calling
+`DelayedStream.create()`. Modifying this property afterwards has no effect.
+
+### delayedStream.maxDataSize = 1024 * 1024
+
+The amount of data to buffer before emitting an `error`.
+
+If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
+refers to bytes.
+
+If the underlaying source is emitting JavaScript strings, the size refers to
+characters.
+
+If you know what you are doing, you can set this property to `Infinity` to
+disable this feature. You can also modify this property during runtime.
+
+### delayedStream.dataSize = 0
+
+The amount of data buffered so far.
+
+### delayedStream.readable
+
+An ECMA5 getter that returns the value of `source.readable`.
+
+### delayedStream.resume()
+
+If the `delayedStream` has not been released so far, `delayedStream.release()`
+is called.
+
+In either case, `source.resume()` is called.
+
+### delayedStream.pause()
+
+Calls `source.pause()`.
+
+### delayedStream.pipe(dest)
+
+Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.
+
+### delayedStream.release()
+
+Emits and clears all events that have been buffered up so far. This does not
+resume the underlaying source, use `delayedStream.resume()` instead.
+
+## License
+
+delayed-stream is licensed under the MIT license.
diff --git a/source/node_modules/delayed-stream/lib/delayed_stream.js b/source/node_modules/delayed-stream/lib/delayed_stream.js
new file mode 100644
index 000000000..b38fc85ff
--- /dev/null
+++ b/source/node_modules/delayed-stream/lib/delayed_stream.js
@@ -0,0 +1,107 @@
+var Stream = require('stream').Stream;
+var util = require('util');
+
+module.exports = DelayedStream;
+function DelayedStream() {
+ this.source = null;
+ this.dataSize = 0;
+ this.maxDataSize = 1024 * 1024;
+ this.pauseStream = true;
+
+ this._maxDataSizeExceeded = false;
+ this._released = false;
+ this._bufferedEvents = [];
+}
+util.inherits(DelayedStream, Stream);
+
+DelayedStream.create = function(source, options) {
+ var delayedStream = new this();
+
+ options = options || {};
+ for (var option in options) {
+ delayedStream[option] = options[option];
+ }
+
+ delayedStream.source = source;
+
+ var realEmit = source.emit;
+ source.emit = function() {
+ delayedStream._handleEmit(arguments);
+ return realEmit.apply(source, arguments);
+ };
+
+ source.on('error', function() {});
+ if (delayedStream.pauseStream) {
+ source.pause();
+ }
+
+ return delayedStream;
+};
+
+Object.defineProperty(DelayedStream.prototype, 'readable', {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ return this.source.readable;
+ }
+});
+
+DelayedStream.prototype.setEncoding = function() {
+ return this.source.setEncoding.apply(this.source, arguments);
+};
+
+DelayedStream.prototype.resume = function() {
+ if (!this._released) {
+ this.release();
+ }
+
+ this.source.resume();
+};
+
+DelayedStream.prototype.pause = function() {
+ this.source.pause();
+};
+
+DelayedStream.prototype.release = function() {
+ this._released = true;
+
+ this._bufferedEvents.forEach(function(args) {
+ this.emit.apply(this, args);
+ }.bind(this));
+ this._bufferedEvents = [];
+};
+
+DelayedStream.prototype.pipe = function() {
+ var r = Stream.prototype.pipe.apply(this, arguments);
+ this.resume();
+ return r;
+};
+
+DelayedStream.prototype._handleEmit = function(args) {
+ if (this._released) {
+ this.emit.apply(this, args);
+ return;
+ }
+
+ if (args[0] === 'data') {
+ this.dataSize += args[1].length;
+ this._checkIfMaxDataSizeExceeded();
+ }
+
+ this._bufferedEvents.push(args);
+};
+
+DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
+ if (this._maxDataSizeExceeded) {
+ return;
+ }
+
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
+
+ this._maxDataSizeExceeded = true;
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
+ this.emit('error', new Error(message));
+};
diff --git a/source/node_modules/delayed-stream/package.json b/source/node_modules/delayed-stream/package.json
new file mode 100644
index 000000000..6a9cc5493
--- /dev/null
+++ b/source/node_modules/delayed-stream/package.json
@@ -0,0 +1,89 @@
+{
+ "_args": [
+ [
+ "delayed-stream@~1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/combined-stream"
+ ]
+ ],
+ "_from": "delayed-stream@>=1.0.0 <1.1.0",
+ "_id": "delayed-stream@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/delayed-stream",
+ "_nodeVersion": "1.6.4",
+ "_npmUser": {
+ "email": "apeherder@gmail.com",
+ "name": "apechimp"
+ },
+ "_npmVersion": "2.8.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "delayed-stream",
+ "raw": "delayed-stream@~1.0.0",
+ "rawSpec": "~1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <1.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/combined-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "_shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619",
+ "_shrinkwrap": null,
+ "_spec": "delayed-stream@~1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/combined-stream",
+ "author": {
+ "email": "felix@debuggable.com",
+ "name": "Felix Geisendörfer",
+ "url": "http://debuggable.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/felixge/node-delayed-stream/issues"
+ },
+ "contributors": [
+ {
+ "name": "Mike Atkins",
+ "email": "apeherder@gmail.com"
+ }
+ ],
+ "dependencies": {},
+ "description": "Buffers events from a stream until you are ready to handle them.",
+ "devDependencies": {
+ "fake": "0.2.0",
+ "far": "0.0.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619",
+ "tarball": "http://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "gitHead": "07a9dc99fb8f1a488160026b9ad77493f766fb84",
+ "homepage": "https://github.com/felixge/node-delayed-stream",
+ "license": "MIT",
+ "main": "./lib/delayed_stream",
+ "maintainers": [
+ {
+ "name": "felixge",
+ "email": "felix@debuggable.com"
+ },
+ {
+ "name": "apechimp",
+ "email": "apeherder@gmail.com"
+ }
+ ],
+ "name": "delayed-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-delayed-stream.git"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/delegates/.npmignore b/source/node_modules/delegates/.npmignore
new file mode 100644
index 000000000..c2658d7d1
--- /dev/null
+++ b/source/node_modules/delegates/.npmignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/source/node_modules/delegates/History.md b/source/node_modules/delegates/History.md
new file mode 100644
index 000000000..25959eab6
--- /dev/null
+++ b/source/node_modules/delegates/History.md
@@ -0,0 +1,22 @@
+
+1.0.0 / 2015-12-14
+==================
+
+ * Merge pull request #12 from kasicka/master
+ * Add license text
+
+0.1.0 / 2014-10-17
+==================
+
+ * adds `.fluent()` to api
+
+0.0.3 / 2014-01-13
+==================
+
+ * fix receiver for .method()
+
+0.0.2 / 2014-01-13
+==================
+
+ * Object.defineProperty() sucks
+ * Initial commit
diff --git a/source/node_modules/delegates/License b/source/node_modules/delegates/License
new file mode 100644
index 000000000..60de60add
--- /dev/null
+++ b/source/node_modules/delegates/License
@@ -0,0 +1,20 @@
+Copyright (c) 2015 TJ Holowaychuk
+
+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.
diff --git a/source/node_modules/delegates/Makefile b/source/node_modules/delegates/Makefile
new file mode 100644
index 000000000..a9dcfd50d
--- /dev/null
+++ b/source/node_modules/delegates/Makefile
@@ -0,0 +1,8 @@
+
+test:
+ @./node_modules/.bin/mocha \
+ --require should \
+ --reporter spec \
+ --bail
+
+.PHONY: test
\ No newline at end of file
diff --git a/source/node_modules/delegates/Readme.md b/source/node_modules/delegates/Readme.md
new file mode 100644
index 000000000..ab8cf4ace
--- /dev/null
+++ b/source/node_modules/delegates/Readme.md
@@ -0,0 +1,94 @@
+
+# delegates
+
+ Node method and accessor delegation utilty.
+
+## Installation
+
+```
+$ npm install delegates
+```
+
+## Example
+
+```js
+var delegate = require('delegates');
+
+...
+
+delegate(proto, 'request')
+ .method('acceptsLanguages')
+ .method('acceptsEncodings')
+ .method('acceptsCharsets')
+ .method('accepts')
+ .method('is')
+ .access('querystring')
+ .access('idempotent')
+ .access('socket')
+ .access('length')
+ .access('query')
+ .access('search')
+ .access('status')
+ .access('method')
+ .access('path')
+ .access('body')
+ .access('host')
+ .access('url')
+ .getter('subdomains')
+ .getter('protocol')
+ .getter('header')
+ .getter('stale')
+ .getter('fresh')
+ .getter('secure')
+ .getter('ips')
+ .getter('ip')
+```
+
+# API
+
+## Delegate(proto, prop)
+
+Creates a delegator instance used to configure using the `prop` on the given
+`proto` object. (which is usually a prototype)
+
+## Delegate#method(name)
+
+Allows the given method `name` to be accessed on the host.
+
+## Delegate#getter(name)
+
+Creates a "getter" for the property with the given `name` on the delegated
+object.
+
+## Delegate#setter(name)
+
+Creates a "setter" for the property with the given `name` on the delegated
+object.
+
+## Delegate#access(name)
+
+Creates an "accessor" (ie: both getter *and* setter) for the property with the
+given `name` on the delegated object.
+
+## Delegate#fluent(name)
+
+A unique type of "accessor" that works for a "fluent" API. When called as a
+getter, the method returns the expected value. However, if the method is called
+with a value, it will return itself so it can be chained. For example:
+
+```js
+delegate(proto, 'request')
+ .fluent('query')
+
+// getter
+var q = request.query();
+
+// setter (chainable)
+request
+ .query({ a: 1 })
+ .query({ b: 2 });
+```
+
+# License
+
+ MIT
diff --git a/source/node_modules/delegates/index.js b/source/node_modules/delegates/index.js
new file mode 100644
index 000000000..17c222d52
--- /dev/null
+++ b/source/node_modules/delegates/index.js
@@ -0,0 +1,121 @@
+
+/**
+ * Expose `Delegator`.
+ */
+
+module.exports = Delegator;
+
+/**
+ * Initialize a delegator.
+ *
+ * @param {Object} proto
+ * @param {String} target
+ * @api public
+ */
+
+function Delegator(proto, target) {
+ if (!(this instanceof Delegator)) return new Delegator(proto, target);
+ this.proto = proto;
+ this.target = target;
+ this.methods = [];
+ this.getters = [];
+ this.setters = [];
+ this.fluents = [];
+}
+
+/**
+ * Delegate method `name`.
+ *
+ * @param {String} name
+ * @return {Delegator} self
+ * @api public
+ */
+
+Delegator.prototype.method = function(name){
+ var proto = this.proto;
+ var target = this.target;
+ this.methods.push(name);
+
+ proto[name] = function(){
+ return this[target][name].apply(this[target], arguments);
+ };
+
+ return this;
+};
+
+/**
+ * Delegator accessor `name`.
+ *
+ * @param {String} name
+ * @return {Delegator} self
+ * @api public
+ */
+
+Delegator.prototype.access = function(name){
+ return this.getter(name).setter(name);
+};
+
+/**
+ * Delegator getter `name`.
+ *
+ * @param {String} name
+ * @return {Delegator} self
+ * @api public
+ */
+
+Delegator.prototype.getter = function(name){
+ var proto = this.proto;
+ var target = this.target;
+ this.getters.push(name);
+
+ proto.__defineGetter__(name, function(){
+ return this[target][name];
+ });
+
+ return this;
+};
+
+/**
+ * Delegator setter `name`.
+ *
+ * @param {String} name
+ * @return {Delegator} self
+ * @api public
+ */
+
+Delegator.prototype.setter = function(name){
+ var proto = this.proto;
+ var target = this.target;
+ this.setters.push(name);
+
+ proto.__defineSetter__(name, function(val){
+ return this[target][name] = val;
+ });
+
+ return this;
+};
+
+/**
+ * Delegator fluent accessor
+ *
+ * @param {String} name
+ * @return {Delegator} self
+ * @api public
+ */
+
+Delegator.prototype.fluent = function (name) {
+ var proto = this.proto;
+ var target = this.target;
+ this.fluents.push(name);
+
+ proto[name] = function(val){
+ if ('undefined' != typeof val) {
+ this[target][name] = val;
+ return this;
+ } else {
+ return this[target][name];
+ }
+ };
+
+ return this;
+};
diff --git a/source/node_modules/delegates/package.json b/source/node_modules/delegates/package.json
new file mode 100644
index 000000000..1c81f85be
--- /dev/null
+++ b/source/node_modules/delegates/package.json
@@ -0,0 +1,76 @@
+{
+ "_args": [
+ [
+ "delegates@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/are-we-there-yet"
+ ]
+ ],
+ "_from": "delegates@>=1.0.0 <2.0.0",
+ "_id": "delegates@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/delegates",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "email": "tj@vision-media.ca",
+ "name": "tjholowaychuk"
+ },
+ "_npmVersion": "3.3.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "delegates",
+ "raw": "delegates@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/are-we-there-yet"
+ ],
+ "_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a",
+ "_shrinkwrap": null,
+ "_spec": "delegates@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/are-we-there-yet",
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-delegates/issues"
+ },
+ "dependencies": {},
+ "description": "delegate methods and accessors to another property",
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a",
+ "tarball": "http://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz"
+ },
+ "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49",
+ "homepage": "https://github.com/visionmedia/node-delegates#readme",
+ "keywords": [
+ "delegate",
+ "delegation"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "dominicbarnes",
+ "email": "dominic@dbarnes.info"
+ }
+ ],
+ "name": "delegates",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/visionmedia/node-delegates.git"
+ },
+ "scripts": {},
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/delegates/test/index.js b/source/node_modules/delegates/test/index.js
new file mode 100644
index 000000000..7b6e3d4df
--- /dev/null
+++ b/source/node_modules/delegates/test/index.js
@@ -0,0 +1,94 @@
+
+var assert = require('assert');
+var delegate = require('..');
+
+describe('.method(name)', function(){
+ it('should delegate methods', function(){
+ var obj = {};
+
+ obj.request = {
+ foo: function(bar){
+ assert(this == obj.request);
+ return bar;
+ }
+ };
+
+ delegate(obj, 'request').method('foo');
+
+ obj.foo('something').should.equal('something');
+ })
+})
+
+describe('.getter(name)', function(){
+ it('should delegate getters', function(){
+ var obj = {};
+
+ obj.request = {
+ get type() {
+ return 'text/html';
+ }
+ }
+
+ delegate(obj, 'request').getter('type');
+
+ obj.type.should.equal('text/html');
+ })
+})
+
+describe('.setter(name)', function(){
+ it('should delegate setters', function(){
+ var obj = {};
+
+ obj.request = {
+ get type() {
+ return this._type.toUpperCase();
+ },
+
+ set type(val) {
+ this._type = val;
+ }
+ }
+
+ delegate(obj, 'request').setter('type');
+
+ obj.type = 'hey';
+ obj.request.type.should.equal('HEY');
+ })
+})
+
+describe('.access(name)', function(){
+ it('should delegate getters and setters', function(){
+ var obj = {};
+
+ obj.request = {
+ get type() {
+ return this._type.toUpperCase();
+ },
+
+ set type(val) {
+ this._type = val;
+ }
+ }
+
+ delegate(obj, 'request').access('type');
+
+ obj.type = 'hey';
+ obj.type.should.equal('HEY');
+ })
+})
+
+describe('.fluent(name)', function () {
+ it('should delegate in a fluent fashion', function () {
+ var obj = {
+ settings: {
+ env: 'development'
+ }
+ };
+
+ delegate(obj, 'settings').fluent('env');
+
+ obj.env().should.equal('development');
+ obj.env('production').should.equal(obj);
+ obj.settings.env.should.equal('production');
+ })
+})
diff --git a/source/node_modules/deprecated/.npmignore b/source/node_modules/deprecated/.npmignore
new file mode 100644
index 000000000..b5ef13a3c
--- /dev/null
+++ b/source/node_modules/deprecated/.npmignore
@@ -0,0 +1,6 @@
+.DS_Store
+*.log
+node_modules
+build
+*.node
+components
\ No newline at end of file
diff --git a/source/node_modules/deprecated/.travis.yml b/source/node_modules/deprecated/.travis.yml
new file mode 100644
index 000000000..33ad9f8c8
--- /dev/null
+++ b/source/node_modules/deprecated/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.9"
+ - "0.10"
+after_script:
+ - npm run coveralls
\ No newline at end of file
diff --git a/source/node_modules/deprecated/LICENSE b/source/node_modules/deprecated/LICENSE
new file mode 100755
index 000000000..7cbe012c6
--- /dev/null
+++ b/source/node_modules/deprecated/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2014 Fractal
+
+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.
diff --git a/source/node_modules/deprecated/README.md b/source/node_modules/deprecated/README.md
new file mode 100644
index 000000000..493e6ea5f
--- /dev/null
+++ b/source/node_modules/deprecated/README.md
@@ -0,0 +1,51 @@
+# deprecated [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
+
+
+## Information
+
+
+
+Package deprecated
+
+
+Description
+Tool for deprecating things
+
+
+Node Version
+>= 0.9
+
+
+
+## Usage
+
+```javascript
+var oldfn = function(a,b) {
+ return a+b;
+};
+
+// returns a new wrapper function that logs the deprecated function once
+var somefn = deprecated('dont use this anymore', console.log, oldfn);
+
+var someobj = {};
+
+// set up a getter/set for field that logs deprecated message once
+deprecated('dont use this anymore', console.log, someobj, 'a', 123);
+
+console.log(someobj.a); // 123
+```
+
+[npm-url]: https://npmjs.org/package/deprecated
+[npm-image]: https://badge.fury.io/js/deprecated.png
+
+[travis-url]: https://travis-ci.org/wearefractal/deprecated
+[travis-image]: https://travis-ci.org/wearefractal/deprecated.png?branch=master
+
+[coveralls-url]: https://coveralls.io/r/wearefractal/deprecated
+[coveralls-image]: https://coveralls.io/repos/wearefractal/deprecated/badge.png
+
+[depstat-url]: https://david-dm.org/wearefractal/deprecated
+[depstat-image]: https://david-dm.org/wearefractal/deprecated.png
+
+[david-url]: https://david-dm.org/wearefractal/deprecated
+[david-image]: https://david-dm.org/wearefractal/deprecated.png?theme=shields.io
\ No newline at end of file
diff --git a/source/node_modules/deprecated/index.js b/source/node_modules/deprecated/index.js
new file mode 100644
index 000000000..f689e9cd1
--- /dev/null
+++ b/source/node_modules/deprecated/index.js
@@ -0,0 +1,39 @@
+var deprecated = {
+ method: function(msg, log, fn) {
+ var called = false;
+ return function(){
+ if (!called) {
+ called = true;
+ log(msg);
+ }
+ return fn.apply(this, arguments);
+ };
+ },
+
+ field: function(msg, log, parent, field, val) {
+ var called = false;
+ var getter = function(){
+ if (!called) {
+ called = true;
+ log(msg);
+ }
+ return val;
+ };
+ var setter = function(v) {
+ if (!called) {
+ called = true;
+ log(msg);
+ }
+ val = v;
+ return v;
+ };
+ Object.defineProperty(parent, field, {
+ get: getter,
+ set: setter,
+ enumerable: true
+ });
+ return;
+ }
+};
+
+module.exports = deprecated;
\ No newline at end of file
diff --git a/source/node_modules/deprecated/package.json b/source/node_modules/deprecated/package.json
new file mode 100644
index 000000000..95b532c54
--- /dev/null
+++ b/source/node_modules/deprecated/package.json
@@ -0,0 +1,88 @@
+{
+ "_args": [
+ [
+ "deprecated@^0.0.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp"
+ ]
+ ],
+ "_from": "deprecated@>=0.0.1 <0.0.2",
+ "_id": "deprecated@0.0.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/deprecated",
+ "_npmUser": {
+ "email": "contact@wearefractal.com",
+ "name": "fractal"
+ },
+ "_npmVersion": "1.3.24",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "deprecated",
+ "raw": "deprecated@^0.0.1",
+ "rawSpec": "^0.0.1",
+ "scope": null,
+ "spec": ">=0.0.1 <0.0.2",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp"
+ ],
+ "_resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz",
+ "_shasum": "f9c9af5464afa1e7a971458a8bdef2aa94d5bb19",
+ "_shrinkwrap": null,
+ "_spec": "deprecated@^0.0.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp",
+ "author": {
+ "email": "contact@wearefractal.com",
+ "name": "Fractal",
+ "url": "http://wearefractal.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/wearefractal/deprecated/issues"
+ },
+ "dependencies": {},
+ "description": "Tool for deprecating things",
+ "devDependencies": {
+ "coveralls": "~2.6.1",
+ "istanbul": "~0.2.3",
+ "jshint": "~2.4.1",
+ "mocha": "~1.17.0",
+ "mocha-lcov-reporter": "~0.0.1",
+ "rimraf": "~2.2.5",
+ "should": "~3.1.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "f9c9af5464afa1e7a971458a8bdef2aa94d5bb19",
+ "tarball": "http://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz"
+ },
+ "engines": {
+ "node": ">= 0.9"
+ },
+ "homepage": "http://github.com/wearefractal/deprecated",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/wearefractal/deprecated/raw/master/LICENSE"
+ }
+ ],
+ "main": "./index.js",
+ "maintainers": [
+ {
+ "name": "fractal",
+ "email": "contact@wearefractal.com"
+ }
+ ],
+ "name": "deprecated",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/wearefractal/deprecated.git"
+ },
+ "scripts": {
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
+ "test": "mocha --reporter spec && jshint"
+ },
+ "version": "0.0.1"
+}
diff --git a/source/node_modules/deprecated/test/field.js b/source/node_modules/deprecated/test/field.js
new file mode 100644
index 000000000..91a7029c7
--- /dev/null
+++ b/source/node_modules/deprecated/test/field.js
@@ -0,0 +1,44 @@
+var deprecated = require('../');
+var should = require('should');
+require('mocha');
+
+describe('field()', function() {
+ it('should return a wrapped function that logs once on get', function(done) {
+ var message = 'testing';
+ var scope = {
+ a: 1
+ };
+ var obj = {};
+ var logged = false;
+ var log = function(msg){
+ msg.should.equal(message);
+ logged.should.equal(false);
+ logged = true;
+ };
+ deprecated.field(message, log, obj, 'a', 123);
+
+ obj.a.should.equal(123);
+ obj.a = 1234;
+ obj.a.should.equal(1234);
+ logged.should.equal(true);
+ done();
+ });
+ it('should return a wrapped function that logs once on set', function(done) {
+ var message = 'testing';
+ var scope = {
+ a: 1
+ };
+ var obj = {};
+ var logged = false;
+ var log = function(msg){
+ msg.should.equal(message);
+ logged.should.equal(false);
+ logged = true;
+ };
+ deprecated.field(message, log, obj, 'a', 123);
+
+ obj.a = 1234;
+ logged.should.equal(true);
+ done();
+ });
+});
\ No newline at end of file
diff --git a/source/node_modules/deprecated/test/method.js b/source/node_modules/deprecated/test/method.js
new file mode 100644
index 000000000..615ba9454
--- /dev/null
+++ b/source/node_modules/deprecated/test/method.js
@@ -0,0 +1,32 @@
+var deprecated = require('../');
+var should = require('should');
+require('mocha');
+
+describe('method()', function() {
+ it('should return a wrapped function that logs once', function(done) {
+ var message = 'testing';
+ var scope = {
+ a: 1
+ };
+ var logged = false;
+ var log = function(msg){
+ msg.should.equal(message);
+ logged.should.equal(false);
+ logged = true;
+ };
+ var fn = deprecated.method(message, log, function(one, two){
+ this.should.equal(scope);
+ one.should.equal(1);
+ two.should.equal(2);
+ return one+two;
+ });
+
+ fn.bind(scope)(1,2).should.equal(3);
+ fn.bind(scope)(1,2).should.equal(3);
+ fn.bind(scope)(1,2).should.equal(3);
+ fn.bind(scope)(1,2).should.equal(3);
+
+ logged.should.equal(true);
+ done();
+ });
+});
\ No newline at end of file
diff --git a/source/node_modules/duplexer2/.npmignore b/source/node_modules/duplexer2/.npmignore
new file mode 100644
index 000000000..07e6e472c
--- /dev/null
+++ b/source/node_modules/duplexer2/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/source/node_modules/duplexer2/.travis.yml b/source/node_modules/duplexer2/.travis.yml
new file mode 100644
index 000000000..6e5919de3
--- /dev/null
+++ b/source/node_modules/duplexer2/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10"
diff --git a/source/node_modules/duplexer2/LICENSE.md b/source/node_modules/duplexer2/LICENSE.md
new file mode 100644
index 000000000..547189a6a
--- /dev/null
+++ b/source/node_modules/duplexer2/LICENSE.md
@@ -0,0 +1,26 @@
+Copyright (c) 2013, Deoxxa Development
+======================================
+All rights reserved.
+--------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of Deoxxa Development 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 DEOXXA DEVELOPMENT ''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 DEOXXA DEVELOPMENT 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.
diff --git a/source/node_modules/duplexer2/README.md b/source/node_modules/duplexer2/README.md
new file mode 100644
index 000000000..e39e1e9ed
--- /dev/null
+++ b/source/node_modules/duplexer2/README.md
@@ -0,0 +1,129 @@
+duplexer2 [](https://travis-ci.org/deoxxa/fork)
+=========
+
+Like duplexer (http://npm.im/duplexer) but using streams2.
+
+Overview
+--------
+
+duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the
+readable-stream API which is standard in node as of v0.10. Everything largely
+works the same.
+
+Installation
+------------
+
+Available via [npm](http://npmjs.org/):
+
+> $ npm install duplexer2
+
+Or via git:
+
+> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2
+
+API
+---
+
+**duplexer2**
+
+Creates a new `DuplexWrapper` object, which is the actual class that implements
+most of the fun stuff. All that fun stuff is hidden. DON'T LOOK.
+
+```javascript
+duplexer2([options], writable, readable)
+```
+
+```javascript
+var duplex = duplexer2(new stream.Writable(), new stream.Readable());
+```
+
+Arguments
+
+* __options__ - an object specifying the regular `stream.Duplex` options, as
+ well as the properties described below.
+* __writable__ - a writable stream
+* __readable__ - a readable stream
+
+Options
+
+* __bubbleErrors__ - a boolean value that specifies whether to bubble errors
+ from the underlying readable/writable streams. Default is `true`.
+
+Example
+-------
+
+Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js).
+
+Code:
+
+```javascript
+var stream = require("stream");
+
+var duplexer2 = require("duplexer2");
+
+var writable = new stream.Writable({objectMode: true}),
+ readable = new stream.Readable({objectMode: true});
+
+writable._write = function _write(input, encoding, done) {
+ if (readable.push(input)) {
+ return done();
+ } else {
+ readable.once("drain", done);
+ }
+};
+
+readable._read = function _read(n) {
+ // no-op
+};
+
+// simulate the readable thing closing after a bit
+writable.once("finish", function() {
+ setTimeout(function() {
+ readable.push(null);
+ }, 500);
+});
+
+var duplex = duplexer2(writable, readable);
+
+duplex.on("data", function(e) {
+ console.log("got data", JSON.stringify(e));
+});
+
+duplex.on("finish", function() {
+ console.log("got finish event");
+});
+
+duplex.on("end", function() {
+ console.log("got end event");
+});
+
+duplex.write("oh, hi there", function() {
+ console.log("finished writing");
+});
+
+duplex.end(function() {
+ console.log("finished ending");
+});
+```
+
+Output:
+
+```
+got data "oh, hi there"
+finished writing
+got finish event
+finished ending
+got end event
+```
+
+License
+-------
+
+3-clause BSD. A copy is included with the source.
+
+Contact
+-------
+
+* GitHub ([deoxxa](http://github.com/deoxxa))
+* Twitter ([@deoxxa](http://twitter.com/deoxxa))
+* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))
diff --git a/source/node_modules/duplexer2/example.js b/source/node_modules/duplexer2/example.js
new file mode 100755
index 000000000..90416e9ac
--- /dev/null
+++ b/source/node_modules/duplexer2/example.js
@@ -0,0 +1,49 @@
+#!/usr/bin/env node
+
+var stream = require("readable-stream");
+
+var duplexer2 = require("./");
+
+var writable = new stream.Writable({objectMode: true}),
+ readable = new stream.Readable({objectMode: true});
+
+writable._write = function _write(input, encoding, done) {
+ if (readable.push(input)) {
+ return done();
+ } else {
+ readable.once("drain", done);
+ }
+};
+
+readable._read = function _read(n) {
+ // no-op
+};
+
+// simulate the readable thing closing after a bit
+writable.once("finish", function() {
+ setTimeout(function() {
+ readable.push(null);
+ }, 500);
+});
+
+var duplex = duplexer2(writable, readable);
+
+duplex.on("data", function(e) {
+ console.log("got data", JSON.stringify(e));
+});
+
+duplex.on("finish", function() {
+ console.log("got finish event");
+});
+
+duplex.on("end", function() {
+ console.log("got end event");
+});
+
+duplex.write("oh, hi there", function() {
+ console.log("finished writing");
+});
+
+duplex.end(function() {
+ console.log("finished ending");
+});
diff --git a/source/node_modules/duplexer2/index.js b/source/node_modules/duplexer2/index.js
new file mode 100644
index 000000000..b8fafcb3f
--- /dev/null
+++ b/source/node_modules/duplexer2/index.js
@@ -0,0 +1,62 @@
+var stream = require("readable-stream");
+
+var duplex2 = module.exports = function duplex2(options, writable, readable) {
+ return new DuplexWrapper(options, writable, readable);
+};
+
+var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) {
+ if (typeof readable === "undefined") {
+ readable = writable;
+ writable = options;
+ options = null;
+ }
+
+ options = options || {};
+ options.objectMode = true;
+
+ stream.Duplex.call(this, options);
+
+ this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors;
+
+ this._writable = writable;
+ this._readable = readable;
+
+ var self = this;
+
+ writable.once("finish", function() {
+ self.end();
+ });
+
+ this.once("finish", function() {
+ writable.end();
+ });
+
+ readable.on("data", function(e) {
+ if (!self.push(e)) {
+ readable.pause();
+ }
+ });
+
+ readable.once("end", function() {
+ return self.push(null);
+ });
+
+ if (this._bubbleErrors) {
+ writable.on("error", function(err) {
+ return self.emit("error", err);
+ });
+
+ readable.on("error", function(err) {
+ return self.emit("error", err);
+ });
+ }
+};
+DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}});
+
+DuplexWrapper.prototype._write = function _write(input, encoding, done) {
+ this._writable.write(input, encoding, done);
+};
+
+DuplexWrapper.prototype._read = function _read(n) {
+ this._readable.resume();
+};
diff --git a/source/node_modules/duplexer2/package.json b/source/node_modules/duplexer2/package.json
new file mode 100644
index 000000000..af4fb1e12
--- /dev/null
+++ b/source/node_modules/duplexer2/package.json
@@ -0,0 +1,82 @@
+{
+ "_args": [
+ [
+ "duplexer2@0.0.2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/multipipe"
+ ]
+ ],
+ "_from": "duplexer2@0.0.2",
+ "_id": "duplexer2@0.0.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/duplexer2",
+ "_npmUser": {
+ "email": "deoxxa@fknsrs.biz",
+ "name": "deoxxa"
+ },
+ "_npmVersion": "1.4.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "duplexer2",
+ "raw": "duplexer2@0.0.2",
+ "rawSpec": "0.0.2",
+ "scope": null,
+ "spec": "0.0.2",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/multipipe"
+ ],
+ "_resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
+ "_shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db",
+ "_shrinkwrap": null,
+ "_spec": "duplexer2@0.0.2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/multipipe",
+ "author": {
+ "email": "deoxxa@fknsrs.biz",
+ "name": "Conrad Pankoff",
+ "url": "http://www.fknsrs.biz/"
+ },
+ "bugs": {
+ "url": "https://github.com/deoxxa/duplexer2/issues"
+ },
+ "dependencies": {
+ "readable-stream": "~1.1.9"
+ },
+ "description": "Like duplexer (http://npm.im/duplexer) but using streams2",
+ "devDependencies": {
+ "chai": "~1.7.2",
+ "mocha": "~1.12.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db",
+ "tarball": "http://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz"
+ },
+ "homepage": "https://github.com/deoxxa/duplexer2",
+ "keywords": [
+ "combine",
+ "duplex",
+ "join",
+ "stream"
+ ],
+ "license": "BSD",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "deoxxa",
+ "email": "deoxxa@fknsrs.biz"
+ }
+ ],
+ "name": "duplexer2",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/deoxxa/duplexer2.git"
+ },
+ "scripts": {
+ "test": "mocha -R tap"
+ },
+ "version": "0.0.2"
+}
diff --git a/source/node_modules/duplexer2/test/tests.js b/source/node_modules/duplexer2/test/tests.js
new file mode 100644
index 000000000..c3cf76f67
--- /dev/null
+++ b/source/node_modules/duplexer2/test/tests.js
@@ -0,0 +1,161 @@
+var assert = require("chai").assert;
+
+var stream = require("readable-stream");
+
+var duplexer2 = require("../");
+
+describe("duplexer2", function() {
+ var writable, readable;
+
+ beforeEach(function() {
+ writable = new stream.Writable({objectMode: true});
+ readable = new stream.Readable({objectMode: true});
+
+ writable._write = function _write(input, encoding, done) {
+ return done();
+ };
+
+ readable._read = function _read(n) {
+ };
+ });
+
+ it("should interact with the writable stream properly for writing", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ writable._write = function _write(input, encoding, _done) {
+ assert.strictEqual(input, "well hello there");
+
+ return done();
+ };
+
+ duplex.write("well hello there");
+ });
+
+ it("should interact with the readable stream properly for reading", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ duplex.on("data", function(e) {
+ assert.strictEqual(e, "well hello there");
+
+ return done();
+ });
+
+ readable.push("well hello there");
+ });
+
+ it("should end the writable stream, causing it to finish", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ writable.once("finish", done);
+
+ duplex.end();
+ });
+
+ it("should finish when the writable stream finishes", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ duplex.once("finish", done);
+
+ writable.end();
+ });
+
+ it("should end when the readable stream ends", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ // required to let "end" fire without reading
+ duplex.resume();
+ duplex.once("end", done);
+
+ readable.push(null);
+ });
+
+ it("should bubble errors from the writable stream when no behaviour is specified", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ var originalErr = Error("testing");
+
+ duplex.on("error", function(err) {
+ assert.strictEqual(err, originalErr);
+
+ return done();
+ });
+
+ writable.emit("error", originalErr);
+ });
+
+ it("should bubble errors from the readable stream when no behaviour is specified", function(done) {
+ var duplex = duplexer2(writable, readable);
+
+ var originalErr = Error("testing");
+
+ duplex.on("error", function(err) {
+ assert.strictEqual(err, originalErr);
+
+ return done();
+ });
+
+ readable.emit("error", originalErr);
+ });
+
+ it("should bubble errors from the writable stream when bubbleErrors is true", function(done) {
+ var duplex = duplexer2({bubbleErrors: true}, writable, readable);
+
+ var originalErr = Error("testing");
+
+ duplex.on("error", function(err) {
+ assert.strictEqual(err, originalErr);
+
+ return done();
+ });
+
+ writable.emit("error", originalErr);
+ });
+
+ it("should bubble errors from the readable stream when bubbleErrors is true", function(done) {
+ var duplex = duplexer2({bubbleErrors: true}, writable, readable);
+
+ var originalErr = Error("testing");
+
+ duplex.on("error", function(err) {
+ assert.strictEqual(err, originalErr);
+
+ return done();
+ });
+
+ readable.emit("error", originalErr);
+ });
+
+ it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) {
+ var duplex = duplexer2({bubbleErrors: false}, writable, readable);
+
+ var timeout = setTimeout(done, 25);
+
+ duplex.on("error", function(err) {
+ clearTimeout(timeout);
+
+ return done(Error("shouldn't bubble error"));
+ });
+
+ // prevent uncaught error exception
+ writable.on("error", function() {});
+
+ writable.emit("error", Error("testing"));
+ });
+
+ it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) {
+ var duplex = duplexer2({bubbleErrors: false}, writable, readable);
+
+ var timeout = setTimeout(done, 25);
+
+ duplex.on("error", function(err) {
+ clearTimeout(timeout);
+
+ return done(Error("shouldn't bubble error"));
+ });
+
+ // prevent uncaught error exception
+ readable.on("error", function() {});
+
+ readable.emit("error", Error("testing"));
+ });
+});
diff --git a/source/node_modules/ecc-jsbn/.npmignore b/source/node_modules/ecc-jsbn/.npmignore
new file mode 100644
index 000000000..a72b52ebe
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/.npmignore
@@ -0,0 +1,15 @@
+lib-cov
+*.seed
+*.log
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+
+pids
+logs
+results
+
+npm-debug.log
+node_modules
diff --git a/source/node_modules/ecc-jsbn/LICENSE b/source/node_modules/ecc-jsbn/LICENSE
new file mode 100644
index 000000000..f668fefc6
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jeremie Miller
+
+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.
\ No newline at end of file
diff --git a/source/node_modules/ecc-jsbn/README.md b/source/node_modules/ecc-jsbn/README.md
new file mode 100644
index 000000000..b5d0b9de9
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/README.md
@@ -0,0 +1,8 @@
+ecc-jsbn
+========
+
+ECC package based on [jsbn](https://github.com/andyperlitch/jsbn) from [Tom Wu](http://www-cs-students.stanford.edu/~tjw/).
+
+This is a subset of the same interface as the [node compiled module](https://github.com/quartzjer/ecc), but works in the browser too.
+
+Also uses point compression now from [https://github.com/kaielvin](https://github.com/kaielvin/jsbn-ec-point-compression).
diff --git a/source/node_modules/ecc-jsbn/index.js b/source/node_modules/ecc-jsbn/index.js
new file mode 100644
index 000000000..24372810b
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/index.js
@@ -0,0 +1,57 @@
+var crypto = require("crypto");
+var BigInteger = require("jsbn").BigInteger;
+var ECPointFp = require("./lib/ec.js").ECPointFp;
+exports.ECCurves = require("./lib/sec.js");
+
+// zero prepad
+function unstupid(hex,len)
+{
+ return (hex.length >= len) ? hex : unstupid("0"+hex,len);
+}
+
+exports.ECKey = function(curve, key, isPublic)
+{
+ var priv;
+ var c = curve();
+ var n = c.getN();
+ var bytes = Math.floor(n.bitLength()/8);
+
+ if(key)
+ {
+ if(isPublic)
+ {
+ var curve = c.getCurve();
+// var x = key.slice(1,bytes+1); // skip the 04 for uncompressed format
+// var y = key.slice(bytes+1);
+// this.P = new ECPointFp(curve,
+// curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)),
+// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
+ this.P = curve.decodePointHex(key.toString("hex"));
+ }else{
+ if(key.length != bytes) return false;
+ priv = new BigInteger(key.toString("hex"), 16);
+ }
+ }else{
+ var n1 = n.subtract(BigInteger.ONE);
+ var r = new BigInteger(crypto.randomBytes(n.bitLength()));
+ priv = r.mod(n1).add(BigInteger.ONE);
+ this.P = c.getG().multiply(priv);
+ }
+ if(this.P)
+ {
+// var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2);
+// this.PublicKey = new Buffer("04"+pubhex,"hex");
+ this.PublicKey = new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex");
+ }
+ if(priv)
+ {
+ this.PrivateKey = new Buffer(unstupid(priv.toString(16),bytes*2),"hex");
+ this.deriveSharedSecret = function(key)
+ {
+ if(!key || !key.P) return false;
+ var S = key.P.multiply(priv);
+ return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
+ }
+ }
+}
+
diff --git a/source/node_modules/ecc-jsbn/lib/LICENSE-jsbn b/source/node_modules/ecc-jsbn/lib/LICENSE-jsbn
new file mode 100644
index 000000000..24502a9cf
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/lib/LICENSE-jsbn
@@ -0,0 +1,40 @@
+Licensing
+---------
+
+This software is covered under the following copyright:
+
+/*
+ * Copyright (c) 2003-2005 Tom Wu
+ * All Rights Reserved.
+ *
+ * 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" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
+ * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * In addition, the following condition applies:
+ *
+ * All redistributions must retain an intact copy of this copyright notice
+ * and disclaimer.
+ */
+
+Address all questions regarding this license to:
+
+ Tom Wu
+ tjw@cs.Stanford.EDU
diff --git a/source/node_modules/ecc-jsbn/lib/ec.js b/source/node_modules/ecc-jsbn/lib/ec.js
new file mode 100644
index 000000000..3852671ec
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/lib/ec.js
@@ -0,0 +1,561 @@
+// Basic Javascript Elliptic Curve implementation
+// Ported loosely from BouncyCastle's Java EC code
+// Only Fp curves implemented for now
+
+// Requires jsbn.js and jsbn2.js
+var BigInteger = require('jsbn').BigInteger
+var Barrett = BigInteger.prototype.Barrett
+
+// ----------------
+// ECFieldElementFp
+
+// constructor
+function ECFieldElementFp(q,x) {
+ this.x = x;
+ // TODO if(x.compareTo(q) >= 0) error
+ this.q = q;
+}
+
+function feFpEquals(other) {
+ if(other == this) return true;
+ return (this.q.equals(other.q) && this.x.equals(other.x));
+}
+
+function feFpToBigInteger() {
+ return this.x;
+}
+
+function feFpNegate() {
+ return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));
+}
+
+function feFpAdd(b) {
+ return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q));
+}
+
+function feFpSubtract(b) {
+ return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q));
+}
+
+function feFpMultiply(b) {
+ return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q));
+}
+
+function feFpSquare() {
+ return new ECFieldElementFp(this.q, this.x.square().mod(this.q));
+}
+
+function feFpDivide(b) {
+ return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q));
+}
+
+ECFieldElementFp.prototype.equals = feFpEquals;
+ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;
+ECFieldElementFp.prototype.negate = feFpNegate;
+ECFieldElementFp.prototype.add = feFpAdd;
+ECFieldElementFp.prototype.subtract = feFpSubtract;
+ECFieldElementFp.prototype.multiply = feFpMultiply;
+ECFieldElementFp.prototype.square = feFpSquare;
+ECFieldElementFp.prototype.divide = feFpDivide;
+
+// ----------------
+// ECPointFp
+
+// constructor
+function ECPointFp(curve,x,y,z) {
+ this.curve = curve;
+ this.x = x;
+ this.y = y;
+ // Projective coordinates: either zinv == null or z * zinv == 1
+ // z and zinv are just BigIntegers, not fieldElements
+ if(z == null) {
+ this.z = BigInteger.ONE;
+ }
+ else {
+ this.z = z;
+ }
+ this.zinv = null;
+ //TODO: compression flag
+}
+
+function pointFpGetX() {
+ if(this.zinv == null) {
+ this.zinv = this.z.modInverse(this.curve.q);
+ }
+ var r = this.x.toBigInteger().multiply(this.zinv);
+ this.curve.reduce(r);
+ return this.curve.fromBigInteger(r);
+}
+
+function pointFpGetY() {
+ if(this.zinv == null) {
+ this.zinv = this.z.modInverse(this.curve.q);
+ }
+ var r = this.y.toBigInteger().multiply(this.zinv);
+ this.curve.reduce(r);
+ return this.curve.fromBigInteger(r);
+}
+
+function pointFpEquals(other) {
+ if(other == this) return true;
+ if(this.isInfinity()) return other.isInfinity();
+ if(other.isInfinity()) return this.isInfinity();
+ var u, v;
+ // u = Y2 * Z1 - Y1 * Z2
+ u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);
+ if(!u.equals(BigInteger.ZERO)) return false;
+ // v = X2 * Z1 - X1 * Z2
+ v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);
+ return v.equals(BigInteger.ZERO);
+}
+
+function pointFpIsInfinity() {
+ if((this.x == null) && (this.y == null)) return true;
+ return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);
+}
+
+function pointFpNegate() {
+ return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);
+}
+
+function pointFpAdd(b) {
+ if(this.isInfinity()) return b;
+ if(b.isInfinity()) return this;
+
+ // u = Y2 * Z1 - Y1 * Z2
+ var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);
+ // v = X2 * Z1 - X1 * Z2
+ var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);
+
+ if(BigInteger.ZERO.equals(v)) {
+ if(BigInteger.ZERO.equals(u)) {
+ return this.twice(); // this == b, so double
+ }
+ return this.curve.getInfinity(); // this = -b, so infinity
+ }
+
+ var THREE = new BigInteger("3");
+ var x1 = this.x.toBigInteger();
+ var y1 = this.y.toBigInteger();
+ var x2 = b.x.toBigInteger();
+ var y2 = b.y.toBigInteger();
+
+ var v2 = v.square();
+ var v3 = v2.multiply(v);
+ var x1v2 = x1.multiply(v2);
+ var zu2 = u.square().multiply(this.z);
+
+ // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3)
+ var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);
+ // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3
+ var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);
+ // z3 = v^3 * z1 * z2
+ var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q);
+
+ return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
+}
+
+function pointFpTwice() {
+ if(this.isInfinity()) return this;
+ if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();
+
+ // TODO: optimized handling of constants
+ var THREE = new BigInteger("3");
+ var x1 = this.x.toBigInteger();
+ var y1 = this.y.toBigInteger();
+
+ var y1z1 = y1.multiply(this.z);
+ var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q);
+ var a = this.curve.a.toBigInteger();
+
+ // w = 3 * x1^2 + a * z1^2
+ var w = x1.square().multiply(THREE);
+ if(!BigInteger.ZERO.equals(a)) {
+ w = w.add(this.z.square().multiply(a));
+ }
+ w = w.mod(this.curve.q);
+ //this.curve.reduce(w);
+ // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1)
+ var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);
+ // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3
+ var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);
+ // z3 = 8 * (y1 * z1)^3
+ var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);
+
+ return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
+}
+
+// Simple NAF (Non-Adjacent Form) multiplication algorithm
+// TODO: modularize the multiplication algorithm
+function pointFpMultiply(k) {
+ if(this.isInfinity()) return this;
+ if(k.signum() == 0) return this.curve.getInfinity();
+
+ var e = k;
+ var h = e.multiply(new BigInteger("3"));
+
+ var neg = this.negate();
+ var R = this;
+
+ var i;
+ for(i = h.bitLength() - 2; i > 0; --i) {
+ R = R.twice();
+
+ var hBit = h.testBit(i);
+ var eBit = e.testBit(i);
+
+ if (hBit != eBit) {
+ R = R.add(hBit ? this : neg);
+ }
+ }
+
+ return R;
+}
+
+// Compute this*j + x*k (simultaneous multiplication)
+function pointFpMultiplyTwo(j,x,k) {
+ var i;
+ if(j.bitLength() > k.bitLength())
+ i = j.bitLength() - 1;
+ else
+ i = k.bitLength() - 1;
+
+ var R = this.curve.getInfinity();
+ var both = this.add(x);
+ while(i >= 0) {
+ R = R.twice();
+ if(j.testBit(i)) {
+ if(k.testBit(i)) {
+ R = R.add(both);
+ }
+ else {
+ R = R.add(this);
+ }
+ }
+ else {
+ if(k.testBit(i)) {
+ R = R.add(x);
+ }
+ }
+ --i;
+ }
+
+ return R;
+}
+
+ECPointFp.prototype.getX = pointFpGetX;
+ECPointFp.prototype.getY = pointFpGetY;
+ECPointFp.prototype.equals = pointFpEquals;
+ECPointFp.prototype.isInfinity = pointFpIsInfinity;
+ECPointFp.prototype.negate = pointFpNegate;
+ECPointFp.prototype.add = pointFpAdd;
+ECPointFp.prototype.twice = pointFpTwice;
+ECPointFp.prototype.multiply = pointFpMultiply;
+ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;
+
+// ----------------
+// ECCurveFp
+
+// constructor
+function ECCurveFp(q,a,b) {
+ this.q = q;
+ this.a = this.fromBigInteger(a);
+ this.b = this.fromBigInteger(b);
+ this.infinity = new ECPointFp(this, null, null);
+ this.reducer = new Barrett(this.q);
+}
+
+function curveFpGetQ() {
+ return this.q;
+}
+
+function curveFpGetA() {
+ return this.a;
+}
+
+function curveFpGetB() {
+ return this.b;
+}
+
+function curveFpEquals(other) {
+ if(other == this) return true;
+ return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b));
+}
+
+function curveFpGetInfinity() {
+ return this.infinity;
+}
+
+function curveFpFromBigInteger(x) {
+ return new ECFieldElementFp(this.q, x);
+}
+
+function curveReduce(x) {
+ this.reducer.reduce(x);
+}
+
+// for now, work with hex strings because they're easier in JS
+function curveFpDecodePointHex(s) {
+ switch(parseInt(s.substr(0,2), 16)) { // first byte
+ case 0:
+ return this.infinity;
+ case 2:
+ case 3:
+ // point compression not supported yet
+ return null;
+ case 4:
+ case 6:
+ case 7:
+ var len = (s.length - 2) / 2;
+ var xHex = s.substr(2, len);
+ var yHex = s.substr(len+2, len);
+
+ return new ECPointFp(this,
+ this.fromBigInteger(new BigInteger(xHex, 16)),
+ this.fromBigInteger(new BigInteger(yHex, 16)));
+
+ default: // unsupported
+ return null;
+ }
+}
+
+function curveFpEncodePointHex(p) {
+ if (p.isInfinity()) return "00";
+ var xHex = p.getX().toBigInteger().toString(16);
+ var yHex = p.getY().toBigInteger().toString(16);
+ var oLen = this.getQ().toString(16).length;
+ if ((oLen % 2) != 0) oLen++;
+ while (xHex.length < oLen) {
+ xHex = "0" + xHex;
+ }
+ while (yHex.length < oLen) {
+ yHex = "0" + yHex;
+ }
+ return "04" + xHex + yHex;
+}
+
+ECCurveFp.prototype.getQ = curveFpGetQ;
+ECCurveFp.prototype.getA = curveFpGetA;
+ECCurveFp.prototype.getB = curveFpGetB;
+ECCurveFp.prototype.equals = curveFpEquals;
+ECCurveFp.prototype.getInfinity = curveFpGetInfinity;
+ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;
+ECCurveFp.prototype.reduce = curveReduce;
+//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;
+ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex;
+
+// from: https://github.com/kaielvin/jsbn-ec-point-compression
+ECCurveFp.prototype.decodePointHex = function(s)
+{
+ var yIsEven;
+ switch(parseInt(s.substr(0,2), 16)) { // first byte
+ case 0:
+ return this.infinity;
+ case 2:
+ yIsEven = false;
+ case 3:
+ if(yIsEven == undefined) yIsEven = true;
+ var len = s.length - 2;
+ var xHex = s.substr(2, len);
+ var x = this.fromBigInteger(new BigInteger(xHex,16));
+ var alpha = x.multiply(x.square().add(this.getA())).add(this.getB());
+ var beta = alpha.sqrt();
+
+ if (beta == null) throw "Invalid point compression";
+
+ var betaValue = beta.toBigInteger();
+ if (betaValue.testBit(0) != yIsEven)
+ {
+ // Use the other root
+ beta = this.fromBigInteger(this.getQ().subtract(betaValue));
+ }
+ return new ECPointFp(this,x,beta);
+ case 4:
+ case 6:
+ case 7:
+ var len = (s.length - 2) / 2;
+ var xHex = s.substr(2, len);
+ var yHex = s.substr(len+2, len);
+
+ return new ECPointFp(this,
+ this.fromBigInteger(new BigInteger(xHex, 16)),
+ this.fromBigInteger(new BigInteger(yHex, 16)));
+
+ default: // unsupported
+ return null;
+ }
+}
+ECCurveFp.prototype.encodeCompressedPointHex = function(p)
+{
+ if (p.isInfinity()) return "00";
+ var xHex = p.getX().toBigInteger().toString(16);
+ var oLen = this.getQ().toString(16).length;
+ if ((oLen % 2) != 0) oLen++;
+ while (xHex.length < oLen)
+ xHex = "0" + xHex;
+ var yPrefix;
+ if(p.getY().toBigInteger().isEven()) yPrefix = "02";
+ else yPrefix = "03";
+
+ return yPrefix + xHex;
+}
+
+
+ECFieldElementFp.prototype.getR = function()
+{
+ if(this.r != undefined) return this.r;
+
+ this.r = null;
+ var bitLength = this.q.bitLength();
+ if (bitLength > 128)
+ {
+ var firstWord = this.q.shiftRight(bitLength - 64);
+ if (firstWord.intValue() == -1)
+ {
+ this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q);
+ }
+ }
+ return this.r;
+}
+ECFieldElementFp.prototype.modMult = function(x1,x2)
+{
+ return this.modReduce(x1.multiply(x2));
+}
+ECFieldElementFp.prototype.modReduce = function(x)
+{
+ if (this.getR() != null)
+ {
+ var qLen = q.bitLength();
+ while (x.bitLength() > (qLen + 1))
+ {
+ var u = x.shiftRight(qLen);
+ var v = x.subtract(u.shiftLeft(qLen));
+ if (!this.getR().equals(BigInteger.ONE))
+ {
+ u = u.multiply(this.getR());
+ }
+ x = u.add(v);
+ }
+ while (x.compareTo(q) >= 0)
+ {
+ x = x.subtract(q);
+ }
+ }
+ else
+ {
+ x = x.mod(q);
+ }
+ return x;
+}
+ECFieldElementFp.prototype.sqrt = function()
+{
+ if (!this.q.testBit(0)) throw "unsupported";
+
+ // p mod 4 == 3
+ if (this.q.testBit(1))
+ {
+ var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));
+ return z.square().equals(this) ? z : null;
+ }
+
+ // p mod 4 == 1
+ var qMinusOne = this.q.subtract(BigInteger.ONE);
+
+ var legendreExponent = qMinusOne.shiftRight(1);
+ if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE)))
+ {
+ return null;
+ }
+
+ var u = qMinusOne.shiftRight(2);
+ var k = u.shiftLeft(1).add(BigInteger.ONE);
+
+ var Q = this.x;
+ var fourQ = modDouble(modDouble(Q));
+
+ var U, V;
+ do
+ {
+ var P;
+ do
+ {
+ P = new BigInteger(this.q.bitLength(), new SecureRandom());
+ }
+ while (P.compareTo(this.q) >= 0
+ || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne)));
+
+ var result = this.lucasSequence(P, Q, k);
+ U = result[0];
+ V = result[1];
+
+ if (this.modMult(V, V).equals(fourQ))
+ {
+ // Integer division by 2, mod q
+ if (V.testBit(0))
+ {
+ V = V.add(q);
+ }
+
+ V = V.shiftRight(1);
+
+ return new ECFieldElementFp(q,V);
+ }
+ }
+ while (U.equals(BigInteger.ONE) || U.equals(qMinusOne));
+
+ return null;
+}
+ECFieldElementFp.prototype.lucasSequence = function(P,Q,k)
+{
+ var n = k.bitLength();
+ var s = k.getLowestSetBit();
+
+ var Uh = BigInteger.ONE;
+ var Vl = BigInteger.TWO;
+ var Vh = P;
+ var Ql = BigInteger.ONE;
+ var Qh = BigInteger.ONE;
+
+ for (var j = n - 1; j >= s + 1; --j)
+ {
+ Ql = this.modMult(Ql, Qh);
+
+ if (k.testBit(j))
+ {
+ Qh = this.modMult(Ql, Q);
+ Uh = this.modMult(Uh, Vh);
+ Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
+ Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)));
+ }
+ else
+ {
+ Qh = Ql;
+ Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
+ Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
+ Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
+ }
+ }
+
+ Ql = this.modMult(Ql, Qh);
+ Qh = this.modMult(Ql, Q);
+ Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
+ Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
+ Ql = this.modMult(Ql, Qh);
+
+ for (var j = 1; j <= s; ++j)
+ {
+ Uh = this.modMult(Uh, Vl);
+ Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
+ Ql = this.modMult(Ql, Ql);
+ }
+
+ return [ Uh, Vl ];
+}
+
+var exports = {
+ ECCurveFp: ECCurveFp,
+ ECPointFp: ECPointFp,
+ ECFieldElementFp: ECFieldElementFp
+}
+
+module.exports = exports
diff --git a/source/node_modules/ecc-jsbn/lib/sec.js b/source/node_modules/ecc-jsbn/lib/sec.js
new file mode 100644
index 000000000..5eec8179f
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/lib/sec.js
@@ -0,0 +1,170 @@
+// Named EC curves
+
+// Requires ec.js, jsbn.js, and jsbn2.js
+var BigInteger = require('jsbn').BigInteger
+var ECCurveFp = require('./ec.js').ECCurveFp
+
+
+// ----------------
+// X9ECParameters
+
+// constructor
+function X9ECParameters(curve,g,n,h) {
+ this.curve = curve;
+ this.g = g;
+ this.n = n;
+ this.h = h;
+}
+
+function x9getCurve() {
+ return this.curve;
+}
+
+function x9getG() {
+ return this.g;
+}
+
+function x9getN() {
+ return this.n;
+}
+
+function x9getH() {
+ return this.h;
+}
+
+X9ECParameters.prototype.getCurve = x9getCurve;
+X9ECParameters.prototype.getG = x9getG;
+X9ECParameters.prototype.getN = x9getN;
+X9ECParameters.prototype.getH = x9getH;
+
+// ----------------
+// SECNamedCurves
+
+function fromHex(s) { return new BigInteger(s, 16); }
+
+function secp128r1() {
+ // p = 2^128 - 2^97 - 1
+ var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
+ var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");
+ var b = fromHex("E87579C11079F43DD824993C2CEE5ED3");
+ //byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679");
+ var n = fromHex("FFFFFFFE0000000075A30D1B9038A115");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "161FF7528B899B2D0C28607CA52C5B86"
+ + "CF5AC8395BAFEB13C02DA292DDED7A83");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp160k1() {
+ // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
+ var a = BigInteger.ZERO;
+ var b = fromHex("7");
+ //byte[] S = null;
+ var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
+ + "938CF935318FDCED6BC28286531733C3F03C4FEE");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp160r1() {
+ // p = 2^160 - 2^31 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");
+ var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");
+ var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");
+ //byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345");
+ var n = fromHex("0100000000000000000001F4C8F927AED3CA752257");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "4A96B5688EF573284664698968C38BB913CBFC82"
+ + "23A628553168947D59DCC912042351377AC5FB32");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp192k1() {
+ // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
+ var a = BigInteger.ZERO;
+ var b = fromHex("3");
+ //byte[] S = null;
+ var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
+ + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp192r1() {
+ // p = 2^192 - 2^64 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
+ var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");
+ var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");
+ //byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5");
+ var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"
+ + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp224r1() {
+ // p = 2^224 - 2^96 + 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
+ var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");
+ var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");
+ //byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5");
+ var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"
+ + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp256r1() {
+ // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1
+ var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
+ var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");
+ var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");
+ //byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90");
+ var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"
+ + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+// TODO: make this into a proper hashtable
+function getSECCurveByName(name) {
+ if(name == "secp128r1") return secp128r1();
+ if(name == "secp160k1") return secp160k1();
+ if(name == "secp160r1") return secp160r1();
+ if(name == "secp192k1") return secp192k1();
+ if(name == "secp192r1") return secp192r1();
+ if(name == "secp224r1") return secp224r1();
+ if(name == "secp256r1") return secp256r1();
+ return null;
+}
+
+module.exports = {
+ "secp128r1":secp128r1,
+ "secp160k1":secp160k1,
+ "secp160r1":secp160r1,
+ "secp192k1":secp192k1,
+ "secp192r1":secp192r1,
+ "secp224r1":secp224r1,
+ "secp256r1":secp256r1
+}
diff --git a/source/node_modules/ecc-jsbn/package.json b/source/node_modules/ecc-jsbn/package.json
new file mode 100644
index 000000000..716024adc
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/package.json
@@ -0,0 +1,82 @@
+{
+ "_args": [
+ [
+ "ecc-jsbn@>=0.0.1 <1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/sshpk"
+ ]
+ ],
+ "_from": "ecc-jsbn@>=0.0.1 <1.0.0",
+ "_id": "ecc-jsbn@0.1.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/ecc-jsbn",
+ "_nodeVersion": "0.12.6",
+ "_npmUser": {
+ "email": "jeremie@jabber.org",
+ "name": "quartzjer"
+ },
+ "_npmVersion": "2.11.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "ecc-jsbn",
+ "raw": "ecc-jsbn@>=0.0.1 <1.0.0",
+ "rawSpec": ">=0.0.1 <1.0.0",
+ "scope": null,
+ "spec": ">=0.0.1 <1.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/sshpk"
+ ],
+ "_resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
+ "_shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
+ "_shrinkwrap": null,
+ "_spec": "ecc-jsbn@>=0.0.1 <1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/sshpk",
+ "author": {
+ "email": "jeremie@jabber.org",
+ "name": "Jeremie Miller",
+ "url": "http://jeremie.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/quartzjer/ecc-jsbn/issues"
+ },
+ "dependencies": {
+ "jsbn": "~0.1.0"
+ },
+ "description": "ECC JS code based on JSBN",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
+ "tarball": "http://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
+ },
+ "gitHead": "d35a360352496721030da645e8054f07efc22487",
+ "homepage": "https://github.com/quartzjer/ecc-jsbn",
+ "keywords": [
+ "browserify",
+ "ecc",
+ "jsbn"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "quartzjer",
+ "email": "jeremie@jabber.org"
+ },
+ {
+ "name": "rynomad",
+ "email": "nomad.ry@gmail.com"
+ }
+ ],
+ "name": "ecc-jsbn",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/quartzjer/ecc-jsbn.git"
+ },
+ "scripts": {},
+ "version": "0.1.1"
+}
diff --git a/source/node_modules/ecc-jsbn/test.js b/source/node_modules/ecc-jsbn/test.js
new file mode 100644
index 000000000..bd52abfd9
--- /dev/null
+++ b/source/node_modules/ecc-jsbn/test.js
@@ -0,0 +1,14 @@
+var ecc = require("./index.js");
+var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1);
+var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1);
+console.log(key1.deriveSharedSecret(key2));
+var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey);
+var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true);
+console.log(key3.deriveSharedSecret(key4));
+
+var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1);
+var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1);
+console.log(key1.deriveSharedSecret(key2));
+var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey);
+var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true);
+console.log(key3.deriveSharedSecret(key4));
diff --git a/source/node_modules/end-of-stream/.npmignore b/source/node_modules/end-of-stream/.npmignore
new file mode 100644
index 000000000..3c3629e64
--- /dev/null
+++ b/source/node_modules/end-of-stream/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/source/node_modules/end-of-stream/README.md b/source/node_modules/end-of-stream/README.md
new file mode 100644
index 000000000..df800c1eb
--- /dev/null
+++ b/source/node_modules/end-of-stream/README.md
@@ -0,0 +1,47 @@
+# end-of-stream
+
+A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
+
+ npm install end-of-stream
+
+## Usage
+
+Simply pass a stream and a callback to the `eos`.
+Both legacy streams and streams2 are supported.
+
+``` js
+var eos = require('end-of-stream');
+
+eos(readableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended');
+});
+
+eos(writableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished');
+});
+
+eos(duplexStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended and finished');
+});
+
+eos(duplexStream, {readable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be writable');
+});
+
+eos(duplexStream, {writable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be readable');
+});
+
+eos(readableStream, {error:false}, function(err) {
+ // do not treat emit('error', err) as a end-of-stream
+});
+```
+
+## License
+
+MIT
\ No newline at end of file
diff --git a/source/node_modules/end-of-stream/index.js b/source/node_modules/end-of-stream/index.js
new file mode 100644
index 000000000..b9fbec071
--- /dev/null
+++ b/source/node_modules/end-of-stream/index.js
@@ -0,0 +1,61 @@
+var once = require('once');
+
+var noop = function() {};
+
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
+
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+
+ callback = once(callback || noop);
+
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback();
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback();
+ };
+
+ var onclose = function() {
+ if (readable && !(rs && rs.ended)) return callback(new Error('premature close'));
+ if (writable && !(ws && ws.ended)) return callback(new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', callback);
+ stream.on('close', onclose);
+
+ return stream;
+};
+
+module.exports = eos;
\ No newline at end of file
diff --git a/source/node_modules/end-of-stream/package.json b/source/node_modules/end-of-stream/package.json
new file mode 100644
index 000000000..260d4392a
--- /dev/null
+++ b/source/node_modules/end-of-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_args": [
+ [
+ "end-of-stream@~0.1.5",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/orchestrator"
+ ]
+ ],
+ "_from": "end-of-stream@>=0.1.5 <0.2.0",
+ "_id": "end-of-stream@0.1.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/end-of-stream",
+ "_npmUser": {
+ "email": "mathiasbuus@gmail.com",
+ "name": "mafintosh"
+ },
+ "_npmVersion": "1.4.9",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "end-of-stream",
+ "raw": "end-of-stream@~0.1.5",
+ "rawSpec": "~0.1.5",
+ "scope": null,
+ "spec": ">=0.1.5 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/orchestrator"
+ ],
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz",
+ "_shasum": "8e177206c3c80837d85632e8b9359dfe8b2f6eaf",
+ "_shrinkwrap": null,
+ "_spec": "end-of-stream@~0.1.5",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/orchestrator",
+ "author": {
+ "email": "mathiasbuus@gmail.com",
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/end-of-stream/issues"
+ },
+ "dependencies": {
+ "once": "~1.3.0"
+ },
+ "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "8e177206c3c80837d85632e8b9359dfe8b2f6eaf",
+ "tarball": "http://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz"
+ },
+ "homepage": "https://github.com/mafintosh/end-of-stream",
+ "keywords": [
+ "callback",
+ "close",
+ "end",
+ "finish",
+ "stream",
+ "streams",
+ "wait"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "name": "end-of-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/end-of-stream.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "0.1.5"
+}
diff --git a/source/node_modules/end-of-stream/test.js b/source/node_modules/end-of-stream/test.js
new file mode 100644
index 000000000..277f1ce61
--- /dev/null
+++ b/source/node_modules/end-of-stream/test.js
@@ -0,0 +1,59 @@
+var assert = require('assert');
+var eos = require('./index');
+
+var expected = 6;
+var fs = require('fs');
+var net = require('net');
+
+var ws = fs.createWriteStream('/dev/null');
+eos(ws, function(err) {
+ expected--;
+ assert(!!err);
+ if (!expected) process.exit(0);
+});
+ws.close();
+
+var rs = fs.createReadStream('/dev/random');
+eos(rs, function(err) {
+ expected--;
+ assert(!!err);
+ if (!expected) process.exit(0);
+});
+rs.close();
+
+var rs = fs.createReadStream(__filename);
+eos(rs, function(err) {
+ expected--;
+ assert(!err);
+ if (!expected) process.exit(0);
+});
+rs.pipe(fs.createWriteStream('/dev/null'));
+
+var socket = net.connect(50000);
+eos(socket, function(err) {
+ expected--;
+ assert(!!err);
+ if (!expected) process.exit(0);
+});
+
+
+var server = net.createServer(function(socket) {
+ eos(socket, function() {
+ expected--;
+ if (!expected) process.exit(0);
+ });
+ socket.destroy();
+}).listen(30000, function() {
+ var socket = net.connect(30000);
+ eos(socket, function() {
+ expected--;
+ if (!expected) process.exit(0);
+ });
+});
+
+
+
+setTimeout(function() {
+ assert(expected === 0);
+ process.exit(0);
+}, 1000);
diff --git a/source/node_modules/error-ex/LICENSE b/source/node_modules/error-ex/LICENSE
new file mode 100644
index 000000000..0a5f461a6
--- /dev/null
+++ b/source/node_modules/error-ex/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 JD Ballard
+
+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.
diff --git a/source/node_modules/error-ex/README.md b/source/node_modules/error-ex/README.md
new file mode 100644
index 000000000..97f744af8
--- /dev/null
+++ b/source/node_modules/error-ex/README.md
@@ -0,0 +1,144 @@
+# node-error-ex [](https://travis-ci.org/Qix-/node-error-ex) [](https://coveralls.io/r/Qix-/node-error-ex)
+> Easily subclass and customize new Error types
+
+## Examples
+To include in your project:
+```javascript
+var errorEx = require('error-ex');
+```
+
+To create an error message type with a specific name (note, that `ErrorFn.name`
+will not reflect this):
+```javascript
+var JSONError = errorEx('JSONError');
+
+var err = new JSONError('error');
+err.name; //-> JSONError
+throw err; //-> JSONError: error
+```
+
+To add a stack line:
+```javascript
+var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')});
+
+var err = new JSONError('error')
+err.fileName = '/a/b/c/foo.json';
+throw err; //-> (line 2)-> in /a/b/c/foo.json
+```
+
+To append to the error message:
+```javascript
+var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')});
+
+var err = new JSONError('error');
+err.fileName = '/a/b/c/foo.json';
+throw err; //-> JSONError: error in /a/b/c/foo.json
+```
+
+## API
+
+#### `errorEx([name], [properties])`
+Creates a new ErrorEx error type
+
+- `name`: the name of the new type (appears in the error message upon throw;
+ defaults to `Error.name`)
+- `properties`: if supplied, used as a key/value dictionary of properties to
+ use when building up the stack message. Keys are property names that are
+ looked up on the error message, and then passed to function values.
+ - `line`: if specified and is a function, return value is added as a stack
+ entry (error-ex will indent for you). Passed the property value given
+ the key.
+ - `stack`: if specified and is a function, passed the value of the property
+ using the key, and the raw stack lines as a second argument. Takes no
+ return value (but the stack can be modified directly).
+ - `message`: if specified and is a function, return value is used as new
+ `.message` value upon get. Passed the property value of the property named
+ by key, and the existing message is passed as the second argument as an
+ array of lines (suitable for multi-line messages).
+
+Returns a constructor (Function) that can be used just like the regular Error
+constructor.
+
+```javascript
+var errorEx = require('error-ex');
+
+var BasicError = errorEx();
+
+var NamedError = errorEx('NamedError');
+
+// --
+
+var AdvancedError = errorEx('AdvancedError', {
+ foo: {
+ line: function (value, stack) {
+ if (value) {
+ return 'bar ' + value;
+ }
+ return null;
+ }
+ }
+}
+
+var err = new AdvancedError('hello, world');
+err.foo = 'baz';
+throw err;
+
+/*
+ AdvancedError: hello, world
+ bar baz
+ at tryReadme() (readme.js:20:1)
+*/
+```
+
+#### `errorEx.line(str)`
+Creates a stack line using a delimiter
+
+> This is a helper function. It is to be used in lieu of writing a value object
+> for `properties` values.
+
+- `str`: The string to create
+ - Use the delimiter `%s` to specify where in the string the value should go
+
+```javascript
+var errorEx = require('error-ex');
+
+var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')});
+
+var err = new FileError('problem reading file');
+err.fileName = '/a/b/c/d/foo.js';
+throw err;
+
+/*
+ FileError: problem reading file
+ in /a/b/c/d/foo.js
+ at tryReadme() (readme.js:7:1)
+*/
+```
+
+#### `errorEx.append(str)`
+Appends to the `error.message` string
+
+> This is a helper function. It is to be used in lieu of writing a value object
+> for `properties` values.
+
+- `str`: The string to append
+ - Use the delimiter `%s` to specify where in the string the value should go
+
+```javascript
+var errorEx = require('error-ex');
+
+var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')});
+
+var err = new SyntaxError('improper indentation');
+err.fileName = '/a/b/c/d/foo.js';
+throw err;
+
+/*
+ SyntaxError: improper indentation in /a/b/c/d/foo.js
+ at tryReadme() (readme.js:7:1)
+*/
+```
+
+## License
+Licensed under the [MIT License](http://opensource.org/licenses/MIT).
+You can find a copy of it in [LICENSE](LICENSE).
diff --git a/source/node_modules/error-ex/index.js b/source/node_modules/error-ex/index.js
new file mode 100644
index 000000000..1bdc943bc
--- /dev/null
+++ b/source/node_modules/error-ex/index.js
@@ -0,0 +1,115 @@
+'use strict';
+
+var util = require('util');
+var isArrayish = require('is-arrayish');
+
+var errorEx = function errorEx(name, properties) {
+ if (!name || name.constructor !== String) {
+ properties = name || {};
+ name = Error.name;
+ }
+
+ var errorExError = function ErrorEXError(message) {
+ if (!this) {
+ return new ErrorEXError(message);
+ }
+
+ message = message instanceof Error
+ ? message.message
+ : (message || this.message);
+
+ Error.call(this, message);
+ Error.captureStackTrace(this, errorExError);
+ this.name = name;
+
+ delete this.message;
+
+ Object.defineProperty(this, 'message', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ var newMessage = message.split(/\r?\n/g);
+
+ for (var key in properties) {
+ if (properties.hasOwnProperty(key) && 'message' in properties[key]) {
+ newMessage = properties[key].message(this[key], newMessage) ||
+ newMessage;
+ if (!isArrayish(newMessage)) {
+ newMessage = [newMessage];
+ }
+ }
+ }
+
+ return newMessage.join('\n');
+ },
+ set: function (v) {
+ message = v;
+ }
+ });
+
+ var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
+ var stackGetter = stackDescriptor.get;
+
+ stackDescriptor.get = function () {
+ var stack = stackGetter.call(this).split(/\r?\n+/g);
+
+ var lineCount = 1;
+ for (var key in properties) {
+ if (!properties.hasOwnProperty(key)) {
+ continue;
+ }
+
+ var modifier = properties[key];
+
+ if ('line' in modifier) {
+ var line = modifier.line(this[key]);
+ if (line) {
+ stack.splice(lineCount, 0, ' ' + line);
+ }
+ }
+
+ if ('stack' in modifier) {
+ modifier.stack(this[key], stack);
+ }
+ }
+
+ return stack.join('\n');
+ };
+
+ Object.defineProperty(this, 'stack', stackDescriptor);
+ };
+
+ util.inherits(errorExError, Error);
+
+ return errorExError;
+};
+
+errorEx.append = function (str, def) {
+ return {
+ message: function (v, message) {
+ v = v || def;
+
+ if (v) {
+ message[0] += ' ' + str.replace('%s', v.toString());
+ }
+
+ return message;
+ }
+ };
+};
+
+errorEx.line = function (str, def) {
+ return {
+ line: function (v) {
+ v = v || def;
+
+ if (v) {
+ return str.replace('%s', v.toString());
+ }
+
+ return null;
+ }
+ };
+};
+
+module.exports = errorEx;
diff --git a/source/node_modules/error-ex/package.json b/source/node_modules/error-ex/package.json
new file mode 100644
index 000000000..b28ba5d15
--- /dev/null
+++ b/source/node_modules/error-ex/package.json
@@ -0,0 +1,101 @@
+{
+ "_args": [
+ [
+ "error-ex@^1.2.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/parse-json"
+ ]
+ ],
+ "_from": "error-ex@>=1.2.0 <2.0.0",
+ "_id": "error-ex@1.3.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/error-ex",
+ "_nodeVersion": "4.1.1",
+ "_npmUser": {
+ "email": "i.am.qix@gmail.com",
+ "name": "qix"
+ },
+ "_npmVersion": "3.3.6",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "error-ex",
+ "raw": "error-ex@^1.2.0",
+ "rawSpec": "^1.2.0",
+ "scope": null,
+ "spec": ">=1.2.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/parse-json"
+ ],
+ "_resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz",
+ "_shasum": "e67b43f3e82c96ea3a584ffee0b9fc3325d802d9",
+ "_shrinkwrap": null,
+ "_spec": "error-ex@^1.2.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/parse-json",
+ "bugs": {
+ "url": "https://github.com/qix-/node-error-ex/issues"
+ },
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ },
+ "description": "Easy error subclassing and stack customization",
+ "devDependencies": {
+ "coffee-script": "^1.9.3",
+ "coveralls": "^2.11.2",
+ "istanbul": "^0.3.17",
+ "mocha": "^2.2.5",
+ "should": "^7.0.1",
+ "xo": "^0.7.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "e67b43f3e82c96ea3a584ffee0b9fc3325d802d9",
+ "tarball": "http://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "118bb63206f736f2450480e73f9d7d22692ae328",
+ "homepage": "https://github.com/qix-/node-error-ex#readme",
+ "keywords": [
+ "custom",
+ "error",
+ "errors",
+ "extend",
+ "extending",
+ "extension",
+ "stack",
+ "subclass"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "qix",
+ "email": "i.am.qix@gmail.com"
+ },
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "error-ex",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/qix-/node-error-ex.git"
+ },
+ "scripts": {
+ "pretest": "xo",
+ "test": "mocha --compilers coffee:coffee-script/register"
+ },
+ "version": "1.3.0",
+ "xo": {
+ "rules": {
+ "operator-linebreak": [
+ 0
+ ]
+ }
+ }
+}
diff --git a/source/node_modules/es5-ext/.lint b/source/node_modules/es5-ext/.lint
new file mode 100644
index 000000000..d1da61037
--- /dev/null
+++ b/source/node_modules/es5-ext/.lint
@@ -0,0 +1,38 @@
+@root
+
+module
+
+indent 2
+maxlen 100
+tabs
+
+ass
+continue
+forin
+nomen
+plusplus
+vars
+
+./global.js
+./function/_define-length.js
+./function/#/copy.js
+./object/unserialize.js
+./test/function/valid-function.js
+evil
+
+./math/_pack-ieee754.js
+./math/_unpack-ieee754.js
+./math/clz32/shim.js
+./math/imul/shim.js
+./number/to-uint32.js
+./string/#/at.js
+bitwise
+
+./math/fround/shim.js
+predef+ Float32Array
+
+./object/first-key.js
+forin
+
+./test/reg-exp/#/index.js
+predef+ __dirname
diff --git a/source/node_modules/es5-ext/.lintignore b/source/node_modules/es5-ext/.lintignore
new file mode 100644
index 000000000..eece4ff3c
--- /dev/null
+++ b/source/node_modules/es5-ext/.lintignore
@@ -0,0 +1,9 @@
+/string/#/normalize/_data.js
+/test/boolean/is-boolean.js
+/test/date/is-date.js
+/test/number/is-number.js
+/test/object/is-copy.js
+/test/object/is-number-value.js
+/test/object/is-object.js
+/test/reg-exp/is-reg-exp.js
+/test/string/is-string.js
diff --git a/source/node_modules/es5-ext/.npmignore b/source/node_modules/es5-ext/.npmignore
new file mode 100644
index 000000000..eb09b500d
--- /dev/null
+++ b/source/node_modules/es5-ext/.npmignore
@@ -0,0 +1,4 @@
+.DS_Store
+/node_modules
+/.lintcache
+/npm-debug.log
diff --git a/source/node_modules/es5-ext/.travis.yml b/source/node_modules/es5-ext/.travis.yml
new file mode 100644
index 000000000..e8e18ee77
--- /dev/null
+++ b/source/node_modules/es5-ext/.travis.yml
@@ -0,0 +1,15 @@
+sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
+language: node_js
+node_js:
+ - 0.12
+ - 4
+ - 5
+
+before_install:
+ - mkdir node_modules; ln -s ../ node_modules/es5-ext
+
+notifications:
+ email:
+ - medikoo+es5-ext@medikoo.com
+
+script: "npm test && npm run lint"
diff --git a/source/node_modules/es5-ext/CHANGES b/source/node_modules/es5-ext/CHANGES
new file mode 100644
index 000000000..92ee5f6ef
--- /dev/null
+++ b/source/node_modules/es5-ext/CHANGES
@@ -0,0 +1,628 @@
+v0.10.11 -- 2015.12.18
+* Ensure that check for implementation of RegExp flags doesn't crash in V8 (thanks @mathiasbynens)
+
+v0.10.10 -- 2015.12.11
+* Add Object.isNumberValue util
+
+v0.10.9 -- 2015.12.01
+* Add Object.ensureNaturalNumber and Object.ensureNaturalNumberValue
+
+v0.10.8 -- 2015.10.02
+* Add Number.isNatural
+* Add Object.find and Object.findKey
+* Support arrays in Object.copyDeep
+* Fix iteration issue in forEachRight and someRight
+* Fix detection of native sinh
+* Depend on es6-symbol v3
+
+v0.10.7 -- 2015.04.22
+* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1.
+ Still they're non breaking and start the conventions to be used in v1
+ * Object.validateArrayLike
+ * Object.validateArrayLikeObject
+ * Object.validateStringifiable
+ * Object.validateStringifiableValue
+ * Universal utilities for array-like/iterable objects
+ * Iterable.is
+ * Iterable.validate
+ * Iterable.validateObject
+ * Iterable.forEach
+* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel
+* Fix calculations of large numbers in Math.tanh
+* Fix algorithm of Math.sinh
+* Fix indexes to not use real symbols
+* Fix length of String.fromCodePoint
+* Fix tests of Array#copyWithin
+* Update Travis CI configuration
+
+v0.10.6 -- 2015.02.02
+* Fix handling of infinite values in Math.trunc
+* Fix handling of getters in Object.normalizeOptions
+
+v0.10.5 -- 2015.01.20
+* Add Function#toStringTokens
+* Add Object.serialize and Object.unserialize
+* Add String.randomUniq
+* Fix Strin#camelToHyphen issue with tokens that end with digit
+* Optimise Number.isInteger logic
+* Improve documentation
+* Configure lint scripts
+* Fix spelling of LICENSE
+
+v0.10.4 -- 2014.04.30
+* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens)
+* Improve documentations
+
+v0.10.3 -- 2014.04.29
+Provide accurate iterators handling:
+* Array.from improvements:
+ * Assure right unicode symbols resolution when processing strings in Array.from
+ * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment
+* Add methods:
+ * Array.prototype.entries
+ * Array.prototype.keys
+ * Array.prototype.values
+ * Array.prototype[@@iterator]
+ * String.prototype[@@iterator]
+
+Improve documentation
+
+v0.10.2 -- 2014.04.24
+- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are
+ no callable objects which are `typeof obj !== 'function'`
+- Update Array.from map callback signature (up to latest resolution of TC39)
+- Improve documentation
+
+v0.10.1 -- 2014.04.14
+Bump version for npm
+(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago)
+
+v0.10.0 -- 2014.04.13
+Major update:
+- All methods and function specified for ECMAScript 6 are now introduced as
+ shims accompanied with functions through which (optionally) they can be
+ implementend on native objects
+- Filename convention was changed to shorter and strictly lower case names. e.g.
+ `lib/String/prototype/starts-with` became `string/#/starts-with`
+- Generated functions are guaranteed to have expected length
+- Objects with null prototype (created via `Object.create(null)`) are widely
+ supported (older version have crashed due to implied `obj.hasOwnProperty` and
+ related invocations)
+- Support array subclasses
+- When handling lists do not limit its length to Uint32 range
+- Use newly introduced `Object.eq` for strict equality in place of `Object.is`
+- Iteration of Object have been improved so properties that were hidden or
+ removed after iteration started are not iterated.
+
+Additions:
+- `Array.isPlainArray`
+- `Array.validArray`
+- `Array.prototype.concat` (as updated with ES6)
+- `Array.prototype.copyWithin` (as introduced with ES6)
+- `Array.prototype.fill` (as introduced with ES6)
+- `Array.prototype.filter` (as updated with ES6)
+- `Array.prototype.findIndex` (as introduced with ES6)
+- `Array.prototype.map` (as updated with ES6)
+- `Array.prototype.separate`
+- `Array.prototype.slice` (as updated with ES6)
+- `Array.prototype.splice` (as updated with ES6)
+- `Function.prototype.copy`
+- `Math.acosh` (as introduced with ES6)
+- `Math.atanh` (as introduced with ES6)
+- `Math.cbrt` (as introduced with ES6)
+- `Math.clz32` (as introduced with ES6)
+- `Math.cosh` (as introduced with ES6)
+- `Math.expm1` (as introduced with ES6)
+- `Math.fround` (as introduced with ES6)
+- `Math.hypot` (as introduced with ES6)
+- `Math.imul` (as introduced with ES6)
+- `Math.log2` (as introduced with ES6)
+- `Math.log10` (as introduced with ES6)
+- `Math.log1p` (as introduced with ES6)
+- `Math.sinh` (as introduced with ES6)
+- `Math.tanh` (as introduced with ES6)
+- `Math.trunc` (as introduced with ES6)
+- `Number.EPSILON` (as introduced with ES6)
+- `Number.MIN_SAFE_INTEGER` (as introduced with ES6)
+- `Number.MAX_SAFE_INTEGER` (as introduced with ES6)
+- `Number.isFinite` (as introduced with ES6)
+- `Number.isInteger` (as introduced with ES6)
+- `Number.isSafeInteger` (as introduced with ES6)
+- `Object.create` (with fix for V8 issue which disallows prototype turn of
+ objects derived from null
+- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero
+ algorithm
+- `Object.firstKey`
+- `Object.keys` (as updated with ES6)
+- `Object.mixinPrototypes`
+- `Object.primitiveSet`
+- `Object.setPrototypeOf` (as introduced with ES6)
+- `Object.validObject`
+- `RegExp.escape`
+- `RegExp.prototype.match` (as introduced with ES6)
+- `RegExp.prototype.replace` (as introduced with ES6)
+- `RegExp.prototype.search` (as introduced with ES6)
+- `RegExp.prototype.split` (as introduced with ES6)
+- `RegExp.prototype.sticky` (as introduced with ES6)
+- `RegExp.prototype.unicode` (as introduced with ES6)
+- `String.fromCodePoint` (as introduced with ES6)
+- `String.raw` (as introduced with ES6)
+- `String.prototype.at`
+- `String.prototype.codePointAt` (as introduced with ES6)
+- `String.prototype.normalize` (as introduced with ES6)
+- `String.prototype.plainReplaceAll`
+
+Removals:
+- `reserved` set
+- `Array.prototype.commonLeft`
+- `Function.insert`
+- `Function.remove`
+- `Function.prototype.silent`
+- `Function.prototype.wrap`
+- `Object.descriptor` Move to external `d` project.
+ See: https://github.com/medikoo/d
+- `Object.diff`
+- `Object.extendDeep`
+- `Object.reduce`
+- `Object.values`
+- `String.prototype.trimCommonLeft`
+
+Renames:
+- `Function.i` into `Function.identity`
+- `Function.k` into `Function.constant`
+- `Number.toInt` into `Number.toInteger`
+- `Number.toUint` into `Number.toPosInteger`
+- `Object.extend` into `Object.assign` (as introduced in ES 6)
+- `Object.extendProperties` into `Object.mixin`, with improved internal
+ handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6
+- `Object.isList` into `Object.isArrayLike`
+- `Object.mapToArray` into `Object.toArray` (with fixed function length)
+- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real
+ use case where we use this function)
+- `Function.prototype.chain` into `Function.prototype.compose`
+- `Function.prototype.match` into `Function.prototype.spread`
+- `String.prototype.format` into `String.formatMethod`
+
+Improvements & Fixes:
+- Remove workaround for primitive values handling in object iterators
+- `Array.from`: Update so it follows ES 6 spec
+- `Array.prototype.compact`: filters just null and undefined values
+ (not all falsies)
+- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position
+ handling, improve internals
+- `Array.prototype.find`: return undefined not null, in case of not found
+ (follow ES 6)
+- `Array.prototype.remove` fix function length
+- `Error.custom`: simplify, Custom class case is addressed by outer
+ `error-create` project -> https://github.com/medikoo/error-create
+- `Error.isError` true only for Error instances (remove detection of host
+ Exception objects)
+- `Number.prototype.pad`: Normalize negative pad
+- `Object.clear`: Handle errors same way as in `Object.assign`
+- `Object.compact`: filters just null and undefined values (not all falsies)
+- `Object.compare`: Take into account NaN values
+- `Object.copy`: Split into `Object.copy` and `Object.copyDeep`
+- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where
+ `isCopyDeep` handles nested plain objects and plain arrays only
+- `String.prototype.endsWith`: Adjust up to ES6 specification
+- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm
+- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace`
+- `String.prototype.startsWith`: Adjust up to ES6 specification
+- Update lint rules, and adjust code to that
+- Update Travis CI configuration
+- Remove Makefile (it's cross-env utility)
+
+v0.9.2 -- 2013.03.11
+Added:
+* Array.prototype.isCopy
+* Array.prototype.isUniq
+* Error.CustomError
+* Function.validFunction
+* Object.extendDeep
+* Object.descriptor.binder
+* Object.safeTraverse
+* RegExp.validRegExp
+* String.prototype.capitalize
+* String.prototype.simpleReplace
+
+Fixed:
+* Fix Array.prototype.diff for sparse arrays
+* Accept primitive objects as input values in Object iteration methods and
+ Object.clear, Object.count, Object.diff, Object.extend,
+ Object.getPropertyNames, Object.values
+* Pass expected arguments to callbacks of Object.filter, Object.mapKeys,
+ Object.mapToArray, Object.map
+* Improve callable callback support in Object.mapToArray
+
+v0.9.1 -- 2012.09.17
+* Object.reduce - reduce for hash-like collections
+* Accapt any callable object as callback in Object.filter, mapKeys and map
+* Convention cleanup
+
+v0.9.0 -- 2012.09.13
+We're getting to real solid API
+
+Removed:
+* Function#memoize - it's grown up to be external package, to be soon published
+ as 'memoizee'
+* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as
+ external package
+# Function.arguments - obsolete
+# Function.context - obsolete
+# Function#flip - not readable when used, so it was never used
+# Object.clone - obsolete and confusing
+
+Added:
+* String#camelToHyphen - String format convertion
+
+Renamed:
+* String#dashToCamelCase -> String#hyphenToCamel
+
+Fixes:
+* Object.isObject - Quote names in literals that match reserved keywords
+ (older implementations crashed on that)
+* String#repeat - Do not accept negative values (coerce them to 1)
+
+Improvements:
+* Array#remove - Accepts many arguments, we can now remove many values at once
+* Object iterators (forEach, map, some) - Compare function invoked with scope
+ object bound to this
+* Function#curry - Algorithm cleanup
+* Object.isCopy - Support for all types, not just plain objects
+* Object.isPlainObject - Support for cross-frame objects
+* Do not memoize any of the functions, it shouldn't be decided internally
+* Remove Object.freeze calls in reserved, it's not up to convention
+* Improved documentation
+* Better linting (hard-core approach using both JSLint mod and JSHint)
+* Optional arguments are now documented in funtions signature
+
+v0.8.2 -- 2012.06.22
+Fix errors in Array's intersection and exclusion methods, related to improper
+usage of contains method
+
+v0.8.1 -- 2012.06.13
+Reorganized internal logic of Function.prototype.memoize. So it's more safe now
+and clears cache properly. Additionally preventCache option was provided.
+
+v0.8.0 -- 2012.05.28
+Again, major overhaul. Probably last experimental stuff was trashed, all API
+looks more like standard extensions now.
+
+Changes:
+* Turn all Object.prototype extensions into functions and move them to Object
+namespace. We learned that extending Object.prototype is bad idea in any case.
+* Rename Function.prototype.curry into Function.prototype.partial. This function
+ is really doing partial application while currying is slightly different
+ concept.
+* Convert Function.prototype.ncurry to new implementation of
+ Function.prototype.curry, it now serves real curry concept additionaly it
+ covers use cases for aritize and hold, which were removed.
+* Rename Array's peek to last, and provide support for sparse arrays in it
+* Rename Date's monthDaysCount into daysInMonth
+* Simplify object iterators, now order of iteration can be configured with just
+ compareFn argument (no extra byKeys option)
+* Rename Object.isDuplicate to Object.isCopy
+* Rename Object.isEqual to Object.is which is compatible with future 'is'
+ keyword
+* Function.memoize is now Function.prototype.memoize. Additionally clear cache
+ functionality is added, and access to original arguments object.
+* Rename validation functions: assertNotNull to validValue, assertCallable to
+ validCallable. validValue was moved to Object namespace. On success they now
+ return validated value instead of true, it supports better composition.
+ Additionally created Date.validDate and Error.validError
+* All documentation is now held in README.md not in code files.
+* Move guid to String namespace. All guids now start with numbers.
+* Array.generate: fill argument is now optional
+* Object.toArray is now Array.from (as new ES6 specification draft suggests)
+* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is)
+ versions of them (eIndexOf, eLastIndexOf)
+* Turn all get* functions that returned methods into actuall methods (get*
+ functionality can still be achieved with help of Function.prototype.partial).
+ So: Date.getFormat is now Date.prototype.format,
+ Number.getPad is now Number.prototype.pad,
+ String.getFormat is now String.prototype.format,
+ String.getIndent is now String.prototype.indent,
+ String.getPad is now String.prototype.pad
+* Refactored Object.descriptor, it is now just two functions, main one and
+ main.gs, main is for describing values, and gs for describing getters and
+ setters. Configuration is passed with first argument as string e.g. 'ce' for
+ configurable and enumerable. If no configuration string is provided then by
+ default it returns configurable and writable but not enumerable for value or
+ configurable but not enumerable for getter/setter
+* Function.prototype.silent now returns prepared function (it was
+ expected to be fixed for 0.7)
+* Reserved keywords map (reserved) is now array not hash.
+* Object.merge is now Object.extend (while former Object.extend was completely
+ removed) - 'extend' implies that we change object, not creating new one (as
+ 'merge' may imply). Similarily Object.mergeProperties was renamed to
+ Object.extendProperties
+* Position argument support in Array.prototype.contains and
+ String.prototype.contains (so it follows ES6 specification draft)
+* endPosition argument support in String.prototype.endsWith and fromPosition
+ argument support in String.prototype.startsWith (so it follows ES6
+ specification draft)
+* Better and cleaner String.prototype.indent implementation. No default value
+ for indent string argument, optional nest value (defaults to 1), remove
+ nostart argument
+* Correct length values for most methods (so they reflect length of similar
+ methods in standard)
+* Length argument is now optional in number and string pad methods.
+* Improve arguments validation in general, so it adheres to standard conventions
+* Fixed format of package.json
+
+Removed methods and functions:
+* Object.prototype.slice - Object is not ordered collection, so slice doesn't
+ make sense.
+* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for
+ that
+* Function.prototype.aritize and Function.prototype.hold - same functionality
+ can be achieved with new Function.prototype.curry
+* Function.prototype.log - provided more generic Function.prototype.wrap for
+ same use case
+* getNextIdGenerator - no use case for that (String.guid should be used if
+ needed)
+* Object.toObject - Can be now acheived with Object(validValue(x))
+* Array.prototype.someValue - no real use case (personally used once and
+ case was already controversial)
+* Date.prototype.duration - moved to external package
+* Number.getAutoincrement - No real use case
+* Object.prototype.extend, Object.prototype.override,
+ Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably
+ too complex, same should be achieved just with Object.create,
+ Object.descriptor and by saving references to super methods in local scope.
+* Object.getCompareBy - Functions should be created individually for each use
+ case
+* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and
+ same can be easily achieved with simple inline function
+* String.getPrefixWith - Not real use case for something that can be easily
+ achieved with '+' operator
+* Object.isPrimitive - It's just negation of Object.isObject
+* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in
+ Number namespace and should rather be addressed with simple inline functions.
+* Number.prototype.subtract - Should rather be addressed with simple inline
+ function
+
+New methods and functions:
+* Array.prototype.lastIndex - Returns last declared index in array
+* String.prototype.last - last for strings
+* Function.prototype.wrap - Wrap function with other, it allows to specify
+ before and after behavior transform return value or prevent original function
+ from being called.
+* Math.sign - Returns sign of a number (already in ES6 specification draft)
+* Number.toInt - Converts value to integer (already in ES6 specification draft)
+* Number.isNaN - Returns true if value is NaN (already in ES6 specification
+ draft)
+* Number.toUint - Converts value to unsigned integer
+* Number.toUint32 - Converts value to 32bit unsigned integer
+* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of
+ standard methods (all methods that were using native indexOf or lastIndexOf
+ now uses eIndexOf and elastIndexOf respectively)
+* Array.of - as it's specified for ES6
+
+Fixes:
+* Fixed binarySearch so it always returns valid list index
+* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro
+ engine)
+* Object.map now supports third argument for callback
+
+v0.7.1 -- 2012.01.05
+New methods:
+* Array.prototype.firstIndex - returns first valid index of array (for
+ sparse arrays it may not be '0'
+
+Improvements:
+* Array.prototype.first - now returns value for index returned by firstIndex
+* Object.prototype.mapToArray - can be called without callback, then array of
+ key-value pairs is returned
+
+Fixes
+* Array.prototype.forEachRight, object's length read through UInt32 conversion
+
+v0.7.0 -- 2011.12.27
+Major update.
+Stepped back from experimental ideas and introduced more standard approach
+taking example from how ES5 methods and functions are designed. One exceptions
+is that, we don’t refrain from declaring methods for Object.prototype - it’s up
+to developer whether how he decides to use it in his context (as function or as
+method).
+
+In general:
+* Removed any method 'functionalization' and functionalize method itself.
+ es5-ext declares plain methods, which can be configured to work as functions
+ with call.bind(method) - see documentation.
+* Removed separation of Object methods for ES5 (with descriptors) and
+ ES3 (plain) - we're following ES5 idea on that, some methods are intended just
+ for enumerable properties and some are for all properties, all are declared
+ for Object.prototype
+* Removed separation of Array generic (collected in List folder) and not generic
+ methods (collected in Array folder). Now all methods are generic and are in
+ Array/prototype folder. This separation also meant, that methods in Array are
+ usually destructive. We don’t do that separation now, there’s generally no use
+ case for destructive iterators, we should be fine with one version of each
+ method, (same as ES5 is fine with e.g. one, non destructive 'filter' method)
+* Folder structure resembles tree of native ES5 Objects
+* All methods are written with ES5 conventions in mind, it means that most
+ methods are generic and can be run on any object. In more detail:
+ ** Array.prototype and Object.prototype methods can be run on any object (any
+ not null or undefined value),
+ ** Date.prototype methods should be called only on Date instances.
+ ** Function.prototype methods can be called on any callable objects (not
+ necessarily functions)
+ ** Number.prototype & String.prototype methods can be called on any value, in
+ case of Number it it’ll be degraded to number, in case of string it’ll be
+ degraded to string.
+* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version)
+
+Improvements for existing functions and methods:
+* Function.memoize (was Function.cache) is now fully generic, can operate on any
+ type of arguments and it’s NaN safe (all NaN objects are considered equal)
+* Method properties passed to Object.prototype.extend or
+ Object.prototype.override can aside of _super optionally take prototype object
+ via _proto argument
+* Object iterators: forEach, mapToArray and every can now iterate in specified
+ order
+* pluck, invoke and other functions that return reusable functions or methods
+ have now their results memoized.
+
+New methods:
+* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive,
+ toObject
+* Array: generate
+* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first,
+ forEachRight, group, indexesOf, intersection, remove, someRight, someValue
+* Boolean: isBoolean
+* Date: isDate
+* Function: arguments, context, insert, isArguments, remove
+* Function.prototype: not, silent
+* Number: getAutoincrement, isNumber
+* Number.prototype: isLessOrEqual, isLess, subtract
+* Object: assertCallable, descriptor (functions for clean descriptors),
+ getCompareBy, isCallable, isObject
+* Object.prototype: clone (real clone), compact, count, diff, empty,
+ getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend,
+ slice, some, unset
+* RegExp: isRegExp
+* String: getPrefixWith, isString
+* String.prototype: caseInsensitiveCompare, contains, isNumeric
+
+Renamed methods:
+* Date.clone -> Date.prototype.copy
+* Date.format -> Date.getFormat
+* Date/day/floor -> Date.prototype.floorDay
+* Date/month/floor -> Date.prototype.floorMonth
+* Date/month/year -> Date.prototype.floorYear
+* Function.cache -> Function.memoize
+* Function.getApplyArg -> Function.prototype.match
+* Function.sequence -> Function.prototype.chain
+* List.findSameStartLength -> Array.prototype.commonLeft
+* Number.pad -> Number.getPad
+* Object/plain/clone -> Object.prototype.copy
+* Object/plain/elevate -> Object.prototype.flatten
+* Object/plain/same -> Object.prototype.isDuplicate
+* Object/plain/setValue -> Object.getSet
+* String.format -> String.getFormat
+* String.indent -> String.getIndent
+* String.pad -> String.getPad
+* String.trimLeftStr -> String.prototype.trimCommonLeft
+* Object.merge -> Object.prototype.mergeProperties
+* Object/plain/pluck -> Object.prototype.get
+* Array.clone is now Array.prototype.copy and can be used also on any array-like
+ objects
+* List.isList -> Object.isList
+* List.toArray -> Object.prototype.toArray
+* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase
+
+Removed methods:
+* Array.compact - removed destructive version (that operated on same array), we
+ have now non destructive version as Array.prototype.compact.
+* Function.applyBind -> use apply.bind directly
+* Function.bindBind -> use bind.bind directly
+* Function.callBind -> use call.bind directly
+* Fuction.clone -> no valid use case
+* Function.dscope -> controversial approach, shouldn’t be considered seriously
+* Function.functionalize -> It was experimental but standards are standards
+* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’)
+* List.concat -> Concat’s for array-like’s makes no sense, just convert to array
+ first
+* List.every -> Use Array.prototype.every directly
+* List.filter -> Use Array.prototype.filter directly
+* List.forEach -> User Array.prototype.forEach directly
+* List.isListObject -> No valid use case, do: isList(list) && (typeof list ===
+ 'object’)
+* List.map -> Use Array.prototype.map directly
+* List.reduce -> Use Array.prototype.reduce directly
+* List.shiftSame -> Use Array.prototype.commonLeft and do slice
+* List.slice -> Use Array.prototype.slice directly
+* List.some -> Use Array.prototype.some directly
+* Object.bindMethods -> it was version that considered descriptors, we have now
+ Object.prototype.bindMethods which operates only on enumerable properties
+* Object.every -> version that considered all properties, we have now
+ Object.prototype.every which iterates only enumerables
+* Object.invoke -> no use case
+* Object.mergeDeep -> no use case
+* Object.pluck -> no use case
+* Object.same -> it considered descriptors, now there’s only Object.isDuplicate
+ which compares only enumerable properties
+* Object.sameType -> no use case
+* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer
+ Object.descriptor functions
+* Object/plain/link -> no use case (it was used internally only by
+ Object/plain/merge)
+* Object/plain/setTrue -> now easily configurable by more universal
+ Object.getSet(true)
+* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be
+ added
+
+v0.6.3 -- 2011.12.12
+* Cleared npm warning for misnamed property in package.json
+
+v0.6.2 -- 2011.08.12
+* Calling String.indent without scope (global scope then) now treated as calling
+ it with null scope, it allows more direct invocations when using default nest
+ string: indent().call(str, nest)
+
+v0.6.1 -- 2011.08.08
+* Added TAD test suite to devDependencies, configured test commands.
+ Tests can be run with 'make test' or 'npm test'
+
+v0.6.0 -- 2011.08.07
+New methods:
+* Array: clone, compact (in place)
+* Date: format, duration, clone, monthDaysCount, day.floor, month.floor,
+ year.floor
+* Function: getApplyArg, , ncurry, rncurry, hold, cache, log
+* List: findSameStartLength, shiftSame, peek, isListObject
+* Number: pad
+* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor,
+ toDescriptors, invoke
+* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format
+
+Fixed:
+* Object.extend does now prototypal extend as exptected
+* Object.merge now tries to overwrite only configurable properties
+* Function.flip
+
+Improved:
+* Faster List.toArray
+* Better global retrieval
+* Functionalized all Function methods
+* Renamed bindApply and bindCall to applyBind and callBind
+* Removed Function.inherit (as it's unintuitive curry clone)
+* Straightforward logic in Function.k
+* Fixed naming of some tests files (letter case issue)
+* Renamed Function.saturate into Function.lock
+* String.dashToCamelCase digits support
+* Strings now considered as List objects
+* Improved List.compact
+* Concise logic for List.concat
+* Test wit TAD in clean ES5 context
+
+v0.5.1 -- 2011.07.11
+* Function's bindBind, bindCall and bindApply now more versatile
+
+v0.5.0 -- 2011.07.07
+* Removed Object.is and List.apply
+* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention
+ consistent)
+* Improved documentation
+
+v0.4.0 -- 2011.07.05
+* Take most functions on Object to Object.plain to keep them away from object
+ descriptors
+* Object functions with ES5 standard in mind (object descriptors)
+
+v0.3.0 -- 2011.06.24
+* New functions
+* Consistent file naming (dash instead of camelCase)
+
+v0.2.1 -- 2011.05.28
+* Renamed Functions.K and Function.S to to lowercase versions (use consistent
+ naming)
+
+v0.2.0 -- 2011.05.28
+* Renamed Array folder to List (as its generic functions for array-like objects)
+* Added Makefile
+* Added various functions
+
+v0.1.0 -- 2011.05.24
+* Initial version
diff --git a/source/node_modules/es5-ext/LICENSE b/source/node_modules/es5-ext/LICENSE
new file mode 100644
index 000000000..de39071f1
--- /dev/null
+++ b/source/node_modules/es5-ext/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2011-2015 Mariusz Nowak (www.medikoo.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/es5-ext/README.md b/source/node_modules/es5-ext/README.md
new file mode 100644
index 000000000..11d8a343d
--- /dev/null
+++ b/source/node_modules/es5-ext/README.md
@@ -0,0 +1,993 @@
+# es5-ext
+## ECMAScript 5 extensions
+### (with respect to ECMAScript 6 standard)
+
+Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.
+
+It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.
+
+When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.
+
+### Installation
+
+ $ npm install es5-ext
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+### Usage
+
+#### ECMAScript 6 features
+
+You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).
+
+```javascript
+require('es5-ext/array/from/implement');
+Array.from('foo'); // ['f', 'o', 'o']
+```
+
+You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.
+
+```javascript
+var aFrom = require('es5-ext/array/from');
+aFrom('foo'); // ['f', 'o', 'o']
+```
+
+If you want to use shim unconditionally (even if native implementation exists) do:
+
+```javascript
+var aFrom = require('es5-ext/array/from/shim');
+aFrom('foo'); // ['f', 'o', 'o']
+```
+
+##### List of ES6 shims
+
+It's about properties introduced with ES6 and those that have been updated in new spec.
+
+- `Array.from` -> `require('es5-ext/array/from')`
+- `Array.of` -> `require('es5-ext/array/of')`
+- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`
+- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`
+- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`
+- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`
+- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`
+- `Array.prototype.find` -> `require('es5-ext/array/#/find')`
+- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`
+- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`
+- `Array.prototype.map` -> `require('es5-ext/array/#/map')`
+- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`
+- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`
+- `Array.prototype.values` -> `require('es5-ext/array/#/values')`
+- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`
+- `Math.acosh` -> `require('es5-ext/math/acosh')`
+- `Math.asinh` -> `require('es5-ext/math/asinh')`
+- `Math.atanh` -> `require('es5-ext/math/atanh')`
+- `Math.cbrt` -> `require('es5-ext/math/cbrt')`
+- `Math.clz32` -> `require('es5-ext/math/clz32')`
+- `Math.cosh` -> `require('es5-ext/math/cosh')`
+- `Math.exmp1` -> `require('es5-ext/math/expm1')`
+- `Math.fround` -> `require('es5-ext/math/fround')`
+- `Math.hypot` -> `require('es5-ext/math/hypot')`
+- `Math.imul` -> `require('es5-ext/math/imul')`
+- `Math.log1p` -> `require('es5-ext/math/log1p')`
+- `Math.log2` -> `require('es5-ext/math/log2')`
+- `Math.log10` -> `require('es5-ext/math/log10')`
+- `Math.sign` -> `require('es5-ext/math/sign')`
+- `Math.signh` -> `require('es5-ext/math/signh')`
+- `Math.tanh` -> `require('es5-ext/math/tanh')`
+- `Math.trunc` -> `require('es5-ext/math/trunc')`
+- `Number.EPSILON` -> `require('es5-ext/number/epsilon')`
+- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`
+- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`
+- `Number.isFinite` -> `require('es5-ext/number/is-finite')`
+- `Number.isInteger` -> `require('es5-ext/number/is-integer')`
+- `Number.isNaN` -> `require('es5-ext/number/is-nan')`
+- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`
+- `Object.assign` -> `require('es5-ext/object/assign')`
+- `Object.keys` -> `require('es5-ext/object/keys')`
+- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`
+- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`
+- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`
+- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`
+- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`
+- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`
+- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`
+- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`
+- `String.raw` -> `require('es5-ext/string/raw')`
+- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`
+- `String.prototype.contains` -> `require('es5-ext/string/#/contains')`
+- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`
+- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`
+- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`
+- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`
+- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`
+
+#### Non ECMAScript standard features
+
+__es5-ext__ provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:
+
+```javascript
+Object.defineProperty(Function.prototype, 'partial', { value: require('es5-ext/function/#/partial'),
+ configurable: true, enumerable: false, writable: true });
+Object.defineProperty(Array.prototype, 'flatten', { value: require('es5-ext/array/#/flatten'),
+ configurable: true, enumerable: false, writable: true });
+Object.defineProperty(String.prototype, 'capitalize', { value: require('es5-ext/string/#/capitalize'),
+ configurable: true, enumerable: false, writable: true });
+```
+
+See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.
+
+__Important:__ Remember to __not__ extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine __only__ if you're the _owner_ of the global scope, so e.g. in final project you lead development of.
+
+When you're in situation when native extensions are not good idea, then you should use methods indirectly:
+
+
+```javascript
+var flatten = require('es5-ext/array/#/flatten');
+
+flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]
+```
+
+for better convenience you can turn methods into functions:
+
+
+```javascript
+var call = Function.prototype.call
+var flatten = call.bind(require('es5-ext/array/#/flatten'));
+
+flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
+```
+
+You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application
+
+```javascript
+var util = {};
+util.partial = call.bind(require('es5-ext/function/#/partial'));
+util.flatten = call.bind(require('es5-ext/array/#/flatten'));
+util.startsWith = call.bind(require('es5-ext/string/#/starts-with'));
+
+util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
+```
+
+As with native ones most methods are generic and can be run on any type of object.
+
+## API
+
+### Global extensions
+
+#### global _(es5-ext/global)_
+
+Object that represents global scope
+
+### Array Constructor extensions
+
+#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from).
+Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.
+
+#### generate([length[, …fill]]) _(es5-ext/array/generate)_
+
+Generate an array of pre-given _length_ built of repeated arguments.
+
+#### isPlainArray(x) _(es5-ext/array/is-plain-array)_
+
+Returns true if object is plain array (not instance of one of the Array's extensions).
+
+#### of([…items]) _(es5-ext/array/of)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of).
+Create an array from given arguments.
+
+#### toArray(obj) _(es5-ext/array/to-array)_
+
+Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back.
+
+#### validArray(obj) _(es5-ext/array/valid-array)_
+
+Returns `obj` if it's an array, otherwise throws `TypeError`
+
+### Array Prototype extensions
+
+#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_
+
+In __sorted__ list search for index of item for which _compareFn_ returns value closest to _0_.
+It's variant of binary search algorithm
+
+#### arr.clear() _(es5-ext/array/#/clear)_
+
+Clears the array
+
+#### arr.compact() _(es5-ext/array/#/compact)_
+
+Returns a copy of the context with all non-values (`null` or `undefined`) removed.
+
+#### arr.concat() _(es5-ext/array/#/concat)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat).
+ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.
+
+#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_
+
+Whether list contains the given value.
+
+#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).
+
+#### arr.diff(other) _(es5-ext/array/#/diff)_
+
+Returns the array of elements that are present in context list but not present in other list.
+
+#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_
+
+_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
+
+#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_
+
+_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
+
+#### arr.entries() _(es5-ext/array/#/entries)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries).
+Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.
+
+#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_
+
+Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments).
+
+#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).
+
+#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter).
+ES6's version of `filter`, returns array of same type as the context.
+
+#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find).
+Return first element for which given function returns true
+
+#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex).
+Return first index for which given function returns true
+
+#### arr.first() _(es5-ext/array/#/first)_
+
+Returns value for first defined index
+
+#### arr.firstIndex() _(es5-ext/array/#/first-index)_
+
+Returns first declared index of the array
+
+#### arr.flatten() _(es5-ext/array/#/flatten)_
+
+Returns flattened version of the array
+
+#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_
+
+`forEach` starting from last element
+
+#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_
+
+Group list elements by value returned by _cb_ function
+
+#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_
+
+Returns array of all indexes of given value
+
+#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_
+
+Computes the array of values that are the intersection of all lists (context list and lists given in arguments)
+
+#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_
+
+Returns true if both context and _other_ lists have same content
+
+#### arr.isUniq() _(es5-ext/array/#/is-uniq)_
+
+Returns true if all values in array are unique
+
+#### arr.keys() _(es5-ext/array/#/keys)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys).
+Returns iterator object, which traverses all array indexes.
+
+#### arr.last() _(es5-ext/array/#/last)_
+
+Returns value of last defined index
+
+#### arr.lastIndex() _(es5-ext/array/#/last)_
+
+Returns last defined index of the array
+
+#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map).
+ES6's version of `map`, returns array of same type as the context.
+
+#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_
+
+Remove values from the array
+
+#### arr.separate(sep) _(es5-ext/array/#/separate)_
+
+Returns array with items separated with `sep` value
+
+#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice).
+ES6's version of `slice`, returns array of same type as the context.
+
+#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_
+
+`some` starting from last element
+
+#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice).
+ES6's version of `splice`, returns array of same type as the context.
+
+#### arr.uniq() _(es5-ext/array/#/uniq)_
+
+Returns duplicate-free version of the array
+
+#### arr.values() _(es5-ext/array/#/values)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values).
+Returns iterator object which traverses all array values.
+
+#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator).
+Returns iterator object which traverses all array values.
+
+### Boolean Constructor extensions
+
+#### isBoolean(x) _(es5-ext/boolean/is-boolean)_
+
+Whether value is boolean
+
+### Date Constructor extensions
+
+#### isDate(x) _(es5-ext/date/is-date)_
+
+Whether value is date instance
+
+#### validDate(x) _(es5-ext/date/valid-date)_
+
+If given object is not date throw TypeError in other case return it.
+
+### Date Prototype extensions
+
+#### date.copy(date) _(es5-ext/date/#/copy)_
+
+Returns a copy of the date object
+
+#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_
+
+Returns number of days of date's month
+
+#### date.floorDay() _(es5-ext/date/#/floor-day)_
+
+Sets the date time to 00:00:00.000
+
+#### date.floorMonth() _(es5-ext/date/#/floor-month)_
+
+Sets date day to 1 and date time to 00:00:00.000
+
+#### date.floorYear() _(es5-ext/date/#/floor-year)_
+
+Sets date month to 0, day to 1 and date time to 00:00:00.000
+
+#### date.format(pattern) _(es5-ext/date/#/format)_
+
+Formats date up to given string. Supported patterns:
+
+* `%Y` - Year with century, 1999, 2003
+* `%y` - Year without century, 99, 03
+* `%m` - Month, 01..12
+* `%d` - Day of the month 01..31
+* `%H` - Hour (24-hour clock), 00..23
+* `%M` - Minute, 00..59
+* `%S` - Second, 00..59
+* `%L` - Milliseconds, 000..999
+
+### Error Constructor extensions
+
+#### custom(message/*, code, ext*/) _(es5-ext/error/custom)_
+
+Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)
+
+#### isError(x) _(es5-ext/error/is-error)_
+
+Whether value is an error (instance of `Error`).
+
+#### validError(x) _(es5-ext/error/valid-error)_
+
+If given object is not error throw TypeError in other case return it.
+
+### Error Prototype extensions
+
+#### err.throw() _(es5-ext/error/#/throw)_
+
+Throws error
+
+### Function Constructor extensions
+
+Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
+
+#### constant(x) _(es5-ext/function/constant)_
+
+Returns a constant function that returns pregiven argument
+
+_k(x)(y) =def x_
+
+#### identity(x) _(es5-ext/function/identity)_
+
+Identity function. Returns first argument
+
+_i(x) =def x_
+
+#### invoke(name[, …args]) _(es5-ext/function/invoke)_
+
+Returns a function that takes an object as an argument, and applies object's
+_name_ method to arguments.
+_name_ can be name of the method or method itself.
+
+_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_
+
+#### isArguments(x) _(es5-ext/function/is-arguments)_
+
+Whether value is arguments object
+
+#### isFunction(arg) _(es5-ext/function/is-function)_
+
+Wether value is instance of function
+
+#### noop() _(es5-ext/function/noop)_
+
+No operation function
+
+#### pluck(name) _(es5-ext/function/pluck)_
+
+Returns a function that takes an object, and returns the value of its _name_
+property
+
+_pluck(name)(obj) =def obj[name]_
+
+#### validFunction(arg) _(es5-ext/function/valid-function)_
+
+If given object is not function throw TypeError in other case return it.
+
+### Function Prototype extensions
+
+Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
+
+#### fn.compose([…fns]) _(es5-ext/function/#/compose)_
+
+Applies the functions in reverse argument-list order.
+
+_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_
+
+#### fn.copy() _(es5-ext/function/#/copy)_
+
+Produces copy of given function
+
+#### fn.curry([n]) _(es5-ext/function/#/curry)_
+
+Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function.
+If _n_ is not provided then it defaults to context function length
+
+_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_
+
+#### fn.lock([…args]) _(es5-ext/function/#/lock)_
+
+Returns a function that applies the underlying function to _args_, and ignores its own arguments.
+
+_f.lock(…args)(…args2) =def f(…args)_
+
+_Named after it's counterpart in Google Closure_
+
+#### fn.not() _(es5-ext/function/#/not)_
+
+Returns a function that returns boolean negation of value returned by underlying function.
+
+_f.not()(…args) =def !f(…args)_
+
+#### fn.partial([…args]) _(es5-ext/function/#/partial)_
+
+Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.
+
+_f.partial(…args1)(…args2) =def f(…args1, …args2)_
+
+#### fn.spread() _(es5-ext/function/#/spread)_
+
+Returns a function that applies underlying function with first list argument
+
+_f.match()(args) =def f.apply(null, args)_
+
+#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_
+
+Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.
+
+### Math extensions
+
+#### acosh(x) _(es5-ext/math/acosh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).
+
+#### asinh(x) _(es5-ext/math/asinh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).
+
+#### atanh(x) _(es5-ext/math/atanh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).
+
+#### cbrt(x) _(es5-ext/math/cbrt)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).
+
+#### clz32(x) _(es5-ext/math/clz32)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).
+
+#### cosh(x) _(es5-ext/math/cosh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).
+
+#### expm1(x) _(es5-ext/math/expm1)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).
+
+#### fround(x) _(es5-ext/math/fround)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).
+
+#### hypot([…values]) _(es5-ext/math/hypot)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).
+
+#### imul(x, y) _(es5-ext/math/imul)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).
+
+#### log1p(x) _(es5-ext/math/log1p)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).
+
+#### log2(x) _(es5-ext/math/log2)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).
+
+#### log10(x) _(es5-ext/math/log10)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).
+
+#### sign(x) _(es5-ext/math/sign)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).
+
+#### sinh(x) _(es5-ext/math/sinh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).
+
+#### tanh(x) _(es5-ext/math/tanh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).
+
+#### trunc(x) _(es5-ext/math/trunc)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).
+
+### Number Constructor extensions
+
+#### EPSILON _(es5-ext/number/epsilon)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).
+
+The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.
+
+#### isFinite(x) _(es5-ext/number/is-finite)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite).
+Whether value is finite. Differs from global isNaN that it doesn't do type coercion.
+
+#### isInteger(x) _(es5-ext/number/is-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger).
+Whether value is integer.
+
+#### isNaN(x) _(es5-ext/number/is-nan)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan).
+Whether value is NaN. Differs from global isNaN that it doesn't do type coercion.
+
+#### isNumber(x) _(es5-ext/number/is-number)_
+
+Whether given value is number
+
+#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).
+
+#### MAX_SAFE_INTEGER _(es5-ext/number/max-safe-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger).
+The value of Number.MAX_SAFE_INTEGER is 9007199254740991.
+
+#### MIN_SAFE_INTEGER _(es5-ext/number/min-safe-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger).
+The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).
+
+#### toInteger(x) _(es5-ext/number/to-integer)_
+
+Converts value to integer
+
+#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_
+
+Converts value to positive integer. If provided value is less than 0, then 0 is returned
+
+#### toUint32(x) _(es5-ext/number/to-uint32)_
+
+Converts value to unsigned 32 bit integer. This type is used for array lengths.
+See: http://www.2ality.com/2012/02/js-integers.html
+
+### Number Prototype extensions
+
+#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_
+
+Pad given number with zeros. Returns string
+
+### Object Constructor extensions
+
+#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.
+
+#### clear(obj) _(es5-ext/object/clear)_
+
+Remove all enumerable own properties of the object
+
+#### compact(obj) _(es5-ext/object/compact)_
+
+Returns copy of the object with all enumerable properties that have no falsy values
+
+#### compare(obj1, obj2) _(es5-ext/object/compare)_
+
+Universal cross-type compare function. To be used for e.g. array sort.
+
+#### copy(obj) _(es5-ext/object/copy)_
+
+Returns copy of the object with all enumerable properties.
+
+#### copyDeep(obj) _(es5-ext/object/copy-deep)_
+
+Returns deep copy of the object with all enumerable properties.
+
+#### count(obj) _(es5-ext/object/count)_
+
+Counts number of enumerable own properties on object
+
+#### create(obj[, properties]) _(es5-ext/object/create)_
+
+`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).
+
+When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.
+
+It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.
+
+Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.
+
+#### eq(x, y) _(es5-ext/object/eq)_
+
+Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
+
+#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_
+
+Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function.
+Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_
+
+Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.
+
+#### firstKey(obj) _(es5-ext/object/first-key)_
+
+Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.
+
+#### flatten(obj) _(es5-ext/object/flatten)_
+
+Returns new object, with flatten properties of input object
+
+_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_
+
+#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_
+
+Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object
+Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### getPropertyNames() _(es5-ext/object/get-property-names)_
+
+Get all (not just own) property names of the object
+
+#### is(x, y) _(es5-ext/object/is)_
+
+Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
+
+#### isArrayLike(x) _(es5-ext/object/is-array-like)_
+
+Whether object is array-like object
+
+#### isCopy(x, y) _(es5-ext/object/is-copy)_
+
+Two values are considered a copy of same value when all of their own enumerable properties have same values.
+
+#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_
+
+Deep comparision of objects
+
+#### isEmpty(obj) _(es5-ext/object/is-empty)_
+
+True if object doesn't have any own enumerable property
+
+#### isObject(arg) _(es5-ext/object/is-object)_
+
+Whether value is not primitive
+
+#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_
+
+Whether object is plain object, its protototype should be Object.prototype and it cannot be host object.
+
+#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_
+
+Search object for value
+
+#### keys(obj) _(es5-ext/object/keys)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys).
+ES6's version of `keys`, doesn't throw on primitive input
+
+#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_
+
+Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.
+
+#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_
+
+Create new object with same values, but remapped keys
+
+#### mixin(target, source) _(es5-ext/object/mixin)_
+
+Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).
+_It was for a moment part of ECMAScript 6 draft._
+
+#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_
+
+Extends _target_, with all source and source's prototype properties.
+Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).
+
+#### normalizeOptions(options) _(es5-ext/object/normalize-options)_
+
+Normalizes options object into flat plain object.
+
+Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use.
+
+- It never returns input `options` object back (always a copy is created)
+- `options` can be undefined in such case empty plain object is returned.
+- Copies all enumerable properties found down prototype chain.
+
+#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_
+
+Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true.
+
+#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_
+
+Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator
+
+#### serialize(value) _(es5-ext/object/serialize)_
+
+Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.
+
+#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof).
+If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.
+
+#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_
+
+Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided
+testing function.
+Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_
+
+Creates an array of results of calling a provided function on every key-value pair in this object.
+Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### unserialize(str) _(es5-ext/object/unserialize)_
+
+Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)
+
+#### validCallable(x) _(es5-ext/object/valid-callable)_
+
+If given object is not callable throw TypeError in other case return it.
+
+#### validObject(x) _(es5-ext/object/valid-object)_
+
+Throws error if given value is not an object, otherwise it is returned.
+
+#### validValue(x) _(es5-ext/object/valid-value)_
+
+Throws error if given value is `null` or `undefined`, otherwise returns value.
+
+### RegExp Constructor extensions
+
+#### escape(str) _(es5-ext/reg-exp/escape)_
+
+Escapes string to be used in regular expression
+
+#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_
+
+Whether object is regular expression
+
+#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_
+
+If object is regular expression it is returned, otherwise TypeError is thrown.
+
+### RegExp Prototype extensions
+
+#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_
+
+Whether regular expression has `sticky` flag.
+
+It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.
+
+#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_
+
+Whether regular expression has `unicode` flag.
+
+It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.
+
+#### re.match(string) _(es5-ext/reg-exp/#/match)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).
+
+#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).
+
+#### re.search(string) _(es5-ext/reg-exp/#/search)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).
+
+#### re.split(string) _(es5-ext/reg-exp/#/search)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).
+
+#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky).
+It's a getter, so only `implement` and `is-implemented` modules are provided.
+
+#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode).
+It's a getter, so only `implement` and `is-implemented` modules are provided.
+
+### String Constructor extensions
+
+#### formatMethod(fMap) _(es5-ext/string/format-method)_
+
+Creates format method. It's used e.g. to create `Date.prototype.format` method
+
+#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)
+
+#### isString(x) _(es5-ext/string/is-string)_
+
+Whether object is string
+
+#### randomUniq() _(es5-ext/string/random-uniq)_
+
+Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)
+
+#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)
+
+### String Prototype extensions
+
+#### str.at(pos) _(es5-ext/string/#/at)_
+
+_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_
+
+Returns a string at given position in Unicode-safe manner.
+Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).
+
+#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_
+
+Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.
+Useful when converting names from js property convention into filename convention.
+
+#### str.capitalize() _(es5-ext/string/#/capitalize)_
+
+Capitalize first character of a string
+
+#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_
+
+Case insensitive compare
+
+#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)
+
+Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).
+
+#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)
+
+Whether string contains given string.
+
+#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith).
+Whether strings ends with given string
+
+#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_
+
+Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.
+Useful when converting names from filename convention to js property name convention.
+
+#### str.indent(str[, count]) _(es5-ext/string/#/indent)_
+
+Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).
+
+#### str.last() _(es5-ext/string/#/last)_
+
+Return last character
+
+#### str.normalize([form]) _(es5-ext/string/#/normalize)_
+
+[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize).
+Returns the Unicode Normalization Form of a given string.
+Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)
+
+#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_
+
+Pad string with _fill_.
+If _length_ si given than _fill_ is reapated _length_ times.
+If _length_ is negative then pad is applied from right.
+
+#### str.repeat(n) _(es5-ext/string/#/repeat)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat).
+Repeat given string _n_ times
+
+#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_
+
+Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
+
+#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_
+
+Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
+
+#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith).
+Whether strings starts with given string
+
+#### str[@@iterator] _(es5-ext/string/#/@@iterator)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator).
+Returns iterator object which traverses all string characters (with respect to unicode symbols)
+
+### Tests [](https://travis-ci.org/medikoo/es5-ext)
+
+ $ npm test
diff --git a/source/node_modules/es5-ext/array/#/@@iterator/implement.js b/source/node_modules/es5-ext/array/#/@@iterator/implement.js
new file mode 100644
index 000000000..0f714a1d2
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/@@iterator/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, require('es6-symbol').iterator, { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/@@iterator/index.js b/source/node_modules/es5-ext/array/#/@@iterator/index.js
new file mode 100644
index 000000000..a69462650
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/@@iterator/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Array.prototype[require('es6-symbol').iterator] : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/source/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
new file mode 100644
index 000000000..72eb1f8a2
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function () {
+ var arr = ['foo', 1], iterator, result;
+ if (typeof arr[iteratorSymbol] !== 'function') return false;
+ iterator = arr[iteratorSymbol]();
+ if (!iterator) return false;
+ if (typeof iterator.next !== 'function') return false;
+ result = iterator.next();
+ if (!result) return false;
+ if (result.value !== 'foo') return false;
+ if (result.done !== false) return false;
+ return true;
+};
diff --git a/source/node_modules/es5-ext/array/#/@@iterator/shim.js b/source/node_modules/es5-ext/array/#/@@iterator/shim.js
new file mode 100644
index 000000000..ff295df99
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/@@iterator/shim.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('../values/shim');
diff --git a/source/node_modules/es5-ext/array/#/_compare-by-length.js b/source/node_modules/es5-ext/array/#/_compare-by-length.js
new file mode 100644
index 000000000..d8343ce30
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/_compare-by-length.js
@@ -0,0 +1,9 @@
+// Used internally to sort array of lists by length
+
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer');
+
+module.exports = function (a, b) {
+ return toPosInt(a.length) - toPosInt(b.length);
+};
diff --git a/source/node_modules/es5-ext/array/#/binary-search.js b/source/node_modules/es5-ext/array/#/binary-search.js
new file mode 100644
index 000000000..8eb456751
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/binary-search.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , callable = require('../../object/valid-callable')
+ , value = require('../../object/valid-value')
+
+ , floor = Math.floor;
+
+module.exports = function (compareFn) {
+ var length, low, high, middle;
+
+ value(this);
+ callable(compareFn);
+
+ length = toPosInt(this.length);
+ low = 0;
+ high = length - 1;
+
+ while (low <= high) {
+ middle = floor((low + high) / 2);
+ if (compareFn(this[middle]) < 0) high = middle - 1;
+ else low = middle + 1;
+ }
+
+ if (high < 0) return 0;
+ if (high >= length) return length - 1;
+ return high;
+};
diff --git a/source/node_modules/es5-ext/array/#/clear.js b/source/node_modules/es5-ext/array/#/clear.js
new file mode 100644
index 000000000..3587bdf97
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/clear.js
@@ -0,0 +1,12 @@
+// Inspired by Google Closure:
+// http://closure-library.googlecode.com/svn/docs/
+// closure_goog_array_array.js.html#goog.array.clear
+
+'use strict';
+
+var value = require('../../object/valid-value');
+
+module.exports = function () {
+ value(this).length = 0;
+ return this;
+};
diff --git a/source/node_modules/es5-ext/array/#/compact.js b/source/node_modules/es5-ext/array/#/compact.js
new file mode 100644
index 000000000..d529d5a2b
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/compact.js
@@ -0,0 +1,9 @@
+// Inspired by: http://documentcloud.github.com/underscore/#compact
+
+'use strict';
+
+var filter = Array.prototype.filter;
+
+module.exports = function () {
+ return filter.call(this, function (val) { return val != null; });
+};
diff --git a/source/node_modules/es5-ext/array/#/concat/implement.js b/source/node_modules/es5-ext/array/#/concat/implement.js
new file mode 100644
index 000000000..80c67cb4f
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/concat/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'concat', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/concat/index.js b/source/node_modules/es5-ext/array/#/concat/index.js
new file mode 100644
index 000000000..db205ea54
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/concat/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.concat : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/concat/is-implemented.js b/source/node_modules/es5-ext/array/#/concat/is-implemented.js
new file mode 100644
index 000000000..cab8bc9e3
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/concat/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var SubArray = require('../../_sub-array-dummy-safe');
+
+module.exports = function () {
+ return (new SubArray()).concat('foo') instanceof SubArray;
+};
diff --git a/source/node_modules/es5-ext/array/#/concat/shim.js b/source/node_modules/es5-ext/array/#/concat/shim.js
new file mode 100644
index 000000000..8b28e4ae0
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/concat/shim.js
@@ -0,0 +1,39 @@
+'use strict';
+
+var isPlainArray = require('../../is-plain-array')
+ , toPosInt = require('../../../number/to-pos-integer')
+ , isObject = require('../../../object/is-object')
+
+ , isArray = Array.isArray, concat = Array.prototype.concat
+ , forEach = Array.prototype.forEach
+
+ , isSpreadable;
+
+isSpreadable = function (value) {
+ if (!value) return false;
+ if (!isObject(value)) return false;
+ if (value['@@isConcatSpreadable'] !== undefined) {
+ return Boolean(value['@@isConcatSpreadable']);
+ }
+ return isArray(value);
+};
+
+module.exports = function (item/*, …items*/) {
+ var result;
+ if (!this || !isArray(this) || isPlainArray(this)) {
+ return concat.apply(this, arguments);
+ }
+ result = new this.constructor(this.length);
+ forEach.call(this, function (val, i) { result[i] = val; });
+ forEach.call(arguments, function (arg) {
+ var base;
+ if (isSpreadable(arg)) {
+ base = result.length;
+ result.length += toPosInt(arg.length);
+ forEach.call(arg, function (val, i) { result[base + i] = val; });
+ return;
+ }
+ result.push(arg);
+ });
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/contains.js b/source/node_modules/es5-ext/array/#/contains.js
new file mode 100644
index 000000000..4a2f9f673
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/contains.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var indexOf = require('./e-index-of');
+
+module.exports = function (searchElement/*, position*/) {
+ return indexOf.call(this, searchElement, arguments[1]) > -1;
+};
diff --git a/source/node_modules/es5-ext/array/#/copy-within/implement.js b/source/node_modules/es5-ext/array/#/copy-within/implement.js
new file mode 100644
index 000000000..eedbad77e
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/copy-within/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'copyWithin',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/copy-within/index.js b/source/node_modules/es5-ext/array/#/copy-within/index.js
new file mode 100644
index 000000000..bb89d0b87
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/copy-within/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.copyWithin : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/source/node_modules/es5-ext/array/#/copy-within/is-implemented.js
new file mode 100644
index 000000000..8f17e06d8
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/copy-within/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var arr = [1, 2, 3, 4, 5];
+ if (typeof arr.copyWithin !== 'function') return false;
+ return String(arr.copyWithin(1, 3)) === '1,4,5,4,5';
+};
diff --git a/source/node_modules/es5-ext/array/#/copy-within/shim.js b/source/node_modules/es5-ext/array/#/copy-within/shim.js
new file mode 100644
index 000000000..c0bfb8b06
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/copy-within/shim.js
@@ -0,0 +1,39 @@
+// Taken from: https://github.com/paulmillr/es6-shim/
+
+'use strict';
+
+var toInteger = require('../../../number/to-integer')
+ , toPosInt = require('../../../number/to-pos-integer')
+ , validValue = require('../../../object/valid-value')
+
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , max = Math.max, min = Math.min;
+
+module.exports = function (target, start/*, end*/) {
+ var o = validValue(this), end = arguments[2], l = toPosInt(o.length)
+ , to, from, fin, count, direction;
+
+ target = toInteger(target);
+ start = toInteger(start);
+ end = (end === undefined) ? l : toInteger(end);
+
+ to = target < 0 ? max(l + target, 0) : min(target, l);
+ from = start < 0 ? max(l + start, 0) : min(start, l);
+ fin = end < 0 ? max(l + end, 0) : min(end, l);
+ count = min(fin - from, l - to);
+ direction = 1;
+
+ if ((from < to) && (to < (from + count))) {
+ direction = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+ while (count > 0) {
+ if (hasOwnProperty.call(o, from)) o[to] = o[from];
+ else delete o[from];
+ from += direction;
+ to += direction;
+ count -= 1;
+ }
+ return o;
+};
diff --git a/source/node_modules/es5-ext/array/#/diff.js b/source/node_modules/es5-ext/array/#/diff.js
new file mode 100644
index 000000000..a1f95419d
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/diff.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var value = require('../../object/valid-value')
+ , contains = require('./contains')
+
+ , filter = Array.prototype.filter;
+
+module.exports = function (other) {
+ (value(this) && value(other));
+ return filter.call(this, function (item) {
+ return !contains.call(other, item);
+ });
+};
diff --git a/source/node_modules/es5-ext/array/#/e-index-of.js b/source/node_modules/es5-ext/array/#/e-index-of.js
new file mode 100644
index 000000000..80864d066
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/e-index-of.js
@@ -0,0 +1,29 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , value = require('../../object/valid-value')
+
+ , indexOf = Array.prototype.indexOf
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , abs = Math.abs, floor = Math.floor;
+
+module.exports = function (searchElement/*, fromIndex*/) {
+ var i, l, fromIndex, val;
+ if (searchElement === searchElement) { //jslint: ignore
+ return indexOf.apply(this, arguments);
+ }
+
+ l = toPosInt(value(this).length);
+ fromIndex = arguments[1];
+ if (isNaN(fromIndex)) fromIndex = 0;
+ else if (fromIndex >= 0) fromIndex = floor(fromIndex);
+ else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
+
+ for (i = fromIndex; i < l; ++i) {
+ if (hasOwnProperty.call(this, i)) {
+ val = this[i];
+ if (val !== val) return i; //jslint: ignore
+ }
+ }
+ return -1;
+};
diff --git a/source/node_modules/es5-ext/array/#/e-last-index-of.js b/source/node_modules/es5-ext/array/#/e-last-index-of.js
new file mode 100644
index 000000000..4fc536bd6
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/e-last-index-of.js
@@ -0,0 +1,29 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , value = require('../../object/valid-value')
+
+ , lastIndexOf = Array.prototype.lastIndexOf
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , abs = Math.abs, floor = Math.floor;
+
+module.exports = function (searchElement/*, fromIndex*/) {
+ var i, fromIndex, val;
+ if (searchElement === searchElement) { //jslint: ignore
+ return lastIndexOf.apply(this, arguments);
+ }
+
+ value(this);
+ fromIndex = arguments[1];
+ if (isNaN(fromIndex)) fromIndex = (toPosInt(this.length) - 1);
+ else if (fromIndex >= 0) fromIndex = floor(fromIndex);
+ else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
+
+ for (i = fromIndex; i >= 0; --i) {
+ if (hasOwnProperty.call(this, i)) {
+ val = this[i];
+ if (val !== val) return i; //jslint: ignore
+ }
+ }
+ return -1;
+};
diff --git a/source/node_modules/es5-ext/array/#/entries/implement.js b/source/node_modules/es5-ext/array/#/entries/implement.js
new file mode 100644
index 000000000..490de60e2
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/entries/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'entries', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/entries/index.js b/source/node_modules/es5-ext/array/#/entries/index.js
new file mode 100644
index 000000000..292792cf1
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/entries/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.entries : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/entries/is-implemented.js b/source/node_modules/es5-ext/array/#/entries/is-implemented.js
new file mode 100644
index 000000000..e186c1723
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/entries/is-implemented.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function () {
+ var arr = [1, 'foo'], iterator, result;
+ if (typeof arr.entries !== 'function') return false;
+ iterator = arr.entries();
+ if (!iterator) return false;
+ if (typeof iterator.next !== 'function') return false;
+ result = iterator.next();
+ if (!result || !result.value) return false;
+ if (result.value[0] !== 0) return false;
+ if (result.value[1] !== 1) return false;
+ if (result.done !== false) return false;
+ return true;
+};
diff --git a/source/node_modules/es5-ext/array/#/entries/shim.js b/source/node_modules/es5-ext/array/#/entries/shim.js
new file mode 100644
index 000000000..c052b53f0
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/entries/shim.js
@@ -0,0 +1,4 @@
+'use strict';
+
+var ArrayIterator = require('es6-iterator/array');
+module.exports = function () { return new ArrayIterator(this, 'key+value'); };
diff --git a/source/node_modules/es5-ext/array/#/exclusion.js b/source/node_modules/es5-ext/array/#/exclusion.js
new file mode 100644
index 000000000..f08adc81c
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/exclusion.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var value = require('../../object/valid-value')
+ , aFrom = require('../from')
+ , toArray = require('../to-array')
+ , contains = require('./contains')
+ , byLength = require('./_compare-by-length')
+
+ , filter = Array.prototype.filter, push = Array.prototype.push;
+
+module.exports = function (/*…lists*/) {
+ var lists, seen, result;
+ if (!arguments.length) return aFrom(this);
+ push.apply(lists = [this], arguments);
+ lists.forEach(value);
+ seen = [];
+ result = [];
+ lists.sort(byLength).forEach(function (list) {
+ result = result.filter(function (item) {
+ return !contains.call(list, item);
+ }).concat(filter.call(list, function (x) {
+ return !contains.call(seen, x);
+ }));
+ push.apply(seen, toArray(list));
+ });
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/fill/implement.js b/source/node_modules/es5-ext/array/#/fill/implement.js
new file mode 100644
index 000000000..22511919c
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/fill/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'fill', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/fill/index.js b/source/node_modules/es5-ext/array/#/fill/index.js
new file mode 100644
index 000000000..36c1f6666
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/fill/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.fill : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/fill/is-implemented.js b/source/node_modules/es5-ext/array/#/fill/is-implemented.js
new file mode 100644
index 000000000..b8e546888
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/fill/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var arr = [1, 2, 3, 4, 5, 6];
+ if (typeof arr.fill !== 'function') return false;
+ return String(arr.fill(-1, -3)) === '1,2,3,-1,-1,-1';
+};
diff --git a/source/node_modules/es5-ext/array/#/fill/shim.js b/source/node_modules/es5-ext/array/#/fill/shim.js
new file mode 100644
index 000000000..45823be51
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/fill/shim.js
@@ -0,0 +1,21 @@
+// Taken from: https://github.com/paulmillr/es6-shim/
+
+'use strict';
+
+var toInteger = require('../../../number/to-integer')
+ , toPosInt = require('../../../number/to-pos-integer')
+ , validValue = require('../../../object/valid-value')
+
+ , max = Math.max, min = Math.min;
+
+module.exports = function (value/*, start, end*/) {
+ var o = validValue(this), start = arguments[1], end = arguments[2]
+ , l = toPosInt(o.length), relativeStart, i;
+
+ start = (start === undefined) ? 0 : toInteger(start);
+ end = (end === undefined) ? l : toInteger(end);
+
+ relativeStart = start < 0 ? max(l + start, 0) : min(start, l);
+ for (i = relativeStart; i < l && i < end; ++i) o[i] = value;
+ return o;
+};
diff --git a/source/node_modules/es5-ext/array/#/filter/implement.js b/source/node_modules/es5-ext/array/#/filter/implement.js
new file mode 100644
index 000000000..090c5f109
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/filter/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'filter', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/filter/index.js b/source/node_modules/es5-ext/array/#/filter/index.js
new file mode 100644
index 000000000..bcf0268dc
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/filter/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.filter : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/filter/is-implemented.js b/source/node_modules/es5-ext/array/#/filter/is-implemented.js
new file mode 100644
index 000000000..557727350
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/filter/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var SubArray = require('../../_sub-array-dummy-safe')
+
+ , pass = function () { return true; };
+
+module.exports = function () {
+ return (new SubArray()).filter(pass) instanceof SubArray;
+};
diff --git a/source/node_modules/es5-ext/array/#/filter/shim.js b/source/node_modules/es5-ext/array/#/filter/shim.js
new file mode 100644
index 000000000..b0116defc
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/filter/shim.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var isPlainArray = require('../../is-plain-array')
+ , callable = require('../../../object/valid-callable')
+
+ , isArray = Array.isArray, filter = Array.prototype.filter
+ , forEach = Array.prototype.forEach, call = Function.prototype.call;
+
+module.exports = function (callbackFn/*, thisArg*/) {
+ var result, thisArg, i;
+ if (!this || !isArray(this) || isPlainArray(this)) {
+ return filter.apply(this, arguments);
+ }
+ callable(callbackFn);
+ thisArg = arguments[1];
+ result = new this.constructor();
+ i = 0;
+ forEach.call(this, function (val, j, self) {
+ if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val;
+ });
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/find-index/implement.js b/source/node_modules/es5-ext/array/#/find-index/implement.js
new file mode 100644
index 000000000..556cb8460
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find-index/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'findIndex',
+ { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/find-index/index.js b/source/node_modules/es5-ext/array/#/find-index/index.js
new file mode 100644
index 000000000..03a987e22
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find-index/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.findIndex : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/find-index/is-implemented.js b/source/node_modules/es5-ext/array/#/find-index/is-implemented.js
new file mode 100644
index 000000000..dbd3c814b
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find-index/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var fn = function (x) { return x > 3; };
+
+module.exports = function () {
+ var arr = [1, 2, 3, 4, 5, 6];
+ if (typeof arr.findIndex !== 'function') return false;
+ return arr.findIndex(fn) === 3;
+};
diff --git a/source/node_modules/es5-ext/array/#/find-index/shim.js b/source/node_modules/es5-ext/array/#/find-index/shim.js
new file mode 100644
index 000000000..957939f2b
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find-index/shim.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var callable = require('../../../object/valid-callable')
+ , value = require('../../../object/valid-value')
+
+ , some = Array.prototype.some, apply = Function.prototype.apply;
+
+module.exports = function (predicate/*, thisArg*/) {
+ var k, self;
+ self = Object(value(this));
+ callable(predicate);
+
+ return some.call(self, function (value, index) {
+ if (apply.call(predicate, this, arguments)) {
+ k = index;
+ return true;
+ }
+ return false;
+ }, arguments[1]) ? k : -1;
+};
diff --git a/source/node_modules/es5-ext/array/#/find/implement.js b/source/node_modules/es5-ext/array/#/find/implement.js
new file mode 100644
index 000000000..0f37104ac
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'find', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/find/index.js b/source/node_modules/es5-ext/array/#/find/index.js
new file mode 100644
index 000000000..96819d09f
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.find : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/find/is-implemented.js b/source/node_modules/es5-ext/array/#/find/is-implemented.js
new file mode 100644
index 000000000..cc7ec774d
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var fn = function (x) { return x > 3; };
+
+module.exports = function () {
+ var arr = [1, 2, 3, 4, 5, 6];
+ if (typeof arr.find !== 'function') return false;
+ return arr.find(fn) === 4;
+};
diff --git a/source/node_modules/es5-ext/array/#/find/shim.js b/source/node_modules/es5-ext/array/#/find/shim.js
new file mode 100644
index 000000000..c7ee9069a
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/find/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var findIndex = require('../find-index/shim');
+
+module.exports = function (predicate/*, thisArg*/) {
+ var index = findIndex.apply(this, arguments);
+ return (index === -1) ? undefined : this[index];
+};
diff --git a/source/node_modules/es5-ext/array/#/first-index.js b/source/node_modules/es5-ext/array/#/first-index.js
new file mode 100644
index 000000000..7a9e4c347
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/first-index.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , value = require('../../object/valid-value')
+
+ , hasOwnProperty = Object.prototype.hasOwnProperty;
+
+module.exports = function () {
+ var i, l;
+ if (!(l = toPosInt(value(this).length))) return null;
+ i = 0;
+ while (!hasOwnProperty.call(this, i)) {
+ if (++i === l) return null;
+ }
+ return i;
+};
diff --git a/source/node_modules/es5-ext/array/#/first.js b/source/node_modules/es5-ext/array/#/first.js
new file mode 100644
index 000000000..11df57175
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/first.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var firstIndex = require('./first-index');
+
+module.exports = function () {
+ var i;
+ if ((i = firstIndex.call(this)) !== null) return this[i];
+ return undefined;
+};
diff --git a/source/node_modules/es5-ext/array/#/flatten.js b/source/node_modules/es5-ext/array/#/flatten.js
new file mode 100644
index 000000000..c95407d31
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/flatten.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var isArray = Array.isArray, forEach = Array.prototype.forEach
+ , push = Array.prototype.push;
+
+module.exports = function flatten() {
+ var r = [];
+ forEach.call(this, function (x) {
+ push.apply(r, isArray(x) ? flatten.call(x) : [x]);
+ });
+ return r;
+};
diff --git a/source/node_modules/es5-ext/array/#/for-each-right.js b/source/node_modules/es5-ext/array/#/for-each-right.js
new file mode 100644
index 000000000..1702bb164
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/for-each-right.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , callable = require('../../object/valid-callable')
+ , value = require('../../object/valid-value')
+
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , call = Function.prototype.call;
+
+module.exports = function (cb/*, thisArg*/) {
+ var i, self, thisArg;
+
+ self = Object(value(this));
+ callable(cb);
+ thisArg = arguments[1];
+
+ for (i = (toPosInt(self.length) - 1); i >= 0; --i) {
+ if (hasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self);
+ }
+};
diff --git a/source/node_modules/es5-ext/array/#/group.js b/source/node_modules/es5-ext/array/#/group.js
new file mode 100644
index 000000000..fbb178c35
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/group.js
@@ -0,0 +1,23 @@
+// Inspired by Underscore's groupBy:
+// http://documentcloud.github.com/underscore/#groupBy
+
+'use strict';
+
+var callable = require('../../object/valid-callable')
+ , value = require('../../object/valid-value')
+
+ , forEach = Array.prototype.forEach, apply = Function.prototype.apply;
+
+module.exports = function (cb/*, thisArg*/) {
+ var r;
+
+ (value(this) && callable(cb));
+
+ r = {};
+ forEach.call(this, function (v) {
+ var key = apply.call(cb, this, arguments);
+ if (!r.hasOwnProperty(key)) r[key] = [];
+ r[key].push(v);
+ }, arguments[1]);
+ return r;
+};
diff --git a/source/node_modules/es5-ext/array/#/index.js b/source/node_modules/es5-ext/array/#/index.js
new file mode 100644
index 000000000..97ef65cfd
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/index.js
@@ -0,0 +1,40 @@
+'use strict';
+
+module.exports = {
+ '@@iterator': require('./@@iterator'),
+ binarySearch: require('./binary-search'),
+ clear: require('./clear'),
+ compact: require('./compact'),
+ concat: require('./concat'),
+ contains: require('./contains'),
+ copyWithin: require('./copy-within'),
+ diff: require('./diff'),
+ eIndexOf: require('./e-index-of'),
+ eLastIndexOf: require('./e-last-index-of'),
+ entries: require('./entries'),
+ exclusion: require('./exclusion'),
+ fill: require('./fill'),
+ filter: require('./filter'),
+ find: require('./find'),
+ findIndex: require('./find-index'),
+ first: require('./first'),
+ firstIndex: require('./first-index'),
+ flatten: require('./flatten'),
+ forEachRight: require('./for-each-right'),
+ keys: require('./keys'),
+ group: require('./group'),
+ indexesOf: require('./indexes-of'),
+ intersection: require('./intersection'),
+ isCopy: require('./is-copy'),
+ isUniq: require('./is-uniq'),
+ last: require('./last'),
+ lastIndex: require('./last-index'),
+ map: require('./map'),
+ remove: require('./remove'),
+ separate: require('./separate'),
+ slice: require('./slice'),
+ someRight: require('./some-right'),
+ splice: require('./splice'),
+ uniq: require('./uniq'),
+ values: require('./values')
+};
diff --git a/source/node_modules/es5-ext/array/#/indexes-of.js b/source/node_modules/es5-ext/array/#/indexes-of.js
new file mode 100644
index 000000000..6b89157a3
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/indexes-of.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var indexOf = require('./e-index-of');
+
+module.exports = function (value/*, fromIndex*/) {
+ var r = [], i, fromIndex = arguments[1];
+ while ((i = indexOf.call(this, value, fromIndex)) !== -1) {
+ r.push(i);
+ fromIndex = i + 1;
+ }
+ return r;
+};
diff --git a/source/node_modules/es5-ext/array/#/intersection.js b/source/node_modules/es5-ext/array/#/intersection.js
new file mode 100644
index 000000000..fadcb5253
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/intersection.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var value = require('../../object/valid-value')
+ , contains = require('./contains')
+ , byLength = require('./_compare-by-length')
+
+ , filter = Array.prototype.filter, push = Array.prototype.push
+ , slice = Array.prototype.slice;
+
+module.exports = function (/*…list*/) {
+ var lists;
+ if (!arguments.length) slice.call(this);
+ push.apply(lists = [this], arguments);
+ lists.forEach(value);
+ lists.sort(byLength);
+ return lists.reduce(function (a, b) {
+ return filter.call(a, function (x) { return contains.call(b, x); });
+ });
+};
diff --git a/source/node_modules/es5-ext/array/#/is-copy.js b/source/node_modules/es5-ext/array/#/is-copy.js
new file mode 100644
index 000000000..ac7c79bc4
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/is-copy.js
@@ -0,0 +1,21 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , eq = require('../../object/eq')
+ , value = require('../../object/valid-value')
+
+ , hasOwnProperty = Object.prototype.hasOwnProperty;
+
+module.exports = function (other) {
+ var i, l;
+ (value(this) && value(other));
+ l = toPosInt(this.length);
+ if (l !== toPosInt(other.length)) return false;
+ for (i = 0; i < l; ++i) {
+ if (hasOwnProperty.call(this, i) !== hasOwnProperty.call(other, i)) {
+ return false;
+ }
+ if (!eq(this[i], other[i])) return false;
+ }
+ return true;
+};
diff --git a/source/node_modules/es5-ext/array/#/is-uniq.js b/source/node_modules/es5-ext/array/#/is-uniq.js
new file mode 100644
index 000000000..b14f461d9
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/is-uniq.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var indexOf = require('./e-index-of')
+
+ , every = Array.prototype.every
+ , isFirst;
+
+isFirst = function (value, index) {
+ return indexOf.call(this, value) === index;
+};
+
+module.exports = function () { return every.call(this, isFirst, this); };
diff --git a/source/node_modules/es5-ext/array/#/keys/implement.js b/source/node_modules/es5-ext/array/#/keys/implement.js
new file mode 100644
index 000000000..e18e61701
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/keys/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'keys', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/keys/index.js b/source/node_modules/es5-ext/array/#/keys/index.js
new file mode 100644
index 000000000..2f89cffe1
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/keys/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.keys : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/keys/is-implemented.js b/source/node_modules/es5-ext/array/#/keys/is-implemented.js
new file mode 100644
index 000000000..06bd87bf2
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/keys/is-implemented.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function () {
+ var arr = [1, 'foo'], iterator, result;
+ if (typeof arr.keys !== 'function') return false;
+ iterator = arr.keys();
+ if (!iterator) return false;
+ if (typeof iterator.next !== 'function') return false;
+ result = iterator.next();
+ if (!result) return false;
+ if (result.value !== 0) return false;
+ if (result.done !== false) return false;
+ return true;
+};
diff --git a/source/node_modules/es5-ext/array/#/keys/shim.js b/source/node_modules/es5-ext/array/#/keys/shim.js
new file mode 100644
index 000000000..83773f6ec
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/keys/shim.js
@@ -0,0 +1,4 @@
+'use strict';
+
+var ArrayIterator = require('es6-iterator/array');
+module.exports = function () { return new ArrayIterator(this, 'key'); };
diff --git a/source/node_modules/es5-ext/array/#/last-index.js b/source/node_modules/es5-ext/array/#/last-index.js
new file mode 100644
index 000000000..a191d6e15
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/last-index.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , value = require('../../object/valid-value')
+
+ , hasOwnProperty = Object.prototype.hasOwnProperty;
+
+module.exports = function () {
+ var i, l;
+ if (!(l = toPosInt(value(this).length))) return null;
+ i = l - 1;
+ while (!hasOwnProperty.call(this, i)) {
+ if (--i === -1) return null;
+ }
+ return i;
+};
diff --git a/source/node_modules/es5-ext/array/#/last.js b/source/node_modules/es5-ext/array/#/last.js
new file mode 100644
index 000000000..bf9d2f292
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/last.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var lastIndex = require('./last-index');
+
+module.exports = function () {
+ var i;
+ if ((i = lastIndex.call(this)) !== null) return this[i];
+ return undefined;
+};
diff --git a/source/node_modules/es5-ext/array/#/map/implement.js b/source/node_modules/es5-ext/array/#/map/implement.js
new file mode 100644
index 000000000..3aabb8744
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/map/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'map', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/map/index.js b/source/node_modules/es5-ext/array/#/map/index.js
new file mode 100644
index 000000000..66f66607d
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/map/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ?
+ Array.prototype.map : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/map/is-implemented.js b/source/node_modules/es5-ext/array/#/map/is-implemented.js
new file mode 100644
index 000000000..c328b4733
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/map/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var identity = require('../../../function/identity')
+ , SubArray = require('../../_sub-array-dummy-safe');
+
+module.exports = function () {
+ return (new SubArray()).map(identity) instanceof SubArray;
+};
diff --git a/source/node_modules/es5-ext/array/#/map/shim.js b/source/node_modules/es5-ext/array/#/map/shim.js
new file mode 100644
index 000000000..2ee731347
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/map/shim.js
@@ -0,0 +1,21 @@
+'use strict';
+
+var isPlainArray = require('../../is-plain-array')
+ , callable = require('../../../object/valid-callable')
+
+ , isArray = Array.isArray, map = Array.prototype.map
+ , forEach = Array.prototype.forEach, call = Function.prototype.call;
+
+module.exports = function (callbackFn/*, thisArg*/) {
+ var result, thisArg;
+ if (!this || !isArray(this) || isPlainArray(this)) {
+ return map.apply(this, arguments);
+ }
+ callable(callbackFn);
+ thisArg = arguments[1];
+ result = new this.constructor(this.length);
+ forEach.call(this, function (val, i, self) {
+ result[i] = call.call(callbackFn, thisArg, val, i, self);
+ });
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/remove.js b/source/node_modules/es5-ext/array/#/remove.js
new file mode 100644
index 000000000..dcf843313
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/remove.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var indexOf = require('./e-index-of')
+
+ , forEach = Array.prototype.forEach, splice = Array.prototype.splice;
+
+module.exports = function (item/*, …item*/) {
+ forEach.call(arguments, function (item) {
+ var index = indexOf.call(this, item);
+ if (index !== -1) splice.call(this, index, 1);
+ }, this);
+};
diff --git a/source/node_modules/es5-ext/array/#/separate.js b/source/node_modules/es5-ext/array/#/separate.js
new file mode 100644
index 000000000..dc974b832
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/separate.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var forEach = Array.prototype.forEach;
+
+module.exports = function (sep) {
+ var result = [];
+ forEach.call(this, function (val, i) { result.push(val, sep); });
+ result.pop();
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/slice/implement.js b/source/node_modules/es5-ext/array/#/slice/implement.js
new file mode 100644
index 000000000..cd488a063
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/slice/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'slice', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/slice/index.js b/source/node_modules/es5-ext/array/#/slice/index.js
new file mode 100644
index 000000000..72200ca9e
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/slice/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Array.prototype.slice : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/slice/is-implemented.js b/source/node_modules/es5-ext/array/#/slice/is-implemented.js
new file mode 100644
index 000000000..ec1985e70
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/slice/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var SubArray = require('../../_sub-array-dummy-safe');
+
+module.exports = function () {
+ return (new SubArray()).slice() instanceof SubArray;
+};
diff --git a/source/node_modules/es5-ext/array/#/slice/shim.js b/source/node_modules/es5-ext/array/#/slice/shim.js
new file mode 100644
index 000000000..2761a1aad
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/slice/shim.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var toInteger = require('../../../number/to-integer')
+ , toPosInt = require('../../../number/to-pos-integer')
+ , isPlainArray = require('../../is-plain-array')
+
+ , isArray = Array.isArray, slice = Array.prototype.slice
+ , hasOwnProperty = Object.prototype.hasOwnProperty, max = Math.max;
+
+module.exports = function (start, end) {
+ var length, result, i;
+ if (!this || !isArray(this) || isPlainArray(this)) {
+ return slice.apply(this, arguments);
+ }
+ length = toPosInt(this.length);
+ start = toInteger(start);
+ if (start < 0) start = max(length + start, 0);
+ else if (start > length) start = length;
+ if (end === undefined) {
+ end = length;
+ } else {
+ end = toInteger(end);
+ if (end < 0) end = max(length + end, 0);
+ else if (end > length) end = length;
+ }
+ if (start > end) start = end;
+ result = new this.constructor(end - start);
+ i = 0;
+ while (start !== end) {
+ if (hasOwnProperty.call(this, start)) result[i] = this[start];
+ ++i;
+ ++start;
+ }
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/some-right.js b/source/node_modules/es5-ext/array/#/some-right.js
new file mode 100644
index 000000000..f54cf945c
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/some-right.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , callable = require('../../object/valid-callable')
+ , value = require('../../object/valid-value')
+
+ , hasOwnProperty = Object.prototype.hasOwnProperty
+ , call = Function.prototype.call;
+
+module.exports = function (cb/*, thisArg*/) {
+ var i, self, thisArg;
+ self = Object(value(this));
+ callable(cb);
+ thisArg = arguments[1];
+
+ for (i = (toPosInt(self.length) - 1); i >= 0; --i) {
+ if (hasOwnProperty.call(self, i) &&
+ call.call(cb, thisArg, self[i], i, self)) {
+ return true;
+ }
+ }
+ return false;
+};
diff --git a/source/node_modules/es5-ext/array/#/splice/implement.js b/source/node_modules/es5-ext/array/#/splice/implement.js
new file mode 100644
index 000000000..aab1f8eff
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/splice/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'splice', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/splice/index.js b/source/node_modules/es5-ext/array/#/splice/index.js
new file mode 100644
index 000000000..e8ecf3cf8
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/splice/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Array.prototype.splice : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/splice/is-implemented.js b/source/node_modules/es5-ext/array/#/splice/is-implemented.js
new file mode 100644
index 000000000..ffddaa81e
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/splice/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var SubArray = require('../../_sub-array-dummy-safe');
+
+module.exports = function () {
+ return (new SubArray()).splice(0) instanceof SubArray;
+};
diff --git a/source/node_modules/es5-ext/array/#/splice/shim.js b/source/node_modules/es5-ext/array/#/splice/shim.js
new file mode 100644
index 000000000..a8505a2ce
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/splice/shim.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var isPlainArray = require('../../is-plain-array')
+
+ , isArray = Array.isArray, splice = Array.prototype.splice
+ , forEach = Array.prototype.forEach;
+
+module.exports = function (start, deleteCount/*, …items*/) {
+ var arr = splice.apply(this, arguments), result;
+ if (!this || !isArray(this) || isPlainArray(this)) return arr;
+ result = new this.constructor(arr.length);
+ forEach.call(arr, function (val, i) { result[i] = val; });
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/#/uniq.js b/source/node_modules/es5-ext/array/#/uniq.js
new file mode 100644
index 000000000..db0146555
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/uniq.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var indexOf = require('./e-index-of')
+
+ , filter = Array.prototype.filter
+
+ , isFirst;
+
+isFirst = function (value, index) {
+ return indexOf.call(this, value) === index;
+};
+
+module.exports = function () { return filter.call(this, isFirst, this); };
diff --git a/source/node_modules/es5-ext/array/#/values/implement.js b/source/node_modules/es5-ext/array/#/values/implement.js
new file mode 100644
index 000000000..237281fd3
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/values/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array.prototype, 'values', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/#/values/index.js b/source/node_modules/es5-ext/array/#/values/index.js
new file mode 100644
index 000000000..c0832c30e
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/values/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ? Array.prototype.values : require('./shim');
diff --git a/source/node_modules/es5-ext/array/#/values/is-implemented.js b/source/node_modules/es5-ext/array/#/values/is-implemented.js
new file mode 100644
index 000000000..cc0c6294e
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/values/is-implemented.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function () {
+ var arr = ['foo', 1], iterator, result;
+ if (typeof arr.values !== 'function') return false;
+ iterator = arr.values();
+ if (!iterator) return false;
+ if (typeof iterator.next !== 'function') return false;
+ result = iterator.next();
+ if (!result) return false;
+ if (result.value !== 'foo') return false;
+ if (result.done !== false) return false;
+ return true;
+};
diff --git a/source/node_modules/es5-ext/array/#/values/shim.js b/source/node_modules/es5-ext/array/#/values/shim.js
new file mode 100644
index 000000000..f6555fd85
--- /dev/null
+++ b/source/node_modules/es5-ext/array/#/values/shim.js
@@ -0,0 +1,4 @@
+'use strict';
+
+var ArrayIterator = require('es6-iterator/array');
+module.exports = function () { return new ArrayIterator(this, 'value'); };
diff --git a/source/node_modules/es5-ext/array/_is-extensible.js b/source/node_modules/es5-ext/array/_is-extensible.js
new file mode 100644
index 000000000..612320647
--- /dev/null
+++ b/source/node_modules/es5-ext/array/_is-extensible.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = (function () {
+ var SubArray = require('./_sub-array-dummy'), arr;
+
+ if (!SubArray) return false;
+ arr = new SubArray();
+ if (!Array.isArray(arr)) return false;
+ if (!(arr instanceof SubArray)) return false;
+
+ arr[34] = 'foo';
+ return (arr.length === 35);
+}());
diff --git a/source/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/source/node_modules/es5-ext/array/_sub-array-dummy-safe.js
new file mode 100644
index 000000000..5baf8a8d1
--- /dev/null
+++ b/source/node_modules/es5-ext/array/_sub-array-dummy-safe.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var setPrototypeOf = require('../object/set-prototype-of')
+ , isExtensible = require('./_is-extensible');
+
+module.exports = (function () {
+ var SubArray;
+
+ if (isExtensible) return require('./_sub-array-dummy');
+
+ if (!setPrototypeOf) return null;
+ SubArray = function () {
+ var arr = Array.apply(this, arguments);
+ setPrototypeOf(arr, SubArray.prototype);
+ return arr;
+ };
+ setPrototypeOf(SubArray, Array);
+ SubArray.prototype = Object.create(Array.prototype, {
+ constructor: { value: SubArray, enumerable: false, writable: true,
+ configurable: true }
+ });
+ return SubArray;
+}());
diff --git a/source/node_modules/es5-ext/array/_sub-array-dummy.js b/source/node_modules/es5-ext/array/_sub-array-dummy.js
new file mode 100644
index 000000000..a926d1a32
--- /dev/null
+++ b/source/node_modules/es5-ext/array/_sub-array-dummy.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var setPrototypeOf = require('../object/set-prototype-of');
+
+module.exports = (function () {
+ var SubArray;
+
+ if (!setPrototypeOf) return null;
+ SubArray = function () { Array.apply(this, arguments); };
+ setPrototypeOf(SubArray, Array);
+ SubArray.prototype = Object.create(Array.prototype, {
+ constructor: { value: SubArray, enumerable: false, writable: true,
+ configurable: true }
+ });
+ return SubArray;
+}());
diff --git a/source/node_modules/es5-ext/array/from/implement.js b/source/node_modules/es5-ext/array/from/implement.js
new file mode 100644
index 000000000..f3411b137
--- /dev/null
+++ b/source/node_modules/es5-ext/array/from/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array, 'from', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/from/index.js b/source/node_modules/es5-ext/array/from/index.js
new file mode 100644
index 000000000..3b99cda8e
--- /dev/null
+++ b/source/node_modules/es5-ext/array/from/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Array.from
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/array/from/is-implemented.js b/source/node_modules/es5-ext/array/from/is-implemented.js
new file mode 100644
index 000000000..63ff2a572
--- /dev/null
+++ b/source/node_modules/es5-ext/array/from/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function () {
+ var from = Array.from, arr, result;
+ if (typeof from !== 'function') return false;
+ arr = ['raz', 'dwa'];
+ result = from(arr);
+ return Boolean(result && (result !== arr) && (result[1] === 'dwa'));
+};
diff --git a/source/node_modules/es5-ext/array/from/shim.js b/source/node_modules/es5-ext/array/from/shim.js
new file mode 100644
index 000000000..a90ba2f97
--- /dev/null
+++ b/source/node_modules/es5-ext/array/from/shim.js
@@ -0,0 +1,106 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator
+ , isArguments = require('../../function/is-arguments')
+ , isFunction = require('../../function/is-function')
+ , toPosInt = require('../../number/to-pos-integer')
+ , callable = require('../../object/valid-callable')
+ , validValue = require('../../object/valid-value')
+ , isString = require('../../string/is-string')
+
+ , isArray = Array.isArray, call = Function.prototype.call
+ , desc = { configurable: true, enumerable: true, writable: true, value: null }
+ , defineProperty = Object.defineProperty;
+
+module.exports = function (arrayLike/*, mapFn, thisArg*/) {
+ var mapFn = arguments[1], thisArg = arguments[2], Constructor, i, j, arr, l, code, iterator
+ , result, getIterator, value;
+
+ arrayLike = Object(validValue(arrayLike));
+
+ if (mapFn != null) callable(mapFn);
+ if (!this || (this === Array) || !isFunction(this)) {
+ // Result: Plain array
+ if (!mapFn) {
+ if (isArguments(arrayLike)) {
+ // Source: Arguments
+ l = arrayLike.length;
+ if (l !== 1) return Array.apply(null, arrayLike);
+ arr = new Array(1);
+ arr[0] = arrayLike[0];
+ return arr;
+ }
+ if (isArray(arrayLike)) {
+ // Source: Array
+ arr = new Array(l = arrayLike.length);
+ for (i = 0; i < l; ++i) arr[i] = arrayLike[i];
+ return arr;
+ }
+ }
+ arr = [];
+ } else {
+ // Result: Non plain array
+ Constructor = this;
+ }
+
+ if (!isArray(arrayLike)) {
+ if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
+ // Source: Iterator
+ iterator = callable(getIterator).call(arrayLike);
+ if (Constructor) arr = new Constructor();
+ result = iterator.next();
+ i = 0;
+ while (!result.done) {
+ value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
+ if (!Constructor) {
+ arr[i] = value;
+ } else {
+ desc.value = value;
+ defineProperty(arr, i, desc);
+ }
+ result = iterator.next();
+ ++i;
+ }
+ l = i;
+ } else if (isString(arrayLike)) {
+ // Source: String
+ l = arrayLike.length;
+ if (Constructor) arr = new Constructor();
+ for (i = 0, j = 0; i < l; ++i) {
+ value = arrayLike[i];
+ if ((i + 1) < l) {
+ code = value.charCodeAt(0);
+ if ((code >= 0xD800) && (code <= 0xDBFF)) value += arrayLike[++i];
+ }
+ value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
+ if (!Constructor) {
+ arr[j] = value;
+ } else {
+ desc.value = value;
+ defineProperty(arr, j, desc);
+ }
+ ++j;
+ }
+ l = j;
+ }
+ }
+ if (l === undefined) {
+ // Source: array or array-like
+ l = toPosInt(arrayLike.length);
+ if (Constructor) arr = new Constructor(l);
+ for (i = 0; i < l; ++i) {
+ value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
+ if (!Constructor) {
+ arr[i] = value;
+ } else {
+ desc.value = value;
+ defineProperty(arr, i, desc);
+ }
+ }
+ }
+ if (Constructor) {
+ desc.value = null;
+ arr.length = l;
+ }
+ return arr;
+};
diff --git a/source/node_modules/es5-ext/array/generate.js b/source/node_modules/es5-ext/array/generate.js
new file mode 100644
index 000000000..5e066750b
--- /dev/null
+++ b/source/node_modules/es5-ext/array/generate.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var toPosInt = require('../number/to-pos-integer')
+ , value = require('../object/valid-value')
+
+ , slice = Array.prototype.slice;
+
+module.exports = function (length/*, …fill*/) {
+ var arr, l;
+ length = toPosInt(value(length));
+ if (length === 0) return [];
+
+ arr = (arguments.length < 2) ? [undefined] :
+ slice.call(arguments, 1, 1 + length);
+
+ while ((l = arr.length) < length) {
+ arr = arr.concat(arr.slice(0, length - l));
+ }
+ return arr;
+};
diff --git a/source/node_modules/es5-ext/array/index.js b/source/node_modules/es5-ext/array/index.js
new file mode 100644
index 000000000..7a6867894
--- /dev/null
+++ b/source/node_modules/es5-ext/array/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ from: require('./from'),
+ generate: require('./generate'),
+ isPlainArray: require('./is-plain-array'),
+ of: require('./of'),
+ toArray: require('./to-array'),
+ validArray: require('./valid-array')
+};
diff --git a/source/node_modules/es5-ext/array/is-plain-array.js b/source/node_modules/es5-ext/array/is-plain-array.js
new file mode 100644
index 000000000..6b37e4069
--- /dev/null
+++ b/source/node_modules/es5-ext/array/is-plain-array.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf;
+
+module.exports = function (obj) {
+ var proto;
+ if (!obj || !isArray(obj)) return false;
+ proto = getPrototypeOf(obj);
+ if (!isArray(proto)) return false;
+ return !isArray(getPrototypeOf(proto));
+};
diff --git a/source/node_modules/es5-ext/array/of/implement.js b/source/node_modules/es5-ext/array/of/implement.js
new file mode 100644
index 000000000..bf2a5a54a
--- /dev/null
+++ b/source/node_modules/es5-ext/array/of/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Array, 'of', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/array/of/index.js b/source/node_modules/es5-ext/array/of/index.js
new file mode 100644
index 000000000..07ee54dbc
--- /dev/null
+++ b/source/node_modules/es5-ext/array/of/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Array.of
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/array/of/is-implemented.js b/source/node_modules/es5-ext/array/of/is-implemented.js
new file mode 100644
index 000000000..4390a1086
--- /dev/null
+++ b/source/node_modules/es5-ext/array/of/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function () {
+ var of = Array.of, result;
+ if (typeof of !== 'function') return false;
+ result = of('foo', 'bar');
+ return Boolean(result && (result[1] === 'bar'));
+};
diff --git a/source/node_modules/es5-ext/array/of/shim.js b/source/node_modules/es5-ext/array/of/shim.js
new file mode 100644
index 000000000..de72bc922
--- /dev/null
+++ b/source/node_modules/es5-ext/array/of/shim.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var isFunction = require('../../function/is-function')
+
+ , slice = Array.prototype.slice, defineProperty = Object.defineProperty
+ , desc = { configurable: true, enumerable: true, writable: true, value: null };
+
+module.exports = function (/*…items*/) {
+ var result, i, l;
+ if (!this || (this === Array) || !isFunction(this)) return slice.call(arguments);
+ result = new this(l = arguments.length);
+ for (i = 0; i < l; ++i) {
+ desc.value = arguments[i];
+ defineProperty(result, i, desc);
+ }
+ desc.value = null;
+ result.length = l;
+ return result;
+};
diff --git a/source/node_modules/es5-ext/array/to-array.js b/source/node_modules/es5-ext/array/to-array.js
new file mode 100644
index 000000000..ce908dd91
--- /dev/null
+++ b/source/node_modules/es5-ext/array/to-array.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var from = require('./from')
+
+ , isArray = Array.isArray;
+
+module.exports = function (arrayLike) {
+ return isArray(arrayLike) ? arrayLike : from(arrayLike);
+};
diff --git a/source/node_modules/es5-ext/array/valid-array.js b/source/node_modules/es5-ext/array/valid-array.js
new file mode 100644
index 000000000..d86a8f5f2
--- /dev/null
+++ b/source/node_modules/es5-ext/array/valid-array.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isArray = Array.isArray;
+
+module.exports = function (value) {
+ if (isArray(value)) return value;
+ throw new TypeError(value + " is not an array");
+};
diff --git a/source/node_modules/es5-ext/boolean/index.js b/source/node_modules/es5-ext/boolean/index.js
new file mode 100644
index 000000000..c193b948e
--- /dev/null
+++ b/source/node_modules/es5-ext/boolean/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = {
+ isBoolean: require('./is-boolean')
+};
diff --git a/source/node_modules/es5-ext/boolean/is-boolean.js b/source/node_modules/es5-ext/boolean/is-boolean.js
new file mode 100644
index 000000000..5d1a802e1
--- /dev/null
+++ b/source/node_modules/es5-ext/boolean/is-boolean.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call(true);
+
+module.exports = function (x) {
+ return (typeof x === 'boolean') || ((typeof x === 'object') &&
+ ((x instanceof Boolean) || (toString.call(x) === id)));
+};
diff --git a/source/node_modules/es5-ext/date/#/copy.js b/source/node_modules/es5-ext/date/#/copy.js
new file mode 100644
index 000000000..69e2eb09f
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/copy.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var getTime = Date.prototype.getTime;
+
+module.exports = function () { return new Date(getTime.call(this)); };
diff --git a/source/node_modules/es5-ext/date/#/days-in-month.js b/source/node_modules/es5-ext/date/#/days-in-month.js
new file mode 100644
index 000000000..e780efe3c
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/days-in-month.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var getMonth = Date.prototype.getMonth;
+
+module.exports = function () {
+ switch (getMonth.call(this)) {
+ case 1:
+ return this.getFullYear() % 4 ? 28 : 29;
+ case 3:
+ case 5:
+ case 8:
+ case 10:
+ return 30;
+ default:
+ return 31;
+ }
+};
diff --git a/source/node_modules/es5-ext/date/#/floor-day.js b/source/node_modules/es5-ext/date/#/floor-day.js
new file mode 100644
index 000000000..0c9eb8b62
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/floor-day.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var setHours = Date.prototype.setHours;
+
+module.exports = function () {
+ setHours.call(this, 0, 0, 0, 0);
+ return this;
+};
diff --git a/source/node_modules/es5-ext/date/#/floor-month.js b/source/node_modules/es5-ext/date/#/floor-month.js
new file mode 100644
index 000000000..7328c250b
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/floor-month.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var floorDay = require('./floor-day');
+
+module.exports = function () {
+ floorDay.call(this).setDate(1);
+ return this;
+};
diff --git a/source/node_modules/es5-ext/date/#/floor-year.js b/source/node_modules/es5-ext/date/#/floor-year.js
new file mode 100644
index 000000000..9c5085389
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/floor-year.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var floorMonth = require('./floor-month');
+
+module.exports = function () {
+ floorMonth.call(this).setMonth(0);
+ return this;
+};
diff --git a/source/node_modules/es5-ext/date/#/format.js b/source/node_modules/es5-ext/date/#/format.js
new file mode 100644
index 000000000..15bd95f7e
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/format.js
@@ -0,0 +1,21 @@
+'use strict';
+
+var pad = require('../../number/#/pad')
+ , date = require('../valid-date')
+
+ , format;
+
+format = require('../../string/format-method')({
+ Y: function () { return String(this.getFullYear()); },
+ y: function () { return String(this.getFullYear()).slice(-2); },
+ m: function () { return pad.call(this.getMonth() + 1, 2); },
+ d: function () { return pad.call(this.getDate(), 2); },
+ H: function () { return pad.call(this.getHours(), 2); },
+ M: function () { return pad.call(this.getMinutes(), 2); },
+ S: function () { return pad.call(this.getSeconds(), 2); },
+ L: function () { return pad.call(this.getMilliseconds(), 3); }
+});
+
+module.exports = function (pattern) {
+ return format.call(date(this), pattern);
+};
diff --git a/source/node_modules/es5-ext/date/#/index.js b/source/node_modules/es5-ext/date/#/index.js
new file mode 100644
index 000000000..f71b29500
--- /dev/null
+++ b/source/node_modules/es5-ext/date/#/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = {
+ copy: require('./copy'),
+ daysInMonth: require('./days-in-month'),
+ floorDay: require('./floor-day'),
+ floorMonth: require('./floor-month'),
+ floorYear: require('./floor-year'),
+ format: require('./format')
+};
diff --git a/source/node_modules/es5-ext/date/index.js b/source/node_modules/es5-ext/date/index.js
new file mode 100644
index 000000000..eac33fbe6
--- /dev/null
+++ b/source/node_modules/es5-ext/date/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ isDate: require('./is-date'),
+ validDate: require('./valid-date')
+};
diff --git a/source/node_modules/es5-ext/date/is-date.js b/source/node_modules/es5-ext/date/is-date.js
new file mode 100644
index 000000000..6ba236ecb
--- /dev/null
+++ b/source/node_modules/es5-ext/date/is-date.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call(new Date());
+
+module.exports = function (x) {
+ return (x && ((x instanceof Date) || (toString.call(x) === id))) || false;
+};
diff --git a/source/node_modules/es5-ext/date/valid-date.js b/source/node_modules/es5-ext/date/valid-date.js
new file mode 100644
index 000000000..7d1a9b60d
--- /dev/null
+++ b/source/node_modules/es5-ext/date/valid-date.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isDate = require('./is-date');
+
+module.exports = function (x) {
+ if (!isDate(x)) throw new TypeError(x + " is not a Date object");
+ return x;
+};
diff --git a/source/node_modules/es5-ext/error/#/index.js b/source/node_modules/es5-ext/error/#/index.js
new file mode 100644
index 000000000..b984aa91f
--- /dev/null
+++ b/source/node_modules/es5-ext/error/#/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = {
+ throw: require('./throw')
+};
diff --git a/source/node_modules/es5-ext/error/#/throw.js b/source/node_modules/es5-ext/error/#/throw.js
new file mode 100644
index 000000000..7e15ebd1c
--- /dev/null
+++ b/source/node_modules/es5-ext/error/#/throw.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var error = require('../valid-error');
+
+module.exports = function () { throw error(this); };
diff --git a/source/node_modules/es5-ext/error/custom.js b/source/node_modules/es5-ext/error/custom.js
new file mode 100644
index 000000000..bbc2dc20b
--- /dev/null
+++ b/source/node_modules/es5-ext/error/custom.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var assign = require('../object/assign')
+
+ , captureStackTrace = Error.captureStackTrace;
+
+exports = module.exports = function (message/*, code, ext*/) {
+ var err = new Error(), code = arguments[1], ext = arguments[2];
+ if (ext == null) {
+ if (code && (typeof code === 'object')) {
+ ext = code;
+ code = null;
+ }
+ }
+ if (ext != null) assign(err, ext);
+ err.message = String(message);
+ if (code != null) err.code = String(code);
+ if (captureStackTrace) captureStackTrace(err, exports);
+ return err;
+};
diff --git a/source/node_modules/es5-ext/error/index.js b/source/node_modules/es5-ext/error/index.js
new file mode 100644
index 000000000..62984b52d
--- /dev/null
+++ b/source/node_modules/es5-ext/error/index.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ custom: require('./custom'),
+ isError: require('./is-error'),
+ validError: require('./valid-error')
+};
diff --git a/source/node_modules/es5-ext/error/is-error.js b/source/node_modules/es5-ext/error/is-error.js
new file mode 100644
index 000000000..422705faf
--- /dev/null
+++ b/source/node_modules/es5-ext/error/is-error.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call(new Error());
+
+module.exports = function (x) {
+ return (x && ((x instanceof Error) || (toString.call(x)) === id)) || false;
+};
diff --git a/source/node_modules/es5-ext/error/valid-error.js b/source/node_modules/es5-ext/error/valid-error.js
new file mode 100644
index 000000000..0bef768a7
--- /dev/null
+++ b/source/node_modules/es5-ext/error/valid-error.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isError = require('./is-error');
+
+module.exports = function (x) {
+ if (!isError(x)) throw new TypeError(x + " is not an Error object");
+ return x;
+};
diff --git a/source/node_modules/es5-ext/function/#/compose.js b/source/node_modules/es5-ext/function/#/compose.js
new file mode 100644
index 000000000..1da5e0116
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/compose.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var callable = require('../../object/valid-callable')
+ , aFrom = require('../../array/from')
+
+ , apply = Function.prototype.apply, call = Function.prototype.call
+ , callFn = function (arg, fn) { return call.call(fn, this, arg); };
+
+module.exports = function (fn/*, …fnn*/) {
+ var fns, first;
+ if (!fn) callable(fn);
+ fns = [this].concat(aFrom(arguments));
+ fns.forEach(callable);
+ fns = fns.reverse();
+ first = fns[0];
+ fns = fns.slice(1);
+ return function (arg) {
+ return fns.reduce(callFn, apply.call(first, this, arguments));
+ };
+};
diff --git a/source/node_modules/es5-ext/function/#/copy.js b/source/node_modules/es5-ext/function/#/copy.js
new file mode 100644
index 000000000..e1467f767
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/copy.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var mixin = require('../../object/mixin')
+ , validFunction = require('../valid-function')
+
+ , re = /^\s*function\s*([\0-'\)-\uffff]+)*\s*\(([\0-\(\*-\uffff]*)\)\s*\{/;
+
+module.exports = function () {
+ var match = String(validFunction(this)).match(re), fn;
+
+ fn = new Function('fn', 'return function ' + match[1].trim() + '(' +
+ match[2] + ') { return fn.apply(this, arguments); };')(this);
+ try { mixin(fn, this); } catch (ignore) {}
+ return fn;
+};
diff --git a/source/node_modules/es5-ext/function/#/curry.js b/source/node_modules/es5-ext/function/#/curry.js
new file mode 100644
index 000000000..943d6faf8
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/curry.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , callable = require('../../object/valid-callable')
+ , defineLength = require('../_define-length')
+
+ , slice = Array.prototype.slice, apply = Function.prototype.apply
+ , curry;
+
+curry = function self(fn, length, preArgs) {
+ return defineLength(function () {
+ var args = preArgs ?
+ preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) :
+ slice.call(arguments, 0, length);
+ return (args.length === length) ? apply.call(fn, this, args) :
+ self(fn, length, args);
+ }, preArgs ? (length - preArgs.length) : length);
+};
+
+module.exports = function (/*length*/) {
+ var length = arguments[0];
+ return curry(callable(this),
+ isNaN(length) ? toPosInt(this.length) : toPosInt(length));
+};
diff --git a/source/node_modules/es5-ext/function/#/index.js b/source/node_modules/es5-ext/function/#/index.js
new file mode 100644
index 000000000..8d0da007f
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/index.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = {
+ compose: require('./compose'),
+ copy: require('./copy'),
+ curry: require('./curry'),
+ lock: require('./lock'),
+ not: require('./not'),
+ partial: require('./partial'),
+ spread: require('./spread'),
+ toStringTokens: require('./to-string-tokens')
+};
diff --git a/source/node_modules/es5-ext/function/#/lock.js b/source/node_modules/es5-ext/function/#/lock.js
new file mode 100644
index 000000000..91e1a65cd
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/lock.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var callable = require('../../object/valid-callable')
+
+ , apply = Function.prototype.apply;
+
+module.exports = function (/*…args*/) {
+ var fn = callable(this)
+ , args = arguments;
+
+ return function () { return apply.call(fn, this, args); };
+};
diff --git a/source/node_modules/es5-ext/function/#/not.js b/source/node_modules/es5-ext/function/#/not.js
new file mode 100644
index 000000000..c6dbe97fb
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/not.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var callable = require('../../object/valid-callable')
+ , defineLength = require('../_define-length')
+
+ , apply = Function.prototype.apply;
+
+module.exports = function () {
+ var fn = callable(this);
+
+ return defineLength(function () {
+ return !apply.call(fn, this, arguments);
+ }, fn.length);
+};
diff --git a/source/node_modules/es5-ext/function/#/partial.js b/source/node_modules/es5-ext/function/#/partial.js
new file mode 100644
index 000000000..bf31a3575
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/partial.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var callable = require('../../object/valid-callable')
+ , aFrom = require('../../array/from')
+ , defineLength = require('../_define-length')
+
+ , apply = Function.prototype.apply;
+
+module.exports = function (/*…args*/) {
+ var fn = callable(this)
+ , args = aFrom(arguments);
+
+ return defineLength(function () {
+ return apply.call(fn, this, args.concat(aFrom(arguments)));
+ }, fn.length - args.length);
+};
diff --git a/source/node_modules/es5-ext/function/#/spread.js b/source/node_modules/es5-ext/function/#/spread.js
new file mode 100644
index 000000000..d7c93b7e0
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/spread.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var callable = require('../../object/valid-callable')
+
+ , apply = Function.prototype.apply;
+
+module.exports = function () {
+ var fn = callable(this);
+ return function (args) { return apply.call(fn, this, args); };
+};
diff --git a/source/node_modules/es5-ext/function/#/to-string-tokens.js b/source/node_modules/es5-ext/function/#/to-string-tokens.js
new file mode 100644
index 000000000..67afeae82
--- /dev/null
+++ b/source/node_modules/es5-ext/function/#/to-string-tokens.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var validFunction = require('../valid-function')
+
+ , re = new RegExp('^\\s*function[\\0-\'\\)-\\uffff]*' +
+ '\\(([\\0-\\(\\*-\\uffff]*)\\)\\s*\\{([\\0-\\uffff]*)\\}\\s*$');
+
+module.exports = function () {
+ var data = String(validFunction(this)).match(re);
+ return { args: data[1], body: data[2] };
+};
diff --git a/source/node_modules/es5-ext/function/_define-length.js b/source/node_modules/es5-ext/function/_define-length.js
new file mode 100644
index 000000000..496ea62c5
--- /dev/null
+++ b/source/node_modules/es5-ext/function/_define-length.js
@@ -0,0 +1,44 @@
+'use strict';
+
+var toPosInt = require('../number/to-pos-integer')
+
+ , test = function (a, b) {}, desc, defineProperty
+ , generate, mixin;
+
+try {
+ Object.defineProperty(test, 'length', { configurable: true, writable: false,
+ enumerable: false, value: 1 });
+} catch (ignore) {}
+
+if (test.length === 1) {
+ // ES6
+ desc = { configurable: true, writable: false, enumerable: false };
+ defineProperty = Object.defineProperty;
+ module.exports = function (fn, length) {
+ length = toPosInt(length);
+ if (fn.length === length) return fn;
+ desc.value = length;
+ return defineProperty(fn, 'length', desc);
+ };
+} else {
+ mixin = require('../object/mixin');
+ generate = (function () {
+ var cache = [];
+ return function (l) {
+ var args, i = 0;
+ if (cache[l]) return cache[l];
+ args = [];
+ while (l--) args.push('a' + (++i).toString(36));
+ return new Function('fn', 'return function (' + args.join(', ') +
+ ') { return fn.apply(this, arguments); };');
+ };
+ }());
+ module.exports = function (src, length) {
+ var target;
+ length = toPosInt(length);
+ if (src.length === length) return src;
+ target = generate(length)(src);
+ try { mixin(target, src); } catch (ignore) {}
+ return target;
+ };
+}
diff --git a/source/node_modules/es5-ext/function/constant.js b/source/node_modules/es5-ext/function/constant.js
new file mode 100644
index 000000000..10f1e203e
--- /dev/null
+++ b/source/node_modules/es5-ext/function/constant.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (x) {
+ return function () { return x; };
+};
diff --git a/source/node_modules/es5-ext/function/identity.js b/source/node_modules/es5-ext/function/identity.js
new file mode 100644
index 000000000..a9289f0b2
--- /dev/null
+++ b/source/node_modules/es5-ext/function/identity.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (x) { return x; };
diff --git a/source/node_modules/es5-ext/function/index.js b/source/node_modules/es5-ext/function/index.js
new file mode 100644
index 000000000..cfad3f3ec
--- /dev/null
+++ b/source/node_modules/es5-ext/function/index.js
@@ -0,0 +1,15 @@
+// Export all modules.
+
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ constant: require('./constant'),
+ identity: require('./identity'),
+ invoke: require('./invoke'),
+ isArguments: require('./is-arguments'),
+ isFunction: require('./is-function'),
+ noop: require('./noop'),
+ pluck: require('./pluck'),
+ validFunction: require('./valid-function')
+};
diff --git a/source/node_modules/es5-ext/function/invoke.js b/source/node_modules/es5-ext/function/invoke.js
new file mode 100644
index 000000000..9195afddd
--- /dev/null
+++ b/source/node_modules/es5-ext/function/invoke.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var isCallable = require('../object/is-callable')
+ , value = require('../object/valid-value')
+
+ , slice = Array.prototype.slice, apply = Function.prototype.apply;
+
+module.exports = function (name/*, …args*/) {
+ var args = slice.call(arguments, 1), isFn = isCallable(name);
+ return function (obj) {
+ value(obj);
+ return apply.call(isFn ? name : obj[name], obj,
+ args.concat(slice.call(arguments, 1)));
+ };
+};
diff --git a/source/node_modules/es5-ext/function/is-arguments.js b/source/node_modules/es5-ext/function/is-arguments.js
new file mode 100644
index 000000000..9a29855f8
--- /dev/null
+++ b/source/node_modules/es5-ext/function/is-arguments.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call((function () { return arguments; }()));
+
+module.exports = function (x) { return (toString.call(x) === id); };
diff --git a/source/node_modules/es5-ext/function/is-function.js b/source/node_modules/es5-ext/function/is-function.js
new file mode 100644
index 000000000..ab4399ce2
--- /dev/null
+++ b/source/node_modules/es5-ext/function/is-function.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call(require('./noop'));
+
+module.exports = function (f) {
+ return (typeof f === "function") && (toString.call(f) === id);
+};
diff --git a/source/node_modules/es5-ext/function/noop.js b/source/node_modules/es5-ext/function/noop.js
new file mode 100644
index 000000000..aa43baedf
--- /dev/null
+++ b/source/node_modules/es5-ext/function/noop.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function () {};
diff --git a/source/node_modules/es5-ext/function/pluck.js b/source/node_modules/es5-ext/function/pluck.js
new file mode 100644
index 000000000..7f70a30cb
--- /dev/null
+++ b/source/node_modules/es5-ext/function/pluck.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var value = require('../object/valid-value');
+
+module.exports = function (name) {
+ return function (o) { return value(o)[name]; };
+};
diff --git a/source/node_modules/es5-ext/function/valid-function.js b/source/node_modules/es5-ext/function/valid-function.js
new file mode 100644
index 000000000..05fdee2c3
--- /dev/null
+++ b/source/node_modules/es5-ext/function/valid-function.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isFunction = require('./is-function');
+
+module.exports = function (x) {
+ if (!isFunction(x)) throw new TypeError(x + " is not a function");
+ return x;
+};
diff --git a/source/node_modules/es5-ext/global.js b/source/node_modules/es5-ext/global.js
new file mode 100644
index 000000000..872a40e81
--- /dev/null
+++ b/source/node_modules/es5-ext/global.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = new Function("return this")();
diff --git a/source/node_modules/es5-ext/index.js b/source/node_modules/es5-ext/index.js
new file mode 100644
index 000000000..db9a7600b
--- /dev/null
+++ b/source/node_modules/es5-ext/index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = {
+ global: require('./global'),
+
+ array: require('./array'),
+ boolean: require('./boolean'),
+ date: require('./date'),
+ error: require('./error'),
+ function: require('./function'),
+ iterable: require('./iterable'),
+ math: require('./math'),
+ number: require('./number'),
+ object: require('./object'),
+ regExp: require('./reg-exp'),
+ string: require('./string')
+};
diff --git a/source/node_modules/es5-ext/iterable/for-each.js b/source/node_modules/es5-ext/iterable/for-each.js
new file mode 100644
index 000000000..f1e20425b
--- /dev/null
+++ b/source/node_modules/es5-ext/iterable/for-each.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var forOf = require('es6-iterator/for-of')
+ , isIterable = require('es6-iterator/is-iterable')
+ , iterable = require('./validate')
+
+ , forEach = Array.prototype.forEach;
+
+module.exports = function (target, cb/*, thisArg*/) {
+ if (isIterable(iterable(target))) forOf(target, cb, arguments[2]);
+ else forEach.call(target, cb, arguments[2]);
+};
diff --git a/source/node_modules/es5-ext/iterable/index.js b/source/node_modules/es5-ext/iterable/index.js
new file mode 100644
index 000000000..a3e16a5e8
--- /dev/null
+++ b/source/node_modules/es5-ext/iterable/index.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = {
+ forEach: require('./for-each'),
+ is: require('./is'),
+ validate: require('./validate'),
+ validateObject: require('./validate-object')
+};
diff --git a/source/node_modules/es5-ext/iterable/is.js b/source/node_modules/es5-ext/iterable/is.js
new file mode 100644
index 000000000..bb8bf2872
--- /dev/null
+++ b/source/node_modules/es5-ext/iterable/is.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator
+ , isArrayLike = require('../object/is-array-like');
+
+module.exports = function (x) {
+ if (x == null) return false;
+ if (typeof x[iteratorSymbol] === 'function') return true;
+ return isArrayLike(x);
+};
diff --git a/source/node_modules/es5-ext/iterable/validate-object.js b/source/node_modules/es5-ext/iterable/validate-object.js
new file mode 100644
index 000000000..988a6adb6
--- /dev/null
+++ b/source/node_modules/es5-ext/iterable/validate-object.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var isObject = require('../object/is-object')
+ , is = require('./is');
+
+module.exports = function (x) {
+ if (is(x) && isObject(x)) return x;
+ throw new TypeError(x + " is not an iterable or array-like object");
+};
diff --git a/source/node_modules/es5-ext/iterable/validate.js b/source/node_modules/es5-ext/iterable/validate.js
new file mode 100644
index 000000000..1be6d7fcd
--- /dev/null
+++ b/source/node_modules/es5-ext/iterable/validate.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var is = require('./is');
+
+module.exports = function (x) {
+ if (is(x)) return x;
+ throw new TypeError(x + " is not an iterable or array-like");
+};
diff --git a/source/node_modules/es5-ext/math/_pack-ieee754.js b/source/node_modules/es5-ext/math/_pack-ieee754.js
new file mode 100644
index 000000000..eecda5654
--- /dev/null
+++ b/source/node_modules/es5-ext/math/_pack-ieee754.js
@@ -0,0 +1,82 @@
+// Credit: https://github.com/paulmillr/es6-shim/
+
+'use strict';
+
+var abs = Math.abs, floor = Math.floor, log = Math.log, min = Math.min
+ , pow = Math.pow, LN2 = Math.LN2
+ , roundToEven;
+
+roundToEven = function (n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5) return w;
+ if (f > 0.5) return w + 1;
+ return w % 2 ? w + 1 : w;
+};
+
+module.exports = function (v, ebits, fbits) {
+ var bias = (1 << (ebits - 1)) - 1, s, e, f, i, bits, str, bytes;
+
+ // Compute sign, exponent, fraction
+ if (isNaN(v)) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1;
+ f = pow(2, fbits - 1);
+ s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1;
+ f = 0;
+ s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0;
+ f = 0;
+ s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normal
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Subnormal
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) {
+ bits.push(f % 2 ? 1 : 0);
+ f = floor(f / 2);
+ }
+ for (i = ebits; i; i -= 1) {
+ bits.push(e % 2 ? 1 : 0);
+ e = floor(e / 2);
+ }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+};
diff --git a/source/node_modules/es5-ext/math/_unpack-ieee754.js b/source/node_modules/es5-ext/math/_unpack-ieee754.js
new file mode 100644
index 000000000..c9f26f2bb
--- /dev/null
+++ b/source/node_modules/es5-ext/math/_unpack-ieee754.js
@@ -0,0 +1,33 @@
+// Credit: https://github.com/paulmillr/es6-shim/
+
+'use strict';
+
+var pow = Math.pow;
+
+module.exports = function (bytes, ebits, fbits) {
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0);
+ b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) return f !== 0 ? NaN : s * Infinity;
+ if (e > 0) return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ if (f !== 0) return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ return s < 0 ? -0 : 0;
+};
diff --git a/source/node_modules/es5-ext/math/acosh/implement.js b/source/node_modules/es5-ext/math/acosh/implement.js
new file mode 100644
index 000000000..f48ad11de
--- /dev/null
+++ b/source/node_modules/es5-ext/math/acosh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'acosh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/acosh/index.js b/source/node_modules/es5-ext/math/acosh/index.js
new file mode 100644
index 000000000..00ddea69d
--- /dev/null
+++ b/source/node_modules/es5-ext/math/acosh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.acosh
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/acosh/is-implemented.js b/source/node_modules/es5-ext/math/acosh/is-implemented.js
new file mode 100644
index 000000000..363f0d8bc
--- /dev/null
+++ b/source/node_modules/es5-ext/math/acosh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var acosh = Math.acosh;
+ if (typeof acosh !== 'function') return false;
+ return acosh(2) === 1.3169578969248166;
+};
diff --git a/source/node_modules/es5-ext/math/acosh/shim.js b/source/node_modules/es5-ext/math/acosh/shim.js
new file mode 100644
index 000000000..89a24b5d7
--- /dev/null
+++ b/source/node_modules/es5-ext/math/acosh/shim.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var log = Math.log, sqrt = Math.sqrt;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x < 1) return NaN;
+ if (x === 1) return 0;
+ if (x === Infinity) return x;
+ return log(x + sqrt(x * x - 1));
+};
diff --git a/source/node_modules/es5-ext/math/asinh/implement.js b/source/node_modules/es5-ext/math/asinh/implement.js
new file mode 100644
index 000000000..21f64d504
--- /dev/null
+++ b/source/node_modules/es5-ext/math/asinh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'asinh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/asinh/index.js b/source/node_modules/es5-ext/math/asinh/index.js
new file mode 100644
index 000000000..d415144ee
--- /dev/null
+++ b/source/node_modules/es5-ext/math/asinh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.asinh
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/asinh/is-implemented.js b/source/node_modules/es5-ext/math/asinh/is-implemented.js
new file mode 100644
index 000000000..6c205f418
--- /dev/null
+++ b/source/node_modules/es5-ext/math/asinh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var asinh = Math.asinh;
+ if (typeof asinh !== 'function') return false;
+ return asinh(2) === 1.4436354751788103;
+};
diff --git a/source/node_modules/es5-ext/math/asinh/shim.js b/source/node_modules/es5-ext/math/asinh/shim.js
new file mode 100644
index 000000000..42fbf1457
--- /dev/null
+++ b/source/node_modules/es5-ext/math/asinh/shim.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var log = Math.log, sqrt = Math.sqrt;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (!isFinite(x)) return x;
+ if (x < 0) {
+ x = -x;
+ return -log(x + sqrt(x * x + 1));
+ }
+ return log(x + sqrt(x * x + 1));
+};
diff --git a/source/node_modules/es5-ext/math/atanh/implement.js b/source/node_modules/es5-ext/math/atanh/implement.js
new file mode 100644
index 000000000..1a4851343
--- /dev/null
+++ b/source/node_modules/es5-ext/math/atanh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'atanh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/atanh/index.js b/source/node_modules/es5-ext/math/atanh/index.js
new file mode 100644
index 000000000..785b3deba
--- /dev/null
+++ b/source/node_modules/es5-ext/math/atanh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.atanh
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/atanh/is-implemented.js b/source/node_modules/es5-ext/math/atanh/is-implemented.js
new file mode 100644
index 000000000..dbaf18ece
--- /dev/null
+++ b/source/node_modules/es5-ext/math/atanh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var atanh = Math.atanh;
+ if (typeof atanh !== 'function') return false;
+ return atanh(0.5) === 0.5493061443340549;
+};
diff --git a/source/node_modules/es5-ext/math/atanh/shim.js b/source/node_modules/es5-ext/math/atanh/shim.js
new file mode 100644
index 000000000..531e2891f
--- /dev/null
+++ b/source/node_modules/es5-ext/math/atanh/shim.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var log = Math.log;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x < -1) return NaN;
+ if (x > 1) return NaN;
+ if (x === -1) return -Infinity;
+ if (x === 1) return Infinity;
+ if (x === 0) return x;
+ return 0.5 * log((1 + x) / (1 - x));
+};
diff --git a/source/node_modules/es5-ext/math/cbrt/implement.js b/source/node_modules/es5-ext/math/cbrt/implement.js
new file mode 100644
index 000000000..3a12dde48
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cbrt/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'cbrt', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/cbrt/index.js b/source/node_modules/es5-ext/math/cbrt/index.js
new file mode 100644
index 000000000..89f966dfe
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cbrt/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.cbrt
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/cbrt/is-implemented.js b/source/node_modules/es5-ext/math/cbrt/is-implemented.js
new file mode 100644
index 000000000..69809f3cf
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cbrt/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var cbrt = Math.cbrt;
+ if (typeof cbrt !== 'function') return false;
+ return cbrt(2) === 1.2599210498948732;
+};
diff --git a/source/node_modules/es5-ext/math/cbrt/shim.js b/source/node_modules/es5-ext/math/cbrt/shim.js
new file mode 100644
index 000000000..bca196026
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cbrt/shim.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var pow = Math.pow;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (!isFinite(x)) return x;
+ if (x < 0) return -pow(-x, 1 / 3);
+ return pow(x, 1 / 3);
+};
diff --git a/source/node_modules/es5-ext/math/clz32/implement.js b/source/node_modules/es5-ext/math/clz32/implement.js
new file mode 100644
index 000000000..339df33ea
--- /dev/null
+++ b/source/node_modules/es5-ext/math/clz32/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'clz32', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/clz32/index.js b/source/node_modules/es5-ext/math/clz32/index.js
new file mode 100644
index 000000000..1687b337e
--- /dev/null
+++ b/source/node_modules/es5-ext/math/clz32/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.clz32
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/clz32/is-implemented.js b/source/node_modules/es5-ext/math/clz32/is-implemented.js
new file mode 100644
index 000000000..ccc8f7133
--- /dev/null
+++ b/source/node_modules/es5-ext/math/clz32/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var clz32 = Math.clz32;
+ if (typeof clz32 !== 'function') return false;
+ return clz32(1000) === 22;
+};
diff --git a/source/node_modules/es5-ext/math/clz32/shim.js b/source/node_modules/es5-ext/math/clz32/shim.js
new file mode 100644
index 000000000..2a582da3b
--- /dev/null
+++ b/source/node_modules/es5-ext/math/clz32/shim.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (value) {
+ value = value >>> 0;
+ return value ? 32 - value.toString(2).length : 32;
+};
diff --git a/source/node_modules/es5-ext/math/cosh/implement.js b/source/node_modules/es5-ext/math/cosh/implement.js
new file mode 100644
index 000000000..f90d83056
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cosh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'cosh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/cosh/index.js b/source/node_modules/es5-ext/math/cosh/index.js
new file mode 100644
index 000000000..000636ab7
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cosh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.cosh
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/cosh/is-implemented.js b/source/node_modules/es5-ext/math/cosh/is-implemented.js
new file mode 100644
index 000000000..c796bcbf3
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cosh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var cosh = Math.cosh;
+ if (typeof cosh !== 'function') return false;
+ return cosh(1) === 1.5430806348152437;
+};
diff --git a/source/node_modules/es5-ext/math/cosh/shim.js b/source/node_modules/es5-ext/math/cosh/shim.js
new file mode 100644
index 000000000..f9062bd97
--- /dev/null
+++ b/source/node_modules/es5-ext/math/cosh/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var exp = Math.exp;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return 1;
+ if (!isFinite(x)) return Infinity;
+ return (exp(x) + exp(-x)) / 2;
+};
diff --git a/source/node_modules/es5-ext/math/expm1/implement.js b/source/node_modules/es5-ext/math/expm1/implement.js
new file mode 100644
index 000000000..fc20c8cfa
--- /dev/null
+++ b/source/node_modules/es5-ext/math/expm1/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'expm1', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/expm1/index.js b/source/node_modules/es5-ext/math/expm1/index.js
new file mode 100644
index 000000000..4c1bc77a2
--- /dev/null
+++ b/source/node_modules/es5-ext/math/expm1/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.expm1
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/expm1/is-implemented.js b/source/node_modules/es5-ext/math/expm1/is-implemented.js
new file mode 100644
index 000000000..3b106d5d5
--- /dev/null
+++ b/source/node_modules/es5-ext/math/expm1/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var expm1 = Math.expm1;
+ if (typeof expm1 !== 'function') return false;
+ return expm1(1).toFixed(15) === '1.718281828459045';
+};
diff --git a/source/node_modules/es5-ext/math/expm1/shim.js b/source/node_modules/es5-ext/math/expm1/shim.js
new file mode 100644
index 000000000..9c8c23608
--- /dev/null
+++ b/source/node_modules/es5-ext/math/expm1/shim.js
@@ -0,0 +1,16 @@
+// Thanks: https://github.com/monolithed/ECMAScript-6
+
+'use strict';
+
+var exp = Math.exp;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (x === Infinity) return Infinity;
+ if (x === -Infinity) return -1;
+
+ if ((x > -1.0e-6) && (x < 1.0e-6)) return x + x * x / 2;
+ return exp(x) - 1;
+};
diff --git a/source/node_modules/es5-ext/math/fround/implement.js b/source/node_modules/es5-ext/math/fround/implement.js
new file mode 100644
index 000000000..c55b26c46
--- /dev/null
+++ b/source/node_modules/es5-ext/math/fround/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'fround', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/fround/index.js b/source/node_modules/es5-ext/math/fround/index.js
new file mode 100644
index 000000000..a077ed0ba
--- /dev/null
+++ b/source/node_modules/es5-ext/math/fround/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.fround
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/fround/is-implemented.js b/source/node_modules/es5-ext/math/fround/is-implemented.js
new file mode 100644
index 000000000..ffbf094e6
--- /dev/null
+++ b/source/node_modules/es5-ext/math/fround/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var fround = Math.fround;
+ if (typeof fround !== 'function') return false;
+ return fround(1.337) === 1.3370000123977661;
+};
diff --git a/source/node_modules/es5-ext/math/fround/shim.js b/source/node_modules/es5-ext/math/fround/shim.js
new file mode 100644
index 000000000..f2c86e46a
--- /dev/null
+++ b/source/node_modules/es5-ext/math/fround/shim.js
@@ -0,0 +1,33 @@
+// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js
+
+'use strict';
+
+var toFloat32;
+
+if (typeof Float32Array !== 'undefined') {
+ toFloat32 = (function () {
+ var float32Array = new Float32Array(1);
+ return function (x) {
+ float32Array[0] = x;
+ return float32Array[0];
+ };
+ }());
+} else {
+ toFloat32 = (function () {
+ var pack = require('../_pack-ieee754')
+ , unpack = require('../_unpack-ieee754');
+
+ return function (x) {
+ return unpack(pack(x, 8, 23), 8, 23);
+ };
+ }());
+}
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (!isFinite(x)) return x;
+
+ return toFloat32(x);
+};
diff --git a/source/node_modules/es5-ext/math/hypot/implement.js b/source/node_modules/es5-ext/math/hypot/implement.js
new file mode 100644
index 000000000..b27fda7a0
--- /dev/null
+++ b/source/node_modules/es5-ext/math/hypot/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'hypot', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/hypot/index.js b/source/node_modules/es5-ext/math/hypot/index.js
new file mode 100644
index 000000000..334bc584c
--- /dev/null
+++ b/source/node_modules/es5-ext/math/hypot/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.hypot
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/hypot/is-implemented.js b/source/node_modules/es5-ext/math/hypot/is-implemented.js
new file mode 100644
index 000000000..e75c5d36b
--- /dev/null
+++ b/source/node_modules/es5-ext/math/hypot/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var hypot = Math.hypot;
+ if (typeof hypot !== 'function') return false;
+ return hypot(3, 4) === 5;
+};
diff --git a/source/node_modules/es5-ext/math/hypot/shim.js b/source/node_modules/es5-ext/math/hypot/shim.js
new file mode 100644
index 000000000..3d0988bc1
--- /dev/null
+++ b/source/node_modules/es5-ext/math/hypot/shim.js
@@ -0,0 +1,34 @@
+// Thanks for hints: https://github.com/paulmillr/es6-shim
+
+'use strict';
+
+var some = Array.prototype.some, abs = Math.abs, sqrt = Math.sqrt
+
+ , compare = function (a, b) { return b - a; }
+ , divide = function (x) { return x / this; }
+ , add = function (sum, number) { return sum + number * number; };
+
+module.exports = function (val1, val2/*, …valn*/) {
+ var result, numbers;
+ if (!arguments.length) return 0;
+ some.call(arguments, function (val) {
+ if (isNaN(val)) {
+ result = NaN;
+ return;
+ }
+ if (!isFinite(val)) {
+ result = Infinity;
+ return true;
+ }
+ if (result !== undefined) return;
+ val = Number(val);
+ if (val === 0) return;
+ if (!numbers) numbers = [abs(val)];
+ else numbers.push(abs(val));
+ });
+ if (result !== undefined) return result;
+ if (!numbers) return 0;
+
+ numbers.sort(compare);
+ return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0));
+};
diff --git a/source/node_modules/es5-ext/math/imul/implement.js b/source/node_modules/es5-ext/math/imul/implement.js
new file mode 100644
index 000000000..ed207bd27
--- /dev/null
+++ b/source/node_modules/es5-ext/math/imul/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'imul', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/imul/index.js b/source/node_modules/es5-ext/math/imul/index.js
new file mode 100644
index 000000000..41e5d5f01
--- /dev/null
+++ b/source/node_modules/es5-ext/math/imul/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.imul
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/imul/is-implemented.js b/source/node_modules/es5-ext/math/imul/is-implemented.js
new file mode 100644
index 000000000..d8495dea2
--- /dev/null
+++ b/source/node_modules/es5-ext/math/imul/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var imul = Math.imul;
+ if (typeof imul !== 'function') return false;
+ return imul(-1, 8) === -8;
+};
diff --git a/source/node_modules/es5-ext/math/imul/shim.js b/source/node_modules/es5-ext/math/imul/shim.js
new file mode 100644
index 000000000..8fd8a8d7a
--- /dev/null
+++ b/source/node_modules/es5-ext/math/imul/shim.js
@@ -0,0 +1,13 @@
+// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
+// /Global_Objects/Math/imul
+
+'use strict';
+
+module.exports = function (x, y) {
+ var xh = (x >>> 16) & 0xffff, xl = x & 0xffff
+ , yh = (y >>> 16) & 0xffff, yl = y & 0xffff;
+
+ // the shift by 0 fixes the sign on the high part
+ // the final |0 converts the unsigned value into a signed value
+ return ((xl * yl) + (((xh * yl + xl * yh) << 16) >>> 0) | 0);
+};
diff --git a/source/node_modules/es5-ext/math/index.js b/source/node_modules/es5-ext/math/index.js
new file mode 100644
index 000000000..d112d0bfe
--- /dev/null
+++ b/source/node_modules/es5-ext/math/index.js
@@ -0,0 +1,21 @@
+'use strict';
+
+module.exports = {
+ acosh: require('./acosh'),
+ asinh: require('./asinh'),
+ atanh: require('./atanh'),
+ cbrt: require('./cbrt'),
+ clz32: require('./clz32'),
+ cosh: require('./cosh'),
+ expm1: require('./expm1'),
+ fround: require('./fround'),
+ hypot: require('./hypot'),
+ imul: require('./imul'),
+ log10: require('./log10'),
+ log2: require('./log2'),
+ log1p: require('./log1p'),
+ sign: require('./sign'),
+ sinh: require('./sinh'),
+ tanh: require('./tanh'),
+ trunc: require('./trunc')
+};
diff --git a/source/node_modules/es5-ext/math/log10/implement.js b/source/node_modules/es5-ext/math/log10/implement.js
new file mode 100644
index 000000000..dd96edd80
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log10/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'log10', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/log10/index.js b/source/node_modules/es5-ext/math/log10/index.js
new file mode 100644
index 000000000..a9eee5131
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log10/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.log10
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/log10/is-implemented.js b/source/node_modules/es5-ext/math/log10/is-implemented.js
new file mode 100644
index 000000000..c7f40ee77
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log10/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var log10 = Math.log10;
+ if (typeof log10 !== 'function') return false;
+ return log10(2) === 0.3010299956639812;
+};
diff --git a/source/node_modules/es5-ext/math/log10/shim.js b/source/node_modules/es5-ext/math/log10/shim.js
new file mode 100644
index 000000000..fc77287f6
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log10/shim.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var log = Math.log, LOG10E = Math.LOG10E;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x < 0) return NaN;
+ if (x === 0) return -Infinity;
+ if (x === 1) return 0;
+ if (x === Infinity) return Infinity;
+
+ return log(x) * LOG10E;
+};
diff --git a/source/node_modules/es5-ext/math/log1p/implement.js b/source/node_modules/es5-ext/math/log1p/implement.js
new file mode 100644
index 000000000..f62f91f68
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log1p/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'log1p', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/log1p/index.js b/source/node_modules/es5-ext/math/log1p/index.js
new file mode 100644
index 000000000..107b11471
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log1p/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.log1p
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/log1p/is-implemented.js b/source/node_modules/es5-ext/math/log1p/is-implemented.js
new file mode 100644
index 000000000..61e90974c
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log1p/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var log1p = Math.log1p;
+ if (typeof log1p !== 'function') return false;
+ return log1p(1) === 0.6931471805599453;
+};
diff --git a/source/node_modules/es5-ext/math/log1p/shim.js b/source/node_modules/es5-ext/math/log1p/shim.js
new file mode 100644
index 000000000..10acebca4
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log1p/shim.js
@@ -0,0 +1,17 @@
+// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js
+
+'use strict';
+
+var log = Math.log;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x < -1) return NaN;
+ if (x === -1) return -Infinity;
+ if (x === 0) return x;
+ if (x === Infinity) return Infinity;
+
+ if (x > -1.0e-8 && x < 1.0e-8) return (x - x * x / 2);
+ return log(1 + x);
+};
diff --git a/source/node_modules/es5-ext/math/log2/implement.js b/source/node_modules/es5-ext/math/log2/implement.js
new file mode 100644
index 000000000..8483f0950
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log2/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'log2', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/log2/index.js b/source/node_modules/es5-ext/math/log2/index.js
new file mode 100644
index 000000000..87e9050ab
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log2/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.log2
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/log2/is-implemented.js b/source/node_modules/es5-ext/math/log2/is-implemented.js
new file mode 100644
index 000000000..802322faf
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log2/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var log2 = Math.log2;
+ if (typeof log2 !== 'function') return false;
+ return log2(3).toFixed(15) === '1.584962500721156';
+};
diff --git a/source/node_modules/es5-ext/math/log2/shim.js b/source/node_modules/es5-ext/math/log2/shim.js
new file mode 100644
index 000000000..cd80994a7
--- /dev/null
+++ b/source/node_modules/es5-ext/math/log2/shim.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var log = Math.log, LOG2E = Math.LOG2E;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x < 0) return NaN;
+ if (x === 0) return -Infinity;
+ if (x === 1) return 0;
+ if (x === Infinity) return Infinity;
+
+ return log(x) * LOG2E;
+};
diff --git a/source/node_modules/es5-ext/math/sign/implement.js b/source/node_modules/es5-ext/math/sign/implement.js
new file mode 100644
index 000000000..b0db2f413
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sign/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'sign', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/sign/index.js b/source/node_modules/es5-ext/math/sign/index.js
new file mode 100644
index 000000000..b23263334
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sign/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.sign
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/sign/is-implemented.js b/source/node_modules/es5-ext/math/sign/is-implemented.js
new file mode 100644
index 000000000..6d0de475a
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sign/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var sign = Math.sign;
+ if (typeof sign !== 'function') return false;
+ return ((sign(10) === 1) && (sign(-20) === -1));
+};
diff --git a/source/node_modules/es5-ext/math/sign/shim.js b/source/node_modules/es5-ext/math/sign/shim.js
new file mode 100644
index 000000000..4df9c95aa
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sign/shim.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (value) {
+ value = Number(value);
+ if (isNaN(value) || (value === 0)) return value;
+ return (value > 0) ? 1 : -1;
+};
diff --git a/source/node_modules/es5-ext/math/sinh/implement.js b/source/node_modules/es5-ext/math/sinh/implement.js
new file mode 100644
index 000000000..f259a631b
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sinh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'sinh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/sinh/index.js b/source/node_modules/es5-ext/math/sinh/index.js
new file mode 100644
index 000000000..e5bea572f
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sinh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.sinh
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/sinh/is-implemented.js b/source/node_modules/es5-ext/math/sinh/is-implemented.js
new file mode 100644
index 000000000..888ec67a9
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sinh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var sinh = Math.sinh;
+ if (typeof sinh !== 'function') return false;
+ return ((sinh(1) === 1.1752011936438014) && (sinh(Number.MIN_VALUE) === 5e-324));
+};
diff --git a/source/node_modules/es5-ext/math/sinh/shim.js b/source/node_modules/es5-ext/math/sinh/shim.js
new file mode 100644
index 000000000..5b725bed6
--- /dev/null
+++ b/source/node_modules/es5-ext/math/sinh/shim.js
@@ -0,0 +1,17 @@
+// Parts of implementation taken from es6-shim project
+// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js
+
+'use strict';
+
+var expm1 = require('../expm1')
+
+ , abs = Math.abs, exp = Math.exp, e = Math.E;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (!isFinite(x)) return x;
+ if (abs(x) < 1) return (expm1(x) - expm1(-x)) / 2;
+ return (exp(x - 1) - exp(-x - 1)) * e / 2;
+};
diff --git a/source/node_modules/es5-ext/math/tanh/implement.js b/source/node_modules/es5-ext/math/tanh/implement.js
new file mode 100644
index 000000000..5199a029c
--- /dev/null
+++ b/source/node_modules/es5-ext/math/tanh/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'tanh', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/tanh/index.js b/source/node_modules/es5-ext/math/tanh/index.js
new file mode 100644
index 000000000..6099c408a
--- /dev/null
+++ b/source/node_modules/es5-ext/math/tanh/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.tanh
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/tanh/is-implemented.js b/source/node_modules/es5-ext/math/tanh/is-implemented.js
new file mode 100644
index 000000000..a7d222371
--- /dev/null
+++ b/source/node_modules/es5-ext/math/tanh/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var tanh = Math.tanh;
+ if (typeof tanh !== 'function') return false;
+ return ((tanh(1) === 0.7615941559557649) && (tanh(Number.MAX_VALUE) === 1));
+};
diff --git a/source/node_modules/es5-ext/math/tanh/shim.js b/source/node_modules/es5-ext/math/tanh/shim.js
new file mode 100644
index 000000000..f6e948f2c
--- /dev/null
+++ b/source/node_modules/es5-ext/math/tanh/shim.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var exp = Math.exp;
+
+module.exports = function (x) {
+ var a, b;
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (x === Infinity) return 1;
+ if (x === -Infinity) return -1;
+ a = exp(x);
+ if (a === Infinity) return 1;
+ b = exp(-x);
+ if (b === Infinity) return -1;
+ return (a - b) / (a + b);
+};
diff --git a/source/node_modules/es5-ext/math/trunc/implement.js b/source/node_modules/es5-ext/math/trunc/implement.js
new file mode 100644
index 000000000..3ee80ab2a
--- /dev/null
+++ b/source/node_modules/es5-ext/math/trunc/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Math, 'trunc', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/math/trunc/index.js b/source/node_modules/es5-ext/math/trunc/index.js
new file mode 100644
index 000000000..0b0f9b2ac
--- /dev/null
+++ b/source/node_modules/es5-ext/math/trunc/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Math.trunc
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/math/trunc/is-implemented.js b/source/node_modules/es5-ext/math/trunc/is-implemented.js
new file mode 100644
index 000000000..3e8cde1f0
--- /dev/null
+++ b/source/node_modules/es5-ext/math/trunc/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var trunc = Math.trunc;
+ if (typeof trunc !== 'function') return false;
+ return (trunc(13.67) === 13) && (trunc(-13.67) === -13);
+};
diff --git a/source/node_modules/es5-ext/math/trunc/shim.js b/source/node_modules/es5-ext/math/trunc/shim.js
new file mode 100644
index 000000000..02e2c2ad3
--- /dev/null
+++ b/source/node_modules/es5-ext/math/trunc/shim.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var floor = Math.floor;
+
+module.exports = function (x) {
+ if (isNaN(x)) return NaN;
+ x = Number(x);
+ if (x === 0) return x;
+ if (x === Infinity) return Infinity;
+ if (x === -Infinity) return -Infinity;
+ if (x > 0) return floor(x);
+ return -floor(-x);
+};
diff --git a/source/node_modules/es5-ext/number/#/index.js b/source/node_modules/es5-ext/number/#/index.js
new file mode 100644
index 000000000..324811704
--- /dev/null
+++ b/source/node_modules/es5-ext/number/#/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = {
+ pad: require('./pad')
+};
diff --git a/source/node_modules/es5-ext/number/#/pad.js b/source/node_modules/es5-ext/number/#/pad.js
new file mode 100644
index 000000000..4478f6a11
--- /dev/null
+++ b/source/node_modules/es5-ext/number/#/pad.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var pad = require('../../string/#/pad')
+ , toPosInt = require('../to-pos-integer')
+
+ , toFixed = Number.prototype.toFixed;
+
+module.exports = function (length/*, precision*/) {
+ var precision;
+ length = toPosInt(length);
+ precision = toPosInt(arguments[1]);
+
+ return pad.call(precision ? toFixed.call(this, precision) : this,
+ '0', length + (precision ? (1 + precision) : 0));
+};
diff --git a/source/node_modules/es5-ext/number/epsilon/implement.js b/source/node_modules/es5-ext/number/epsilon/implement.js
new file mode 100644
index 000000000..f0a670ae3
--- /dev/null
+++ b/source/node_modules/es5-ext/number/epsilon/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'EPSILON', { value: require('./'),
+ configurable: false, enumerable: false, writable: false });
+}
diff --git a/source/node_modules/es5-ext/number/epsilon/index.js b/source/node_modules/es5-ext/number/epsilon/index.js
new file mode 100644
index 000000000..4e4b621b7
--- /dev/null
+++ b/source/node_modules/es5-ext/number/epsilon/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = 2.220446049250313e-16;
diff --git a/source/node_modules/es5-ext/number/epsilon/is-implemented.js b/source/node_modules/es5-ext/number/epsilon/is-implemented.js
new file mode 100644
index 000000000..141f5d2f2
--- /dev/null
+++ b/source/node_modules/es5-ext/number/epsilon/is-implemented.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function () {
+ return (typeof Number.EPSILON === 'number');
+};
diff --git a/source/node_modules/es5-ext/number/index.js b/source/node_modules/es5-ext/number/index.js
new file mode 100644
index 000000000..841b3612c
--- /dev/null
+++ b/source/node_modules/es5-ext/number/index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ EPSILON: require('./epsilon'),
+ isFinite: require('./is-finite'),
+ isInteger: require('./is-integer'),
+ isNaN: require('./is-nan'),
+ isNatural: require('./is-natural'),
+ isNumber: require('./is-number'),
+ isSafeInteger: require('./is-safe-integer'),
+ MAX_SAFE_INTEGER: require('./max-safe-integer'),
+ MIN_SAFE_INTEGER: require('./min-safe-integer'),
+ toInteger: require('./to-integer'),
+ toPosInteger: require('./to-pos-integer'),
+ toUint32: require('./to-uint32')
+};
diff --git a/source/node_modules/es5-ext/number/is-finite/implement.js b/source/node_modules/es5-ext/number/is-finite/implement.js
new file mode 100644
index 000000000..51d7cac07
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-finite/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'isFinite', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/number/is-finite/index.js b/source/node_modules/es5-ext/number/is-finite/index.js
new file mode 100644
index 000000000..15d5f4058
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-finite/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Number.isFinite
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/number/is-finite/is-implemented.js b/source/node_modules/es5-ext/number/is-finite/is-implemented.js
new file mode 100644
index 000000000..556e396bb
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-finite/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var isFinite = Number.isFinite;
+ if (typeof isFinite !== 'function') return false;
+ return !isFinite('23') && isFinite(34) && !isFinite(Infinity);
+};
diff --git a/source/node_modules/es5-ext/number/is-finite/shim.js b/source/node_modules/es5-ext/number/is-finite/shim.js
new file mode 100644
index 000000000..e3aee551a
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-finite/shim.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (value) {
+ return (typeof value === 'number') && isFinite(value);
+};
diff --git a/source/node_modules/es5-ext/number/is-integer/implement.js b/source/node_modules/es5-ext/number/is-integer/implement.js
new file mode 100644
index 000000000..fe53f2814
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-integer/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'isInteger', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/number/is-integer/index.js b/source/node_modules/es5-ext/number/is-integer/index.js
new file mode 100644
index 000000000..55e039a99
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-integer/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Number.isInteger
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/number/is-integer/is-implemented.js b/source/node_modules/es5-ext/number/is-integer/is-implemented.js
new file mode 100644
index 000000000..a0e573be7
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-integer/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var isInteger = Number.isInteger;
+ if (typeof isInteger !== 'function') return false;
+ return !isInteger('23') && isInteger(34) && !isInteger(32.34);
+};
diff --git a/source/node_modules/es5-ext/number/is-integer/shim.js b/source/node_modules/es5-ext/number/is-integer/shim.js
new file mode 100644
index 000000000..540293980
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-integer/shim.js
@@ -0,0 +1,8 @@
+// Credit: http://www.2ality.com/2014/05/is-integer.html
+
+'use strict';
+
+module.exports = function (value) {
+ if (typeof value !== 'number') return false;
+ return (value % 1 === 0);
+};
diff --git a/source/node_modules/es5-ext/number/is-nan/implement.js b/source/node_modules/es5-ext/number/is-nan/implement.js
new file mode 100644
index 000000000..e1c5deea3
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-nan/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'isNaN', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/number/is-nan/index.js b/source/node_modules/es5-ext/number/is-nan/index.js
new file mode 100644
index 000000000..3b2c4ca6b
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-nan/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Number.isNaN
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/number/is-nan/is-implemented.js b/source/node_modules/es5-ext/number/is-nan/is-implemented.js
new file mode 100644
index 000000000..4cf276656
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-nan/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var isNaN = Number.isNaN;
+ if (typeof isNaN !== 'function') return false;
+ return !isNaN({}) && isNaN(NaN) && !isNaN(34);
+};
diff --git a/source/node_modules/es5-ext/number/is-nan/shim.js b/source/node_modules/es5-ext/number/is-nan/shim.js
new file mode 100644
index 000000000..070d96cd4
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-nan/shim.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (value) { return (value !== value); } //jslint: ignore
diff --git a/source/node_modules/es5-ext/number/is-natural.js b/source/node_modules/es5-ext/number/is-natural.js
new file mode 100644
index 000000000..831090d23
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-natural.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isInteger = require('./is-integer');
+
+module.exports = function (num) { return isInteger(num) && (num >= 0); };
diff --git a/source/node_modules/es5-ext/number/is-number.js b/source/node_modules/es5-ext/number/is-number.js
new file mode 100644
index 000000000..19a99e4f1
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-number.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call(1);
+
+module.exports = function (x) {
+ return ((typeof x === 'number') ||
+ ((x instanceof Number) ||
+ ((typeof x === 'object') && (toString.call(x) === id))));
+};
diff --git a/source/node_modules/es5-ext/number/is-safe-integer/implement.js b/source/node_modules/es5-ext/number/is-safe-integer/implement.js
new file mode 100644
index 000000000..51cef9602
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-safe-integer/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'isSafeInteger', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/number/is-safe-integer/index.js b/source/node_modules/es5-ext/number/is-safe-integer/index.js
new file mode 100644
index 000000000..49adeaaf7
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-safe-integer/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Number.isSafeInteger
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/source/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
new file mode 100644
index 000000000..510b60e4e
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function () {
+ var isSafeInteger = Number.isSafeInteger;
+ if (typeof isSafeInteger !== 'function') return false;
+ return !isSafeInteger('23') && isSafeInteger(34232322323) &&
+ !isSafeInteger(9007199254740992);
+};
diff --git a/source/node_modules/es5-ext/number/is-safe-integer/shim.js b/source/node_modules/es5-ext/number/is-safe-integer/shim.js
new file mode 100644
index 000000000..692acdd6c
--- /dev/null
+++ b/source/node_modules/es5-ext/number/is-safe-integer/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var isInteger = require('../is-integer/shim')
+ , maxValue = require('../max-safe-integer')
+
+ , abs = Math.abs;
+
+module.exports = function (value) {
+ if (!isInteger(value)) return false;
+ return abs(value) <= maxValue;
+};
diff --git a/source/node_modules/es5-ext/number/max-safe-integer/implement.js b/source/node_modules/es5-ext/number/max-safe-integer/implement.js
new file mode 100644
index 000000000..4e0bb5741
--- /dev/null
+++ b/source/node_modules/es5-ext/number/max-safe-integer/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'MAX_SAFE_INTEGER', { value: require('./'),
+ configurable: false, enumerable: false, writable: false });
+}
diff --git a/source/node_modules/es5-ext/number/max-safe-integer/index.js b/source/node_modules/es5-ext/number/max-safe-integer/index.js
new file mode 100644
index 000000000..ed5d6a537
--- /dev/null
+++ b/source/node_modules/es5-ext/number/max-safe-integer/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = Math.pow(2, 53) - 1;
diff --git a/source/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/source/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
new file mode 100644
index 000000000..7bd08a9da
--- /dev/null
+++ b/source/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function () {
+ return (typeof Number.MAX_SAFE_INTEGER === 'number');
+};
diff --git a/source/node_modules/es5-ext/number/min-safe-integer/implement.js b/source/node_modules/es5-ext/number/min-safe-integer/implement.js
new file mode 100644
index 000000000..e3f110e41
--- /dev/null
+++ b/source/node_modules/es5-ext/number/min-safe-integer/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Number, 'MIN_SAFE_INTEGER', { value: require('./'),
+ configurable: false, enumerable: false, writable: false });
+}
diff --git a/source/node_modules/es5-ext/number/min-safe-integer/index.js b/source/node_modules/es5-ext/number/min-safe-integer/index.js
new file mode 100644
index 000000000..1c6cc2744
--- /dev/null
+++ b/source/node_modules/es5-ext/number/min-safe-integer/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = -(Math.pow(2, 53) - 1);
diff --git a/source/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/source/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
new file mode 100644
index 000000000..efc9875f4
--- /dev/null
+++ b/source/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function () {
+ return (typeof Number.MIN_SAFE_INTEGER === 'number');
+};
diff --git a/source/node_modules/es5-ext/number/to-integer.js b/source/node_modules/es5-ext/number/to-integer.js
new file mode 100644
index 000000000..60e798c5f
--- /dev/null
+++ b/source/node_modules/es5-ext/number/to-integer.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var sign = require('../math/sign')
+
+ , abs = Math.abs, floor = Math.floor;
+
+module.exports = function (value) {
+ if (isNaN(value)) return 0;
+ value = Number(value);
+ if ((value === 0) || !isFinite(value)) return value;
+ return sign(value) * floor(abs(value));
+};
diff --git a/source/node_modules/es5-ext/number/to-pos-integer.js b/source/node_modules/es5-ext/number/to-pos-integer.js
new file mode 100644
index 000000000..605a302c7
--- /dev/null
+++ b/source/node_modules/es5-ext/number/to-pos-integer.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var toInteger = require('./to-integer')
+
+ , max = Math.max;
+
+module.exports = function (value) { return max(0, toInteger(value)); };
diff --git a/source/node_modules/es5-ext/number/to-uint32.js b/source/node_modules/es5-ext/number/to-uint32.js
new file mode 100644
index 000000000..6263e85ed
--- /dev/null
+++ b/source/node_modules/es5-ext/number/to-uint32.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (value) { return value >>> 0; };
diff --git a/source/node_modules/es5-ext/object/_iterate.js b/source/node_modules/es5-ext/object/_iterate.js
new file mode 100644
index 000000000..1ccbaf274
--- /dev/null
+++ b/source/node_modules/es5-ext/object/_iterate.js
@@ -0,0 +1,29 @@
+// Internal method, used by iteration functions.
+// Calls a function for each key-value pair found in object
+// Optionally takes compareFn to iterate object in specific order
+
+'use strict';
+
+var callable = require('./valid-callable')
+ , value = require('./valid-value')
+
+ , bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
+ , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+module.exports = function (method, defVal) {
+ return function (obj, cb/*, thisArg, compareFn*/) {
+ var list, thisArg = arguments[2], compareFn = arguments[3];
+ obj = Object(value(obj));
+ callable(cb);
+
+ list = keys(obj);
+ if (compareFn) {
+ list.sort((typeof compareFn === 'function') ? bind.call(compareFn, obj) : undefined);
+ }
+ if (typeof method !== 'function') method = list[method];
+ return call.call(method, list, function (key, index) {
+ if (!propertyIsEnumerable.call(obj, key)) return defVal;
+ return call.call(cb, thisArg, obj[key], key, obj, index);
+ });
+ };
+};
diff --git a/source/node_modules/es5-ext/object/assign/implement.js b/source/node_modules/es5-ext/object/assign/implement.js
new file mode 100644
index 000000000..3bcc68e31
--- /dev/null
+++ b/source/node_modules/es5-ext/object/assign/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Object, 'assign', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/object/assign/index.js b/source/node_modules/es5-ext/object/assign/index.js
new file mode 100644
index 000000000..ab0f9f249
--- /dev/null
+++ b/source/node_modules/es5-ext/object/assign/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Object.assign
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/object/assign/is-implemented.js b/source/node_modules/es5-ext/object/assign/is-implemented.js
new file mode 100644
index 000000000..579ad2ddc
--- /dev/null
+++ b/source/node_modules/es5-ext/object/assign/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function () {
+ var assign = Object.assign, obj;
+ if (typeof assign !== 'function') return false;
+ obj = { foo: 'raz' };
+ assign(obj, { bar: 'dwa' }, { trzy: 'trzy' });
+ return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy';
+};
diff --git a/source/node_modules/es5-ext/object/assign/shim.js b/source/node_modules/es5-ext/object/assign/shim.js
new file mode 100644
index 000000000..74da11a86
--- /dev/null
+++ b/source/node_modules/es5-ext/object/assign/shim.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var keys = require('../keys')
+ , value = require('../valid-value')
+
+ , max = Math.max;
+
+module.exports = function (dest, src/*, …srcn*/) {
+ var error, i, l = max(arguments.length, 2), assign;
+ dest = Object(value(dest));
+ assign = function (key) {
+ try { dest[key] = src[key]; } catch (e) {
+ if (!error) error = e;
+ }
+ };
+ for (i = 1; i < l; ++i) {
+ src = arguments[i];
+ keys(src).forEach(assign);
+ }
+ if (error !== undefined) throw error;
+ return dest;
+};
diff --git a/source/node_modules/es5-ext/object/clear.js b/source/node_modules/es5-ext/object/clear.js
new file mode 100644
index 000000000..85e463728
--- /dev/null
+++ b/source/node_modules/es5-ext/object/clear.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var keys = require('./keys');
+
+module.exports = function (obj) {
+ var error;
+ keys(obj).forEach(function (key) {
+ try {
+ delete this[key];
+ } catch (e) {
+ if (!error) error = e;
+ }
+ }, obj);
+ if (error !== undefined) throw error;
+ return obj;
+};
diff --git a/source/node_modules/es5-ext/object/compact.js b/source/node_modules/es5-ext/object/compact.js
new file mode 100644
index 000000000..d021da457
--- /dev/null
+++ b/source/node_modules/es5-ext/object/compact.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var filter = require('./filter');
+
+module.exports = function (obj) {
+ return filter(obj, function (val) { return val != null; });
+};
diff --git a/source/node_modules/es5-ext/object/compare.js b/source/node_modules/es5-ext/object/compare.js
new file mode 100644
index 000000000..2ab11f1a3
--- /dev/null
+++ b/source/node_modules/es5-ext/object/compare.js
@@ -0,0 +1,42 @@
+'use strict';
+
+var strCompare = require('../string/#/case-insensitive-compare')
+ , isObject = require('./is-object')
+
+ , resolve, typeMap;
+
+typeMap = {
+ undefined: 0,
+ object: 1,
+ boolean: 2,
+ string: 3,
+ number: 4
+};
+
+resolve = function (a) {
+ if (isObject(a)) {
+ if (typeof a.valueOf !== 'function') return NaN;
+ a = a.valueOf();
+ if (isObject(a)) {
+ if (typeof a.toString !== 'function') return NaN;
+ a = a.toString();
+ if (typeof a !== 'string') return NaN;
+ }
+ }
+ return a;
+};
+
+module.exports = function (a, b) {
+ if (a === b) return 0; // Same
+
+ a = resolve(a);
+ b = resolve(b);
+ if (a == b) return typeMap[typeof a] - typeMap[typeof b]; //jslint: ignore
+ if (a == null) return -1;
+ if (b == null) return 1;
+ if ((typeof a === 'string') || (typeof b === 'string')) {
+ return strCompare.call(a, b);
+ }
+ if ((a !== a) && (b !== b)) return 0; //jslint: ignore
+ return Number(a) - Number(b);
+};
diff --git a/source/node_modules/es5-ext/object/copy-deep.js b/source/node_modules/es5-ext/object/copy-deep.js
new file mode 100644
index 000000000..b203a7c69
--- /dev/null
+++ b/source/node_modules/es5-ext/object/copy-deep.js
@@ -0,0 +1,38 @@
+'use strict';
+
+var forEach = require('./for-each')
+ , isPlainObject = require('./is-plain-object')
+ , value = require('./valid-value')
+
+ , isArray = Array.isArray
+ , copy, copyItem;
+
+copyItem = function (value, key) {
+ var index;
+ if (!isPlainObject(value) && !isArray(value)) return value;
+ index = this[0].indexOf(value);
+ if (index === -1) return copy.call(this, value);
+ return this[1][index];
+};
+
+copy = function (source) {
+ var target = isArray(source) ? [] : {};
+ this[0].push(source);
+ this[1].push(target);
+ if (isArray(source)) {
+ source.forEach(function (value, key) {
+ target[key] = copyItem.call(this, value, key);
+ }, this);
+ } else {
+ forEach(source, function (value, key) {
+ target[key] = copyItem.call(this, value, key);
+ }, this);
+ }
+ return target;
+};
+
+module.exports = function (source) {
+ var obj = Object(value(source));
+ if (obj !== source) return obj;
+ return copy.call([[], []], obj);
+};
diff --git a/source/node_modules/es5-ext/object/copy.js b/source/node_modules/es5-ext/object/copy.js
new file mode 100644
index 000000000..4d7177285
--- /dev/null
+++ b/source/node_modules/es5-ext/object/copy.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var assign = require('./assign')
+ , value = require('./valid-value');
+
+module.exports = function (obj) {
+ var copy = Object(value(obj));
+ if (copy !== obj) return copy;
+ return assign({}, obj);
+};
diff --git a/source/node_modules/es5-ext/object/count.js b/source/node_modules/es5-ext/object/count.js
new file mode 100644
index 000000000..29cfbb53f
--- /dev/null
+++ b/source/node_modules/es5-ext/object/count.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var keys = require('./keys');
+
+module.exports = function (obj) { return keys(obj).length; };
diff --git a/source/node_modules/es5-ext/object/create.js b/source/node_modules/es5-ext/object/create.js
new file mode 100644
index 000000000..f813b4661
--- /dev/null
+++ b/source/node_modules/es5-ext/object/create.js
@@ -0,0 +1,36 @@
+// Workaround for http://code.google.com/p/v8/issues/detail?id=2804
+
+'use strict';
+
+var create = Object.create, shim;
+
+if (!require('./set-prototype-of/is-implemented')()) {
+ shim = require('./set-prototype-of/shim');
+}
+
+module.exports = (function () {
+ var nullObject, props, desc;
+ if (!shim) return create;
+ if (shim.level !== 1) return create;
+
+ nullObject = {};
+ props = {};
+ desc = { configurable: false, enumerable: false, writable: true,
+ value: undefined };
+ Object.getOwnPropertyNames(Object.prototype).forEach(function (name) {
+ if (name === '__proto__') {
+ props[name] = { configurable: true, enumerable: false, writable: true,
+ value: undefined };
+ return;
+ }
+ props[name] = desc;
+ });
+ Object.defineProperties(nullObject, props);
+
+ Object.defineProperty(shim, 'nullPolyfill', { configurable: false,
+ enumerable: false, writable: false, value: nullObject });
+
+ return function (prototype, props) {
+ return create((prototype === null) ? nullObject : prototype, props);
+ };
+}());
diff --git a/source/node_modules/es5-ext/object/ensure-natural-number-value.js b/source/node_modules/es5-ext/object/ensure-natural-number-value.js
new file mode 100644
index 000000000..f58fb4e4a
--- /dev/null
+++ b/source/node_modules/es5-ext/object/ensure-natural-number-value.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var ensure = require('./ensure-natural-number');
+
+module.exports = function (arg) {
+ if (arg == null) throw new TypeError(arg + " is not a natural number");
+ return ensure(arg);
+};
diff --git a/source/node_modules/es5-ext/object/ensure-natural-number.js b/source/node_modules/es5-ext/object/ensure-natural-number.js
new file mode 100644
index 000000000..af9b4d77c
--- /dev/null
+++ b/source/node_modules/es5-ext/object/ensure-natural-number.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var isNatural = require('../number/is-natural');
+
+module.exports = function (arg) {
+ var num = Number(arg);
+ if (!isNatural(num)) throw new TypeError(arg + " is not a natural number");
+ return num;
+};
diff --git a/source/node_modules/es5-ext/object/eq.js b/source/node_modules/es5-ext/object/eq.js
new file mode 100644
index 000000000..037937ea6
--- /dev/null
+++ b/source/node_modules/es5-ext/object/eq.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (x, y) {
+ return ((x === y) || ((x !== x) && (y !== y))); //jslint: ignore
+};
diff --git a/source/node_modules/es5-ext/object/every.js b/source/node_modules/es5-ext/object/every.js
new file mode 100644
index 000000000..1303db209
--- /dev/null
+++ b/source/node_modules/es5-ext/object/every.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_iterate')('every', true);
diff --git a/source/node_modules/es5-ext/object/filter.js b/source/node_modules/es5-ext/object/filter.js
new file mode 100644
index 000000000..e5edb49b1
--- /dev/null
+++ b/source/node_modules/es5-ext/object/filter.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var callable = require('./valid-callable')
+ , forEach = require('./for-each')
+
+ , call = Function.prototype.call;
+
+module.exports = function (obj, cb/*, thisArg*/) {
+ var o = {}, thisArg = arguments[2];
+ callable(cb);
+ forEach(obj, function (value, key, obj, index) {
+ if (call.call(cb, thisArg, value, key, obj, index)) o[key] = obj[key];
+ });
+ return o;
+};
diff --git a/source/node_modules/es5-ext/object/find-key.js b/source/node_modules/es5-ext/object/find-key.js
new file mode 100644
index 000000000..5841fd709
--- /dev/null
+++ b/source/node_modules/es5-ext/object/find-key.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_iterate')(require('../array/#/find'), false);
diff --git a/source/node_modules/es5-ext/object/find.js b/source/node_modules/es5-ext/object/find.js
new file mode 100644
index 000000000..c94f643f3
--- /dev/null
+++ b/source/node_modules/es5-ext/object/find.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var findKey = require('./find-key');
+
+module.exports = function (obj, cb/*, thisArg, compareFn*/) {
+ var key = findKey.apply(this, arguments);
+ return (key == null) ? key : obj[key];
+};
diff --git a/source/node_modules/es5-ext/object/first-key.js b/source/node_modules/es5-ext/object/first-key.js
new file mode 100644
index 000000000..7df10b2f7
--- /dev/null
+++ b/source/node_modules/es5-ext/object/first-key.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var value = require('./valid-value')
+
+ , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+module.exports = function (obj) {
+ var i;
+ value(obj);
+ for (i in obj) {
+ if (propertyIsEnumerable.call(obj, i)) return i;
+ }
+ return null;
+};
diff --git a/source/node_modules/es5-ext/object/flatten.js b/source/node_modules/es5-ext/object/flatten.js
new file mode 100644
index 000000000..e8b40444a
--- /dev/null
+++ b/source/node_modules/es5-ext/object/flatten.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var isPlainObject = require('./is-plain-object')
+ , forEach = require('./for-each')
+
+ , process;
+
+process = function self(value, key) {
+ if (isPlainObject(value)) forEach(value, self, this);
+ else this[key] = value;
+};
+
+module.exports = function (obj) {
+ var flattened = {};
+ forEach(obj, process, flattened);
+ return flattened;
+};
diff --git a/source/node_modules/es5-ext/object/for-each.js b/source/node_modules/es5-ext/object/for-each.js
new file mode 100644
index 000000000..6674f8a61
--- /dev/null
+++ b/source/node_modules/es5-ext/object/for-each.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_iterate')('forEach');
diff --git a/source/node_modules/es5-ext/object/get-property-names.js b/source/node_modules/es5-ext/object/get-property-names.js
new file mode 100644
index 000000000..54a01e504
--- /dev/null
+++ b/source/node_modules/es5-ext/object/get-property-names.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var uniq = require('../array/#/uniq')
+ , value = require('./valid-value')
+
+ , push = Array.prototype.push
+ , getOwnPropertyNames = Object.getOwnPropertyNames
+ , getPrototypeOf = Object.getPrototypeOf;
+
+module.exports = function (obj) {
+ var keys;
+ obj = Object(value(obj));
+ keys = getOwnPropertyNames(obj);
+ while ((obj = getPrototypeOf(obj))) {
+ push.apply(keys, getOwnPropertyNames(obj));
+ }
+ return uniq.call(keys);
+};
diff --git a/source/node_modules/es5-ext/object/index.js b/source/node_modules/es5-ext/object/index.js
new file mode 100644
index 000000000..77f5b6aeb
--- /dev/null
+++ b/source/node_modules/es5-ext/object/index.js
@@ -0,0 +1,53 @@
+'use strict';
+
+module.exports = {
+ assign: require('./assign'),
+ clear: require('./clear'),
+ compact: require('./compact'),
+ compare: require('./compare'),
+ copy: require('./copy'),
+ copyDeep: require('./copy-deep'),
+ count: require('./count'),
+ create: require('./create'),
+ ensureNaturalNumber: require('./ensure-natural-number'),
+ ensureNaturalNumberValue: require('./ensure-natural-number-value'),
+ eq: require('./eq'),
+ every: require('./every'),
+ filter: require('./filter'),
+ find: require('./find'),
+ findKey: require('./find-key'),
+ firstKey: require('./first-key'),
+ flatten: require('./flatten'),
+ forEach: require('./for-each'),
+ getPropertyNames: require('./get-property-names'),
+ is: require('./is'),
+ isArrayLike: require('./is-array-like'),
+ isCallable: require('./is-callable'),
+ isCopy: require('./is-copy'),
+ isCopyDeep: require('./is-copy-deep'),
+ isEmpty: require('./is-empty'),
+ isNumberValue: require('./is-number-value'),
+ isObject: require('./is-object'),
+ isPlainObject: require('./is-plain-object'),
+ keyOf: require('./key-of'),
+ keys: require('./keys'),
+ map: require('./map'),
+ mapKeys: require('./map-keys'),
+ normalizeOptions: require('./normalize-options'),
+ mixin: require('./mixin'),
+ mixinPrototypes: require('./mixin-prototypes'),
+ primitiveSet: require('./primitive-set'),
+ safeTraverse: require('./safe-traverse'),
+ serialize: require('./serialize'),
+ setPrototypeOf: require('./set-prototype-of'),
+ some: require('./some'),
+ toArray: require('./to-array'),
+ unserialize: require('./unserialize'),
+ validateArrayLike: require('./validate-array-like'),
+ validateArrayLikeObject: require('./validate-array-like-object'),
+ validCallable: require('./valid-callable'),
+ validObject: require('./valid-object'),
+ validateStringifiable: require('./validate-stringifiable'),
+ validateStringifiableValue: require('./validate-stringifiable-value'),
+ validValue: require('./valid-value')
+};
diff --git a/source/node_modules/es5-ext/object/is-array-like.js b/source/node_modules/es5-ext/object/is-array-like.js
new file mode 100644
index 000000000..b8beed225
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-array-like.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var isFunction = require('../function/is-function')
+ , isObject = require('./is-object');
+
+module.exports = function (x) {
+ return ((x != null) && (typeof x.length === 'number') &&
+
+ // Just checking ((typeof x === 'object') && (typeof x !== 'function'))
+ // won't work right for some cases, e.g.:
+ // type of instance of NodeList in Safari is a 'function'
+
+ ((isObject(x) && !isFunction(x)) || (typeof x === "string"))) || false;
+};
diff --git a/source/node_modules/es5-ext/object/is-callable.js b/source/node_modules/es5-ext/object/is-callable.js
new file mode 100644
index 000000000..5d5d4b316
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-callable.js
@@ -0,0 +1,5 @@
+// Deprecated
+
+'use strict';
+
+module.exports = function (obj) { return typeof obj === 'function'; };
diff --git a/source/node_modules/es5-ext/object/is-copy-deep.js b/source/node_modules/es5-ext/object/is-copy-deep.js
new file mode 100644
index 000000000..c4b2b42b1
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-copy-deep.js
@@ -0,0 +1,58 @@
+'use strict';
+
+var eq = require('./eq')
+ , isPlainObject = require('./is-plain-object')
+ , value = require('./valid-value')
+
+ , isArray = Array.isArray, keys = Object.keys
+ , propertyIsEnumerable = Object.prototype.propertyIsEnumerable
+
+ , eqArr, eqVal, eqObj;
+
+eqArr = function (a, b, recMap) {
+ var i, l = a.length;
+ if (l !== b.length) return false;
+ for (i = 0; i < l; ++i) {
+ if (a.hasOwnProperty(i) !== b.hasOwnProperty(i)) return false;
+ if (!eqVal(a[i], b[i], recMap)) return false;
+ }
+ return true;
+};
+
+eqObj = function (a, b, recMap) {
+ var k1 = keys(a), k2 = keys(b);
+ if (k1.length !== k2.length) return false;
+ return k1.every(function (key) {
+ if (!propertyIsEnumerable.call(b, key)) return false;
+ return eqVal(a[key], b[key], recMap);
+ });
+};
+
+eqVal = function (a, b, recMap) {
+ var i, eqX, c1, c2;
+ if (eq(a, b)) return true;
+ if (isPlainObject(a)) {
+ if (!isPlainObject(b)) return false;
+ eqX = eqObj;
+ } else if (isArray(a) && isArray(b)) {
+ eqX = eqArr;
+ } else {
+ return false;
+ }
+ c1 = recMap[0];
+ c2 = recMap[1];
+ i = c1.indexOf(a);
+ if (i !== -1) {
+ if (c2[i].indexOf(b) !== -1) return true;
+ } else {
+ i = c1.push(a) - 1;
+ c2[i] = [];
+ }
+ c2[i].push(b);
+ return eqX(a, b, recMap);
+};
+
+module.exports = function (a, b) {
+ if (eq(value(a), value(b))) return true;
+ return eqVal(Object(a), Object(b), [[], []]);
+};
diff --git a/source/node_modules/es5-ext/object/is-copy.js b/source/node_modules/es5-ext/object/is-copy.js
new file mode 100644
index 000000000..4fe639d4e
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-copy.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var eq = require('./eq')
+ , value = require('./valid-value')
+
+ , keys = Object.keys
+ , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+module.exports = function (a, b) {
+ var k1, k2;
+
+ if (eq(value(a), value(b))) return true;
+
+ a = Object(a);
+ b = Object(b);
+
+ k1 = keys(a);
+ k2 = keys(b);
+ if (k1.length !== k2.length) return false;
+ return k1.every(function (key) {
+ if (!propertyIsEnumerable.call(b, key)) return false;
+ return eq(a[key], b[key]);
+ });
+};
diff --git a/source/node_modules/es5-ext/object/is-empty.js b/source/node_modules/es5-ext/object/is-empty.js
new file mode 100644
index 000000000..7b51a87cf
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-empty.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var value = require('./valid-value')
+
+ , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+module.exports = function (obj) {
+ var i;
+ value(obj);
+ for (i in obj) { //jslint: ignore
+ if (propertyIsEnumerable.call(obj, i)) return false;
+ }
+ return true;
+};
diff --git a/source/node_modules/es5-ext/object/is-number-value.js b/source/node_modules/es5-ext/object/is-number-value.js
new file mode 100644
index 000000000..f6396f580
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-number-value.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (value) { return (value != null) && !isNaN(value); };
diff --git a/source/node_modules/es5-ext/object/is-object.js b/source/node_modules/es5-ext/object/is-object.js
new file mode 100644
index 000000000..a86facf18
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-object.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var map = { function: true, object: true };
+
+module.exports = function (x) {
+ return ((x != null) && map[typeof x]) || false;
+};
diff --git a/source/node_modules/es5-ext/object/is-plain-object.js b/source/node_modules/es5-ext/object/is-plain-object.js
new file mode 100644
index 000000000..9a2823198
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is-plain-object.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var getPrototypeOf = Object.getPrototypeOf, prototype = Object.prototype
+ , toString = prototype.toString
+
+ , id = Object().toString();
+
+module.exports = function (value) {
+ var proto, constructor;
+ if (!value || (typeof value !== 'object') || (toString.call(value) !== id)) {
+ return false;
+ }
+ proto = getPrototypeOf(value);
+ if (proto === null) {
+ constructor = value.constructor;
+ if (typeof constructor !== 'function') return true;
+ return (constructor.prototype !== value);
+ }
+ return (proto === prototype) || (getPrototypeOf(proto) === null);
+};
diff --git a/source/node_modules/es5-ext/object/is.js b/source/node_modules/es5-ext/object/is.js
new file mode 100644
index 000000000..5778b502d
--- /dev/null
+++ b/source/node_modules/es5-ext/object/is.js
@@ -0,0 +1,10 @@
+// Implementation credits go to:
+// http://wiki.ecmascript.org/doku.php?id=harmony:egal
+
+'use strict';
+
+module.exports = function (x, y) {
+ return (x === y) ?
+ ((x !== 0) || ((1 / x) === (1 / y))) :
+ ((x !== x) && (y !== y)); //jslint: ignore
+};
diff --git a/source/node_modules/es5-ext/object/key-of.js b/source/node_modules/es5-ext/object/key-of.js
new file mode 100644
index 000000000..8c44c8d80
--- /dev/null
+++ b/source/node_modules/es5-ext/object/key-of.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var eq = require('./eq')
+ , some = require('./some');
+
+module.exports = function (obj, searchValue) {
+ var r;
+ return some(obj, function (value, name) {
+ if (eq(value, searchValue)) {
+ r = name;
+ return true;
+ }
+ return false;
+ }) ? r : null;
+};
diff --git a/source/node_modules/es5-ext/object/keys/implement.js b/source/node_modules/es5-ext/object/keys/implement.js
new file mode 100644
index 000000000..c6872bd02
--- /dev/null
+++ b/source/node_modules/es5-ext/object/keys/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(Object, 'keys', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/object/keys/index.js b/source/node_modules/es5-ext/object/keys/index.js
new file mode 100644
index 000000000..5ef052233
--- /dev/null
+++ b/source/node_modules/es5-ext/object/keys/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Object.keys
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/object/keys/is-implemented.js b/source/node_modules/es5-ext/object/keys/is-implemented.js
new file mode 100644
index 000000000..40c32c339
--- /dev/null
+++ b/source/node_modules/es5-ext/object/keys/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function () {
+ try {
+ Object.keys('primitive');
+ return true;
+ } catch (e) { return false; }
+};
diff --git a/source/node_modules/es5-ext/object/keys/shim.js b/source/node_modules/es5-ext/object/keys/shim.js
new file mode 100644
index 000000000..034b6b298
--- /dev/null
+++ b/source/node_modules/es5-ext/object/keys/shim.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var keys = Object.keys;
+
+module.exports = function (object) {
+ return keys(object == null ? object : Object(object));
+};
diff --git a/source/node_modules/es5-ext/object/map-keys.js b/source/node_modules/es5-ext/object/map-keys.js
new file mode 100644
index 000000000..26f0ecacb
--- /dev/null
+++ b/source/node_modules/es5-ext/object/map-keys.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var callable = require('./valid-callable')
+ , forEach = require('./for-each')
+
+ , call = Function.prototype.call;
+
+module.exports = function (obj, cb/*, thisArg*/) {
+ var o = {}, thisArg = arguments[2];
+ callable(cb);
+ forEach(obj, function (value, key, obj, index) {
+ o[call.call(cb, thisArg, key, value, this, index)] = value;
+ }, obj);
+ return o;
+};
diff --git a/source/node_modules/es5-ext/object/map.js b/source/node_modules/es5-ext/object/map.js
new file mode 100644
index 000000000..6b39d3c94
--- /dev/null
+++ b/source/node_modules/es5-ext/object/map.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var callable = require('./valid-callable')
+ , forEach = require('./for-each')
+
+ , call = Function.prototype.call;
+
+module.exports = function (obj, cb/*, thisArg*/) {
+ var o = {}, thisArg = arguments[2];
+ callable(cb);
+ forEach(obj, function (value, key, obj, index) {
+ o[key] = call.call(cb, thisArg, value, key, obj, index);
+ });
+ return o;
+};
diff --git a/source/node_modules/es5-ext/object/mixin-prototypes.js b/source/node_modules/es5-ext/object/mixin-prototypes.js
new file mode 100644
index 000000000..1ef575642
--- /dev/null
+++ b/source/node_modules/es5-ext/object/mixin-prototypes.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var value = require('./valid-value')
+ , mixin = require('./mixin')
+
+ , defineProperty = Object.defineProperty
+ , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
+ , getOwnPropertyNames = Object.getOwnPropertyNames
+ , getPrototypeOf = Object.getPrototypeOf
+ , hasOwnProperty = Object.prototype.hasOwnProperty;
+
+module.exports = function (target, source) {
+ var error, end, define;
+ target = Object(value(target));
+ source = Object(value(source));
+ end = getPrototypeOf(target);
+ if (source === end) return target;
+ try {
+ mixin(target, source);
+ } catch (e) { error = e; }
+ source = getPrototypeOf(source);
+ define = function (name) {
+ if (hasOwnProperty.call(target, name)) return;
+ try {
+ defineProperty(target, name, getOwnPropertyDescriptor(source, name));
+ } catch (e) { error = e; }
+ };
+ while (source && (source !== end)) {
+ getOwnPropertyNames(source).forEach(define);
+ source = getPrototypeOf(source);
+ }
+ if (error) throw error;
+ return target;
+};
diff --git a/source/node_modules/es5-ext/object/mixin.js b/source/node_modules/es5-ext/object/mixin.js
new file mode 100644
index 000000000..80b5df5e0
--- /dev/null
+++ b/source/node_modules/es5-ext/object/mixin.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var value = require('./valid-value')
+
+ , defineProperty = Object.defineProperty
+ , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
+ , getOwnPropertyNames = Object.getOwnPropertyNames;
+
+module.exports = function (target, source) {
+ var error;
+ target = Object(value(target));
+ getOwnPropertyNames(Object(value(source))).forEach(function (name) {
+ try {
+ defineProperty(target, name, getOwnPropertyDescriptor(source, name));
+ } catch (e) { error = e; }
+ });
+ if (error !== undefined) throw error;
+ return target;
+};
diff --git a/source/node_modules/es5-ext/object/normalize-options.js b/source/node_modules/es5-ext/object/normalize-options.js
new file mode 100644
index 000000000..cf8ed8d38
--- /dev/null
+++ b/source/node_modules/es5-ext/object/normalize-options.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var forEach = Array.prototype.forEach, create = Object.create;
+
+var process = function (src, obj) {
+ var key;
+ for (key in src) obj[key] = src[key];
+};
+
+module.exports = function (options/*, …options*/) {
+ var result = create(null);
+ forEach.call(arguments, function (options) {
+ if (options == null) return;
+ process(Object(options), result);
+ });
+ return result;
+};
diff --git a/source/node_modules/es5-ext/object/primitive-set.js b/source/node_modules/es5-ext/object/primitive-set.js
new file mode 100644
index 000000000..ada109510
--- /dev/null
+++ b/source/node_modules/es5-ext/object/primitive-set.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var forEach = Array.prototype.forEach, create = Object.create;
+
+module.exports = function (arg/*, …args*/) {
+ var set = create(null);
+ forEach.call(arguments, function (name) { set[name] = true; });
+ return set;
+};
diff --git a/source/node_modules/es5-ext/object/safe-traverse.js b/source/node_modules/es5-ext/object/safe-traverse.js
new file mode 100644
index 000000000..7e1b5f41e
--- /dev/null
+++ b/source/node_modules/es5-ext/object/safe-traverse.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var value = require('./valid-value');
+
+module.exports = function (obj/*, …names*/) {
+ var length, current = 1;
+ value(obj);
+ length = arguments.length - 1;
+ if (!length) return obj;
+ while (current < length) {
+ obj = obj[arguments[current++]];
+ if (obj == null) return undefined;
+ }
+ return obj[arguments[current]];
+};
diff --git a/source/node_modules/es5-ext/object/serialize.js b/source/node_modules/es5-ext/object/serialize.js
new file mode 100644
index 000000000..8113b6801
--- /dev/null
+++ b/source/node_modules/es5-ext/object/serialize.js
@@ -0,0 +1,36 @@
+'use strict';
+
+var toArray = require('./to-array')
+ , isDate = require('../date/is-date')
+ , isRegExp = require('../reg-exp/is-reg-exp')
+
+ , isArray = Array.isArray, stringify = JSON.stringify
+ , keyValueToString = function (value, key) { return stringify(key) + ':' + exports(value); };
+
+var sparseMap = function (arr) {
+ var i, l = arr.length, result = new Array(l);
+ for (i = 0; i < l; ++i) {
+ if (!arr.hasOwnProperty(i)) continue;
+ result[i] = exports(arr[i]);
+ }
+ return result;
+};
+
+module.exports = exports = function (obj) {
+ if (obj == null) return String(obj);
+ switch (typeof obj) {
+ case 'string':
+ return stringify(obj);
+ case 'number':
+ case 'boolean':
+ case 'function':
+ return String(obj);
+ case 'object':
+ if (isArray(obj)) return '[' + sparseMap(obj) + ']';
+ if (isRegExp(obj)) return String(obj);
+ if (isDate(obj)) return 'new Date(' + obj.valueOf() + ')';
+ return '{' + toArray(obj, keyValueToString) + '}';
+ default:
+ throw new TypeError("Serialization of " + String(obj) + "is unsupported");
+ }
+};
diff --git a/source/node_modules/es5-ext/object/set-prototype-of/implement.js b/source/node_modules/es5-ext/object/set-prototype-of/implement.js
new file mode 100644
index 000000000..000e6bdbb
--- /dev/null
+++ b/source/node_modules/es5-ext/object/set-prototype-of/implement.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var shim;
+
+if (!require('./is-implemented')() && (shim = require('./shim'))) {
+ Object.defineProperty(Object, 'setPrototypeOf',
+ { value: shim, configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/object/set-prototype-of/index.js b/source/node_modules/es5-ext/object/set-prototype-of/index.js
new file mode 100644
index 000000000..ccc40995b
--- /dev/null
+++ b/source/node_modules/es5-ext/object/set-prototype-of/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? Object.setPrototypeOf
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/source/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
new file mode 100644
index 000000000..98d0c8436
--- /dev/null
+++ b/source/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var create = Object.create, getPrototypeOf = Object.getPrototypeOf
+ , x = {};
+
+module.exports = function (/*customCreate*/) {
+ var setPrototypeOf = Object.setPrototypeOf
+ , customCreate = arguments[0] || create;
+ if (typeof setPrototypeOf !== 'function') return false;
+ return getPrototypeOf(setPrototypeOf(customCreate(null), x)) === x;
+};
diff --git a/source/node_modules/es5-ext/object/set-prototype-of/shim.js b/source/node_modules/es5-ext/object/set-prototype-of/shim.js
new file mode 100644
index 000000000..4ec944675
--- /dev/null
+++ b/source/node_modules/es5-ext/object/set-prototype-of/shim.js
@@ -0,0 +1,73 @@
+// Big thanks to @WebReflection for sorting this out
+// https://gist.github.com/WebReflection/5593554
+
+'use strict';
+
+var isObject = require('../is-object')
+ , value = require('../valid-value')
+
+ , isPrototypeOf = Object.prototype.isPrototypeOf
+ , defineProperty = Object.defineProperty
+ , nullDesc = { configurable: true, enumerable: false, writable: true,
+ value: undefined }
+ , validate;
+
+validate = function (obj, prototype) {
+ value(obj);
+ if ((prototype === null) || isObject(prototype)) return obj;
+ throw new TypeError('Prototype must be null or an object');
+};
+
+module.exports = (function (status) {
+ var fn, set;
+ if (!status) return null;
+ if (status.level === 2) {
+ if (status.set) {
+ set = status.set;
+ fn = function (obj, prototype) {
+ set.call(validate(obj, prototype), prototype);
+ return obj;
+ };
+ } else {
+ fn = function (obj, prototype) {
+ validate(obj, prototype).__proto__ = prototype;
+ return obj;
+ };
+ }
+ } else {
+ fn = function self(obj, prototype) {
+ var isNullBase;
+ validate(obj, prototype);
+ isNullBase = isPrototypeOf.call(self.nullPolyfill, obj);
+ if (isNullBase) delete self.nullPolyfill.__proto__;
+ if (prototype === null) prototype = self.nullPolyfill;
+ obj.__proto__ = prototype;
+ if (isNullBase) defineProperty(self.nullPolyfill, '__proto__', nullDesc);
+ return obj;
+ };
+ }
+ return Object.defineProperty(fn, 'level', { configurable: false,
+ enumerable: false, writable: false, value: status.level });
+}((function () {
+ var x = Object.create(null), y = {}, set
+ , desc = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__');
+
+ if (desc) {
+ try {
+ set = desc.set; // Opera crashes at this point
+ set.call(x, y);
+ } catch (ignore) { }
+ if (Object.getPrototypeOf(x) === y) return { set: set, level: 2 };
+ }
+
+ x.__proto__ = y;
+ if (Object.getPrototypeOf(x) === y) return { level: 2 };
+
+ x = {};
+ x.__proto__ = y;
+ if (Object.getPrototypeOf(x) === y) return { level: 1 };
+
+ return false;
+}())));
+
+require('../create');
diff --git a/source/node_modules/es5-ext/object/some.js b/source/node_modules/es5-ext/object/some.js
new file mode 100644
index 000000000..cde5ddeec
--- /dev/null
+++ b/source/node_modules/es5-ext/object/some.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_iterate')('some', false);
diff --git a/source/node_modules/es5-ext/object/to-array.js b/source/node_modules/es5-ext/object/to-array.js
new file mode 100644
index 000000000..a954abb26
--- /dev/null
+++ b/source/node_modules/es5-ext/object/to-array.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var callable = require('./valid-callable')
+ , forEach = require('./for-each')
+
+ , call = Function.prototype.call
+
+ , defaultCb = function (value, key) { return [key, value]; };
+
+module.exports = function (obj/*, cb, thisArg, compareFn*/) {
+ var a = [], cb = arguments[1], thisArg = arguments[2];
+ cb = (cb == null) ? defaultCb : callable(cb);
+
+ forEach(obj, function (value, key, obj, index) {
+ a.push(call.call(cb, thisArg, value, key, this, index));
+ }, obj, arguments[3]);
+ return a;
+};
diff --git a/source/node_modules/es5-ext/object/unserialize.js b/source/node_modules/es5-ext/object/unserialize.js
new file mode 100644
index 000000000..ce68e403a
--- /dev/null
+++ b/source/node_modules/es5-ext/object/unserialize.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var value = require('./valid-value');
+
+module.exports = exports = function (code) {
+ return (new Function('return ' + value(code)))();
+};
diff --git a/source/node_modules/es5-ext/object/valid-callable.js b/source/node_modules/es5-ext/object/valid-callable.js
new file mode 100644
index 000000000..c977527a4
--- /dev/null
+++ b/source/node_modules/es5-ext/object/valid-callable.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (fn) {
+ if (typeof fn !== 'function') throw new TypeError(fn + " is not a function");
+ return fn;
+};
diff --git a/source/node_modules/es5-ext/object/valid-object.js b/source/node_modules/es5-ext/object/valid-object.js
new file mode 100644
index 000000000..f82bd51ed
--- /dev/null
+++ b/source/node_modules/es5-ext/object/valid-object.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isObject = require('./is-object');
+
+module.exports = function (value) {
+ if (!isObject(value)) throw new TypeError(value + " is not an Object");
+ return value;
+};
diff --git a/source/node_modules/es5-ext/object/valid-value.js b/source/node_modules/es5-ext/object/valid-value.js
new file mode 100644
index 000000000..36c8ec31e
--- /dev/null
+++ b/source/node_modules/es5-ext/object/valid-value.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (value) {
+ if (value == null) throw new TypeError("Cannot use null or undefined");
+ return value;
+};
diff --git a/source/node_modules/es5-ext/object/validate-array-like-object.js b/source/node_modules/es5-ext/object/validate-array-like-object.js
new file mode 100644
index 000000000..89e12c51c
--- /dev/null
+++ b/source/node_modules/es5-ext/object/validate-array-like-object.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var isArrayLike = require('./is-array-like')
+ , isObject = require('./is-object');
+
+module.exports = function (obj) {
+ if (isObject(obj) && isArrayLike(obj)) return obj;
+ throw new TypeError(obj + " is not array-like object");
+};
diff --git a/source/node_modules/es5-ext/object/validate-array-like.js b/source/node_modules/es5-ext/object/validate-array-like.js
new file mode 100644
index 000000000..6a35b54a1
--- /dev/null
+++ b/source/node_modules/es5-ext/object/validate-array-like.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isArrayLike = require('./is-array-like');
+
+module.exports = function (obj) {
+ if (isArrayLike(obj)) return obj;
+ throw new TypeError(obj + " is not array-like value");
+};
diff --git a/source/node_modules/es5-ext/object/validate-stringifiable-value.js b/source/node_modules/es5-ext/object/validate-stringifiable-value.js
new file mode 100644
index 000000000..9df3b668f
--- /dev/null
+++ b/source/node_modules/es5-ext/object/validate-stringifiable-value.js
@@ -0,0 +1,6 @@
+'use strict';
+
+var value = require('./valid-value')
+ , stringifiable = require('./validate-stringifiable');
+
+module.exports = function (x) { return stringifiable(value(x)); };
diff --git a/source/node_modules/es5-ext/object/validate-stringifiable.js b/source/node_modules/es5-ext/object/validate-stringifiable.js
new file mode 100644
index 000000000..eba7ce787
--- /dev/null
+++ b/source/node_modules/es5-ext/object/validate-stringifiable.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (stringifiable) {
+ try {
+ return String(stringifiable);
+ } catch (e) {
+ throw new TypeError("Passed argument cannot be stringifed");
+ }
+};
diff --git a/source/node_modules/es5-ext/package.json b/source/node_modules/es5-ext/package.json
new file mode 100644
index 000000000..2769fa3a9
--- /dev/null
+++ b/source/node_modules/es5-ext/package.json
@@ -0,0 +1,101 @@
+{
+ "_args": [
+ [
+ "es5-ext@~0.10.10",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/es6-symbol"
+ ]
+ ],
+ "_from": "es5-ext@>=0.10.10 <0.11.0",
+ "_id": "es5-ext@0.10.11",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/es5-ext",
+ "_nodeVersion": "4.2.3",
+ "_npmUser": {
+ "email": "medikoo+npm@medikoo.com",
+ "name": "medikoo"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "es5-ext",
+ "raw": "es5-ext@~0.10.10",
+ "rawSpec": "~0.10.10",
+ "scope": null,
+ "spec": ">=0.10.10 <0.11.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/d",
+ "/es6-iterator",
+ "/es6-symbol"
+ ],
+ "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz",
+ "_shasum": "8184c3e705a820948c2dbe043849379b1dbd0c45",
+ "_shrinkwrap": null,
+ "_spec": "es5-ext@~0.10.10",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/es6-symbol",
+ "author": {
+ "email": "medyk@medikoo.com",
+ "name": "Mariusz Nowak",
+ "url": "http://www.medikoo.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/medikoo/es5-ext/issues"
+ },
+ "dependencies": {
+ "es6-iterator": "2",
+ "es6-symbol": "~3.0.2"
+ },
+ "description": "ECMAScript extensions and shims",
+ "devDependencies": {
+ "tad": "~0.2.4",
+ "xlint": "~0.2.2",
+ "xlint-jslint-medikoo": "~0.1.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "8184c3e705a820948c2dbe043849379b1dbd0c45",
+ "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz"
+ },
+ "gitHead": "aba94140a6bf79ce1a448a2db8834e8c1842b527",
+ "homepage": "https://github.com/medikoo/es5-ext#readme",
+ "keywords": [
+ "addons",
+ "ecmascript",
+ "ecmascript5",
+ "ecmascript6",
+ "es5",
+ "es6",
+ "ext",
+ "extensions",
+ "extras",
+ "harmony",
+ "javascript",
+ "polyfill",
+ "shim",
+ "util",
+ "utilities",
+ "utils"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "medikoo",
+ "email": "medikoo+npm@medikoo.com"
+ }
+ ],
+ "name": "es5-ext",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/medikoo/es5-ext.git"
+ },
+ "scripts": {
+ "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+ "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+ "test": "node ./node_modules/tad/bin/tad"
+ },
+ "version": "0.10.11"
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/index.js b/source/node_modules/es5-ext/reg-exp/#/index.js
new file mode 100644
index 000000000..f7e7a58eb
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = {
+ isSticky: require('./is-sticky'),
+ isUnicode: require('./is-unicode'),
+ match: require('./match'),
+ replace: require('./replace'),
+ search: require('./search'),
+ split: require('./split')
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/is-sticky.js b/source/node_modules/es5-ext/reg-exp/#/is-sticky.js
new file mode 100644
index 000000000..830a481f7
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/is-sticky.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var validRegExp = require('../valid-reg-exp')
+
+ , re = /\/[a-xz]*y[a-xz]*$/;
+
+module.exports = function () {
+ return Boolean(String(validRegExp(this)).match(re));
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/is-unicode.js b/source/node_modules/es5-ext/reg-exp/#/is-unicode.js
new file mode 100644
index 000000000..b005f6d91
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/is-unicode.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var validRegExp = require('../valid-reg-exp')
+
+ , re = /\/[a-xz]*u[a-xz]*$/;
+
+module.exports = function () {
+ return Boolean(String(validRegExp(this)).match(re));
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/match/implement.js b/source/node_modules/es5-ext/reg-exp/#/match/implement.js
new file mode 100644
index 000000000..921c9368e
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/match/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(RegExp.prototype, 'match', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/match/index.js b/source/node_modules/es5-ext/reg-exp/#/match/index.js
new file mode 100644
index 000000000..0534ac3bc
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/match/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? RegExp.prototype.match
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/source/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
new file mode 100644
index 000000000..b7e996431
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var re = /foo/;
+
+module.exports = function () {
+ if (typeof re.match !== 'function') return false;
+ return re.match('barfoobar') && !re.match('elo');
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/match/shim.js b/source/node_modules/es5-ext/reg-exp/#/match/shim.js
new file mode 100644
index 000000000..4f99cf4d1
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/match/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var validRegExp = require('../../valid-reg-exp');
+
+module.exports = function (string) {
+ validRegExp(this);
+ return String(string).match(this);
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/replace/implement.js b/source/node_modules/es5-ext/reg-exp/#/replace/implement.js
new file mode 100644
index 000000000..ad580de89
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/replace/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(RegExp.prototype, 'replace', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/replace/index.js b/source/node_modules/es5-ext/reg-exp/#/replace/index.js
new file mode 100644
index 000000000..5658177d8
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/replace/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? RegExp.prototype.replace
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/source/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
new file mode 100644
index 000000000..1b42d2524
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var re = /foo/;
+
+module.exports = function () {
+ if (typeof re.replace !== 'function') return false;
+ return re.replace('foobar', 'mar') === 'marbar';
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/replace/shim.js b/source/node_modules/es5-ext/reg-exp/#/replace/shim.js
new file mode 100644
index 000000000..c3e6aebab
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/replace/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var validRegExp = require('../../valid-reg-exp');
+
+module.exports = function (string, replaceValue) {
+ validRegExp(this);
+ return String(string).replace(this, replaceValue);
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/search/implement.js b/source/node_modules/es5-ext/reg-exp/#/search/implement.js
new file mode 100644
index 000000000..3804f4eb1
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/search/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(RegExp.prototype, 'search', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/search/index.js b/source/node_modules/es5-ext/reg-exp/#/search/index.js
new file mode 100644
index 000000000..67995d4ac
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/search/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? RegExp.prototype.search
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/source/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
new file mode 100644
index 000000000..efba889f8
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var re = /foo/;
+
+module.exports = function () {
+ if (typeof re.search !== 'function') return false;
+ return re.search('barfoo') === 3;
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/search/shim.js b/source/node_modules/es5-ext/reg-exp/#/search/shim.js
new file mode 100644
index 000000000..6d9dcaed8
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/search/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var validRegExp = require('../../valid-reg-exp');
+
+module.exports = function (string) {
+ validRegExp(this);
+ return String(string).search(this);
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/split/implement.js b/source/node_modules/es5-ext/reg-exp/#/split/implement.js
new file mode 100644
index 000000000..50facb683
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/split/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(RegExp.prototype, 'split', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/split/index.js b/source/node_modules/es5-ext/reg-exp/#/split/index.js
new file mode 100644
index 000000000..f101f5af7
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/split/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? RegExp.prototype.split
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/source/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
new file mode 100644
index 000000000..7244c998b
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var re = /\|/;
+
+module.exports = function () {
+ if (typeof re.split !== 'function') return false;
+ return re.split('bar|foo')[1] === 'foo';
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/split/shim.js b/source/node_modules/es5-ext/reg-exp/#/split/shim.js
new file mode 100644
index 000000000..76154e7e3
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/split/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var validRegExp = require('../../valid-reg-exp');
+
+module.exports = function (string) {
+ validRegExp(this);
+ return String(string).split(this);
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/source/node_modules/es5-ext/reg-exp/#/sticky/implement.js
new file mode 100644
index 000000000..7e8af1db3
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/sticky/implement.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isSticky = require('../is-sticky');
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(RegExp.prototype, 'sticky', { configurable: true,
+ enumerable: false, get: isSticky });
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/source/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
new file mode 100644
index 000000000..e4184ee4e
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function () {
+ var dummyRegExp = /a/;
+ // We need to do check on instance and not on prototype due to how ES2015 spec evolved:
+ // https://github.com/tc39/ecma262/issues/262
+ // https://github.com/tc39/ecma262/pull/263
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4617
+ return 'sticky' in dummyRegExp;
+};
diff --git a/source/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/source/node_modules/es5-ext/reg-exp/#/unicode/implement.js
new file mode 100644
index 000000000..5a82a4d1d
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/unicode/implement.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isUnicode = require('../is-unicode');
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(RegExp.prototype, 'unicode', { configurable: true,
+ enumerable: false, get: isUnicode });
+}
diff --git a/source/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/source/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
new file mode 100644
index 000000000..3e3a54b66
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function () {
+ var dummyRegExp = /a/;
+ // We need to do check on instance and not on prototype due to how ES2015 spec evolved:
+ // https://github.com/tc39/ecma262/issues/262
+ // https://github.com/tc39/ecma262/pull/263
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4617
+ return 'unicode' in dummyRegExp;
+};
diff --git a/source/node_modules/es5-ext/reg-exp/escape.js b/source/node_modules/es5-ext/reg-exp/escape.js
new file mode 100644
index 000000000..a2363fcfc
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/escape.js
@@ -0,0 +1,9 @@
+// Thanks to Andrew Clover:
+// http://stackoverflow.com/questions/3561493
+// /is-there-a-regexp-escape-function-in-javascript
+
+'use strict';
+
+var re = /[\-\/\\\^$*+?.()|\[\]{}]/g;
+
+module.exports = function (str) { return String(str).replace(re, '\\$&'); };
diff --git a/source/node_modules/es5-ext/reg-exp/index.js b/source/node_modules/es5-ext/reg-exp/index.js
new file mode 100644
index 000000000..75ea3135a
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/index.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ escape: require('./escape'),
+ isRegExp: require('./is-reg-exp'),
+ validRegExp: require('./valid-reg-exp')
+};
diff --git a/source/node_modules/es5-ext/reg-exp/is-reg-exp.js b/source/node_modules/es5-ext/reg-exp/is-reg-exp.js
new file mode 100644
index 000000000..6eb12977c
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/is-reg-exp.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call(/a/);
+
+module.exports = function (x) {
+ return (x && (x instanceof RegExp || (toString.call(x) === id))) || false;
+};
diff --git a/source/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/source/node_modules/es5-ext/reg-exp/valid-reg-exp.js
new file mode 100644
index 000000000..d3a77641d
--- /dev/null
+++ b/source/node_modules/es5-ext/reg-exp/valid-reg-exp.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isRegExp = require('./is-reg-exp');
+
+module.exports = function (x) {
+ if (!isRegExp(x)) throw new TypeError(x + " is not a RegExp object");
+ return x;
+};
diff --git a/source/node_modules/es5-ext/string/#/@@iterator/implement.js b/source/node_modules/es5-ext/string/#/@@iterator/implement.js
new file mode 100644
index 000000000..4494d7b6a
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/@@iterator/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, require('es6-symbol').iterator,
+ { value: require('./shim'), configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/@@iterator/index.js b/source/node_modules/es5-ext/string/#/@@iterator/index.js
new file mode 100644
index 000000000..22f15e696
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/@@iterator/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype[require('es6-symbol').iterator] : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/source/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
new file mode 100644
index 000000000..f5c462deb
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function () {
+ var str = '🙈f', iterator, result;
+ if (typeof str[iteratorSymbol] !== 'function') return false;
+ iterator = str[iteratorSymbol]();
+ if (!iterator) return false;
+ if (typeof iterator.next !== 'function') return false;
+ result = iterator.next();
+ if (!result) return false;
+ if (result.value !== '🙈') return false;
+ if (result.done !== false) return false;
+ return true;
+};
diff --git a/source/node_modules/es5-ext/string/#/@@iterator/shim.js b/source/node_modules/es5-ext/string/#/@@iterator/shim.js
new file mode 100644
index 000000000..0be30292f
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/@@iterator/shim.js
@@ -0,0 +1,6 @@
+'use strict';
+
+var StringIterator = require('es6-iterator/string')
+ , value = require('../../../object/valid-value');
+
+module.exports = function () { return new StringIterator(value(this)); };
diff --git a/source/node_modules/es5-ext/string/#/at.js b/source/node_modules/es5-ext/string/#/at.js
new file mode 100644
index 000000000..77bd251ac
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/at.js
@@ -0,0 +1,33 @@
+// Based on: https://github.com/mathiasbynens/String.prototype.at
+// Thanks @mathiasbynens !
+
+'use strict';
+
+var toInteger = require('../../number/to-integer')
+ , validValue = require('../../object/valid-value');
+
+module.exports = function (pos) {
+ var str = String(validValue(this)), size = str.length
+ , cuFirst, cuSecond, nextPos, len;
+ pos = toInteger(pos);
+
+ // Account for out-of-bounds indices
+ // The odd lower bound is because the ToInteger operation is
+ // going to round `n` to `0` for `-1 < n <= 0`.
+ if (pos <= -1 || pos >= size) return '';
+
+ // Second half of `ToInteger`
+ pos = pos | 0;
+ // Get the first code unit and code unit value
+ cuFirst = str.charCodeAt(pos);
+ nextPos = pos + 1;
+ len = 1;
+ if ( // check if it’s the start of a surrogate pair
+ (cuFirst >= 0xD800) && (cuFirst <= 0xDBFF) && // high surrogate
+ (size > nextPos) // there is a next code unit
+ ) {
+ cuSecond = str.charCodeAt(nextPos);
+ if (cuSecond >= 0xDC00 && cuSecond <= 0xDFFF) len = 2; // low surrogate
+ }
+ return str.slice(pos, pos + len);
+};
diff --git a/source/node_modules/es5-ext/string/#/camel-to-hyphen.js b/source/node_modules/es5-ext/string/#/camel-to-hyphen.js
new file mode 100644
index 000000000..1cb8d1277
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/camel-to-hyphen.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var replace = String.prototype.replace
+ , re = /([A-Z])/g;
+
+module.exports = function () {
+ var str = replace.call(this, re, "-$1").toLowerCase();
+ if (str[0] === '-') str = str.slice(1);
+ return str;
+};
diff --git a/source/node_modules/es5-ext/string/#/capitalize.js b/source/node_modules/es5-ext/string/#/capitalize.js
new file mode 100644
index 000000000..ed7682736
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/capitalize.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var value = require('../../object/valid-value');
+
+module.exports = function () {
+ var str = String(value(this));
+ return str.charAt(0).toUpperCase() + str.slice(1);
+};
diff --git a/source/node_modules/es5-ext/string/#/case-insensitive-compare.js b/source/node_modules/es5-ext/string/#/case-insensitive-compare.js
new file mode 100644
index 000000000..599cb8346
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/case-insensitive-compare.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var toLowerCase = String.prototype.toLowerCase;
+
+module.exports = function (other) {
+ return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other)));
+};
diff --git a/source/node_modules/es5-ext/string/#/code-point-at/implement.js b/source/node_modules/es5-ext/string/#/code-point-at/implement.js
new file mode 100644
index 000000000..1e7a37bd4
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/code-point-at/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, 'codePointAt',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/code-point-at/index.js b/source/node_modules/es5-ext/string/#/code-point-at/index.js
new file mode 100644
index 000000000..7e91d833a
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/code-point-at/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype.codePointAt
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/source/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
new file mode 100644
index 000000000..b27158913
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var str = 'abc\uD834\uDF06def';
+
+module.exports = function () {
+ if (typeof str.codePointAt !== 'function') return false;
+ return str.codePointAt(3) === 0x1D306;
+};
diff --git a/source/node_modules/es5-ext/string/#/code-point-at/shim.js b/source/node_modules/es5-ext/string/#/code-point-at/shim.js
new file mode 100644
index 000000000..1c9038b3c
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/code-point-at/shim.js
@@ -0,0 +1,26 @@
+// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt
+// Thanks @mathiasbynens !
+
+'use strict';
+
+var toInteger = require('../../../number/to-integer')
+ , validValue = require('../../../object/valid-value');
+
+module.exports = function (pos) {
+ var str = String(validValue(this)), l = str.length, first, second;
+ pos = toInteger(pos);
+
+ // Account for out-of-bounds indices:
+ if (pos < 0 || pos >= l) return undefined;
+
+ // Get the first code unit
+ first = str.charCodeAt(pos);
+ if ((first >= 0xD800) && (first <= 0xDBFF) && (l > pos + 1)) {
+ second = str.charCodeAt(pos + 1);
+ if (second >= 0xDC00 && second <= 0xDFFF) {
+ // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ }
+ }
+ return first;
+};
diff --git a/source/node_modules/es5-ext/string/#/contains/implement.js b/source/node_modules/es5-ext/string/#/contains/implement.js
new file mode 100644
index 000000000..6b7a3c081
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/contains/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, 'contains',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/contains/index.js b/source/node_modules/es5-ext/string/#/contains/index.js
new file mode 100644
index 000000000..abb3e3730
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/contains/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype.contains
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/contains/is-implemented.js b/source/node_modules/es5-ext/string/#/contains/is-implemented.js
new file mode 100644
index 000000000..6f7d4b719
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/contains/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var str = 'razdwatrzy';
+
+module.exports = function () {
+ if (typeof str.contains !== 'function') return false;
+ return ((str.contains('dwa') === true) && (str.contains('foo') === false));
+};
diff --git a/source/node_modules/es5-ext/string/#/contains/shim.js b/source/node_modules/es5-ext/string/#/contains/shim.js
new file mode 100644
index 000000000..89e39e793
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/contains/shim.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var indexOf = String.prototype.indexOf;
+
+module.exports = function (searchString/*, position*/) {
+ return indexOf.call(this, searchString, arguments[1]) > -1;
+};
diff --git a/source/node_modules/es5-ext/string/#/ends-with/implement.js b/source/node_modules/es5-ext/string/#/ends-with/implement.js
new file mode 100644
index 000000000..0b09025b0
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/ends-with/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, 'endsWith',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/ends-with/index.js b/source/node_modules/es5-ext/string/#/ends-with/index.js
new file mode 100644
index 000000000..d2d948482
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/ends-with/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype.endsWith
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/source/node_modules/es5-ext/string/#/ends-with/is-implemented.js
new file mode 100644
index 000000000..f3bb00883
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/ends-with/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var str = 'razdwatrzy';
+
+module.exports = function () {
+ if (typeof str.endsWith !== 'function') return false;
+ return ((str.endsWith('trzy') === true) && (str.endsWith('raz') === false));
+};
diff --git a/source/node_modules/es5-ext/string/#/ends-with/shim.js b/source/node_modules/es5-ext/string/#/ends-with/shim.js
new file mode 100644
index 000000000..26cbdb136
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/ends-with/shim.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var toInteger = require('../../../number/to-integer')
+ , value = require('../../../object/valid-value')
+
+ , min = Math.min, max = Math.max;
+
+module.exports = function (searchString/*, endPosition*/) {
+ var self, start, endPos;
+ self = String(value(this));
+ searchString = String(searchString);
+ endPos = arguments[1];
+ start = ((endPos == null) ? self.length :
+ min(max(toInteger(endPos), 0), self.length)) - searchString.length;
+ return (start < 0) ? false : (self.indexOf(searchString, start) === start);
+};
diff --git a/source/node_modules/es5-ext/string/#/hyphen-to-camel.js b/source/node_modules/es5-ext/string/#/hyphen-to-camel.js
new file mode 100644
index 000000000..8928b0249
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/hyphen-to-camel.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var replace = String.prototype.replace
+
+ , re = /-([a-z0-9])/g
+ , toUpperCase = function (m, a) { return a.toUpperCase(); };
+
+module.exports = function () { return replace.call(this, re, toUpperCase); };
diff --git a/source/node_modules/es5-ext/string/#/indent.js b/source/node_modules/es5-ext/string/#/indent.js
new file mode 100644
index 000000000..223bd82b0
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/indent.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var repeat = require('./repeat')
+
+ , replace = String.prototype.replace
+ , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g;
+
+module.exports = function (indent/*, count*/) {
+ var count = arguments[1];
+ indent = repeat.call(String(indent), (count == null) ? 1 : count);
+ return indent + replace.call(this, re, '$1' + indent + '$2');
+};
diff --git a/source/node_modules/es5-ext/string/#/index.js b/source/node_modules/es5-ext/string/#/index.js
new file mode 100644
index 000000000..3efa01c04
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/index.js
@@ -0,0 +1,22 @@
+'use strict';
+
+module.exports = {
+ '@@iterator': require('./@@iterator'),
+ at: require('./at'),
+ camelToHyphen: require('./camel-to-hyphen'),
+ capitalize: require('./capitalize'),
+ caseInsensitiveCompare: require('./case-insensitive-compare'),
+ codePointAt: require('./code-point-at'),
+ contains: require('./contains'),
+ hyphenToCamel: require('./hyphen-to-camel'),
+ endsWith: require('./ends-with'),
+ indent: require('./indent'),
+ last: require('./last'),
+ normalize: require('./normalize'),
+ pad: require('./pad'),
+ plainReplace: require('./plain-replace'),
+ plainReplaceAll: require('./plain-replace-all'),
+ repeat: require('./repeat'),
+ startsWith: require('./starts-with'),
+ uncapitalize: require('./uncapitalize')
+};
diff --git a/source/node_modules/es5-ext/string/#/last.js b/source/node_modules/es5-ext/string/#/last.js
new file mode 100644
index 000000000..d5cf46ee5
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/last.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var value = require('../../object/valid-value');
+
+module.exports = function () {
+ var self = String(value(this)), l = self.length;
+ return l ? self[l - 1] : null;
+};
diff --git a/source/node_modules/es5-ext/string/#/normalize/_data.js b/source/node_modules/es5-ext/string/#/normalize/_data.js
new file mode 100644
index 000000000..e4e00a329
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/normalize/_data.js
@@ -0,0 +1,69 @@
+'use strict';
+
+module.exports = { 0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]},
+ 256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]},
+ 512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256]},
+ 768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256]},
+ 1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]},
+ 1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]},
+ 1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]},
+ 1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]},
+ 2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230]},
+ 2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]},
+ 2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9]},
+ 2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]},
+ 3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]},
+ 3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]},
+ 3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]},
+ 3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]},
+ 4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]},
+ 4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70080:[,9]},
+ 4864:{4957:[,230],4958:[,230],4959:[,230]},
+ 5632:{71350:[,9],71351:[,7]},
+ 5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]},
+ 6144:{6313:[,228]},
+ 6400:{6457:[,222],6458:[,230],6459:[,220]},
+ 6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220]},
+ 6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]},
+ 7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230]},
+ 7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]},
+ 7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]},
+ 7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]},
+ 8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]},
+ 8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]},
+ 8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]},
+ 8960:{9001:[[12296]],9002:[[12297]]},
+ 9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]},
+ 10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]},
+ 11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]},
+ 11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]},
+ 11776:{11935:[[27597],256],12019:[[40863],256]},
+ 12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]},
+ 12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]},
+ 12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]},
+ 12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13000:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]},
+ 13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]},
+ 42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42655:[,230],42736:[,230],42737:[,230]},
+ 42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]},
+ 43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]},
+ 43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]},
+ 43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]},
+ 43776:{44013:[,9]},
+ 53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]},
+ 53760:{119362:[,230],119363:[,230],119364:[,230]},
+ 54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]},
+ 54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]},
+ 54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]},
+ 55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]},
+ 60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]},
+ 61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]},
+ 61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]},
+ 63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]},
+ 63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149000]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32000]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195000:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]},
+ 64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]},
+ 64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]},
+ 64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]},
+ 64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]},
+ 65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]},
+ 65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]}
+};
diff --git a/source/node_modules/es5-ext/string/#/normalize/implement.js b/source/node_modules/es5-ext/string/#/normalize/implement.js
new file mode 100644
index 000000000..cfc710ea4
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/normalize/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, 'normalize',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/normalize/index.js b/source/node_modules/es5-ext/string/#/normalize/index.js
new file mode 100644
index 000000000..619b0965d
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/normalize/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype.normalize
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/normalize/is-implemented.js b/source/node_modules/es5-ext/string/#/normalize/is-implemented.js
new file mode 100644
index 000000000..67c8d8da5
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/normalize/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var str = 'æøåäüö';
+
+module.exports = function () {
+ if (typeof str.normalize !== 'function') return false;
+ return str.normalize('NFKD') === 'æøåäüö';
+};
diff --git a/source/node_modules/es5-ext/string/#/normalize/shim.js b/source/node_modules/es5-ext/string/#/normalize/shim.js
new file mode 100644
index 000000000..a37998977
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/normalize/shim.js
@@ -0,0 +1,289 @@
+// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js
+
+/*
+ * UnicodeNormalizer 1.0.0
+ * Copyright (c) 2008 Matsuza
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and
+ * GPL (GPL-LICENSE.txt) licenses.
+ * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $
+ * $Rev: 13309 $
+*/
+
+'use strict';
+
+var primitiveSet = require('../../../object/primitive-set')
+ , validValue = require('../../../object/valid-value')
+ , data = require('./_data')
+
+ , floor = Math.floor
+ , forms = primitiveSet('NFC', 'NFD', 'NFKC', 'NFKD')
+
+ , DEFAULT_FEATURE = [null, 0, {}], CACHE_THRESHOLD = 10, SBase = 0xAC00
+ , LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21
+ , TCount = 28, NCount = VCount * TCount, SCount = LCount * NCount
+ , UChar, cache = {}, cacheCounter = [], i, fromCache, fromData, fromCpOnly
+ , fromRuleBasedJamo, fromCpFilter, strategies, UCharIterator
+ , RecursDecompIterator, DecompIterator, CompIterator, createIterator
+ , normalize;
+
+UChar = function (cp, feature) {
+ this.codepoint = cp;
+ this.feature = feature;
+};
+
+// Strategies
+for (i = 0; i <= 0xFF; ++i) cacheCounter[i] = 0;
+
+fromCache = function (next, cp, needFeature) {
+ var ret = cache[cp];
+ if (!ret) {
+ ret = next(cp, needFeature);
+ if (!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD) {
+ cache[cp] = ret;
+ }
+ }
+ return ret;
+};
+
+fromData = function (next, cp, needFeature) {
+ var hash = cp & 0xFF00, dunit = UChar.udata[hash] || {}, f = dunit[cp];
+ return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE);
+};
+fromCpOnly = function (next, cp, needFeature) {
+ return !!needFeature ? next(cp, needFeature) : new UChar(cp, null);
+};
+
+fromRuleBasedJamo = function (next, cp, needFeature) {
+ var c, base, i, arr, SIndex, TIndex, feature, j;
+ if (cp < LBase || (LBase + LCount <= cp && cp < SBase) ||
+ (SBase + SCount < cp)) {
+ return next(cp, needFeature);
+ }
+ if (LBase <= cp && cp < LBase + LCount) {
+ c = {};
+ base = (cp - LBase) * VCount;
+ for (i = 0; i < VCount; ++i) {
+ c[VBase + i] = SBase + TCount * (i + base);
+ }
+ arr = new Array(3);
+ arr[2] = c;
+ return new UChar(cp, arr);
+ }
+
+ SIndex = cp - SBase;
+ TIndex = SIndex % TCount;
+ feature = [];
+ if (TIndex !== 0) {
+ feature[0] = [SBase + SIndex - TIndex, TBase + TIndex];
+ } else {
+ feature[0] = [LBase + floor(SIndex / NCount), VBase +
+ floor((SIndex % NCount) / TCount)];
+ feature[2] = {};
+ for (j = 1; j < TCount; ++j) {
+ feature[2][TBase + j] = cp + j;
+ }
+ }
+ return new UChar(cp, feature);
+};
+
+fromCpFilter = function (next, cp, needFeature) {
+ return (cp < 60) || ((13311 < cp) && (cp < 42607))
+ ? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature);
+};
+
+strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData];
+
+UChar.fromCharCode = strategies.reduceRight(function (next, strategy) {
+ return function (cp, needFeature) { return strategy(next, cp, needFeature); };
+}, null);
+
+UChar.isHighSurrogate = function (cp) { return cp >= 0xD800 && cp <= 0xDBFF; };
+UChar.isLowSurrogate = function (cp) { return cp >= 0xDC00 && cp <= 0xDFFF; };
+
+UChar.prototype.prepFeature = function () {
+ if (!this.feature) {
+ this.feature = UChar.fromCharCode(this.codepoint, true).feature;
+ }
+};
+
+UChar.prototype.toString = function () {
+ var x;
+ if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint);
+ x = this.codepoint - 0x10000;
+ return String.fromCharCode(floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00);
+};
+
+UChar.prototype.getDecomp = function () {
+ this.prepFeature();
+ return this.feature[0] || null;
+};
+
+UChar.prototype.isCompatibility = function () {
+ this.prepFeature();
+ return !!this.feature[1] && (this.feature[1] & (1 << 8));
+};
+UChar.prototype.isExclude = function () {
+ this.prepFeature();
+ return !!this.feature[1] && (this.feature[1] & (1 << 9));
+};
+UChar.prototype.getCanonicalClass = function () {
+ this.prepFeature();
+ return !!this.feature[1] ? (this.feature[1] & 0xff) : 0;
+};
+UChar.prototype.getComposite = function (following) {
+ var cp;
+ this.prepFeature();
+ if (!this.feature[2]) return null;
+ cp = this.feature[2][following.codepoint];
+ return cp ? UChar.fromCharCode(cp) : null;
+};
+
+UCharIterator = function (str) {
+ this.str = str;
+ this.cursor = 0;
+};
+UCharIterator.prototype.next = function () {
+ if (!!this.str && this.cursor < this.str.length) {
+ var cp = this.str.charCodeAt(this.cursor++), d;
+ if (UChar.isHighSurrogate(cp) && this.cursor < this.str.length &&
+ UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))) {
+ cp = (cp - 0xD800) * 0x400 + (d - 0xDC00) + 0x10000;
+ ++this.cursor;
+ }
+ return UChar.fromCharCode(cp);
+ }
+ this.str = null;
+ return null;
+};
+
+RecursDecompIterator = function (it, cano) {
+ this.it = it;
+ this.canonical = cano;
+ this.resBuf = [];
+};
+
+RecursDecompIterator.prototype.next = function () {
+ var recursiveDecomp, uchar;
+ recursiveDecomp = function (cano, uchar) {
+ var decomp = uchar.getDecomp(), ret, i, a, j;
+ if (!!decomp && !(cano && uchar.isCompatibility())) {
+ ret = [];
+ for (i = 0; i < decomp.length; ++i) {
+ a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i]));
+ //ret.concat(a); //<-why does not this work?
+ //following block is a workaround.
+ for (j = 0; j < a.length; ++j) ret.push(a[j]);
+ }
+ return ret;
+ }
+ return [uchar];
+ };
+ if (this.resBuf.length === 0) {
+ uchar = this.it.next();
+ if (!uchar) return null;
+ this.resBuf = recursiveDecomp(this.canonical, uchar);
+ }
+ return this.resBuf.shift();
+};
+
+DecompIterator = function (it) {
+ this.it = it;
+ this.resBuf = [];
+};
+
+DecompIterator.prototype.next = function () {
+ var cc, uchar, inspt, uchar2, cc2;
+ if (this.resBuf.length === 0) {
+ do {
+ uchar = this.it.next();
+ if (!uchar) break;
+ cc = uchar.getCanonicalClass();
+ inspt = this.resBuf.length;
+ if (cc !== 0) {
+ for (inspt; inspt > 0; --inspt) {
+ uchar2 = this.resBuf[inspt - 1];
+ cc2 = uchar2.getCanonicalClass();
+ if (cc2 <= cc) break;
+ }
+ }
+ this.resBuf.splice(inspt, 0, uchar);
+ } while (cc !== 0);
+ }
+ return this.resBuf.shift();
+};
+
+CompIterator = function (it) {
+ this.it = it;
+ this.procBuf = [];
+ this.resBuf = [];
+ this.lastClass = null;
+};
+
+CompIterator.prototype.next = function () {
+ var uchar, starter, composite, cc;
+ while (this.resBuf.length === 0) {
+ uchar = this.it.next();
+ if (!uchar) {
+ this.resBuf = this.procBuf;
+ this.procBuf = [];
+ break;
+ }
+ if (this.procBuf.length === 0) {
+ this.lastClass = uchar.getCanonicalClass();
+ this.procBuf.push(uchar);
+ } else {
+ starter = this.procBuf[0];
+ composite = starter.getComposite(uchar);
+ cc = uchar.getCanonicalClass();
+ if (!!composite && (this.lastClass < cc || this.lastClass === 0)) {
+ this.procBuf[0] = composite;
+ } else {
+ if (cc === 0) {
+ this.resBuf = this.procBuf;
+ this.procBuf = [];
+ }
+ this.lastClass = cc;
+ this.procBuf.push(uchar);
+ }
+ }
+ }
+ return this.resBuf.shift();
+};
+
+createIterator = function (mode, str) {
+ switch (mode) {
+ case "NFD":
+ return new DecompIterator(
+ new RecursDecompIterator(new UCharIterator(str), true)
+ );
+ case "NFKD":
+ return new DecompIterator(
+ new RecursDecompIterator(new UCharIterator(str), false)
+ );
+ case "NFC":
+ return new CompIterator(new DecompIterator(
+ new RecursDecompIterator(new UCharIterator(str), true)
+ ));
+ case "NFKC":
+ return new CompIterator(new DecompIterator(
+ new RecursDecompIterator(new UCharIterator(str), false)
+ ));
+ }
+ throw mode + " is invalid";
+};
+normalize = function (mode, str) {
+ var it = createIterator(mode, str), ret = "", uchar;
+ while (!!(uchar = it.next())) ret += uchar.toString();
+ return ret;
+};
+
+/* Unicode data */
+UChar.udata = data;
+
+module.exports = function (/*form*/) {
+ var str = String(validValue(this)), form = arguments[0];
+ if (form === undefined) form = 'NFC';
+ else form = String(form);
+ if (!forms[form]) throw new RangeError('Invalid normalization form: ' + form);
+ return normalize(form, str);
+};
diff --git a/source/node_modules/es5-ext/string/#/pad.js b/source/node_modules/es5-ext/string/#/pad.js
new file mode 100644
index 000000000..f227f239d
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/pad.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var toInteger = require('../../number/to-integer')
+ , value = require('../../object/valid-value')
+ , repeat = require('./repeat')
+
+ , abs = Math.abs, max = Math.max;
+
+module.exports = function (fill/*, length*/) {
+ var self = String(value(this))
+ , sLength = self.length
+ , length = arguments[1];
+
+ length = isNaN(length) ? 1 : toInteger(length);
+ fill = repeat.call(String(fill), abs(length));
+ if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self;
+ return self + (((sLength + length) >= 0) ? '' : fill.slice(length + sLength));
+};
diff --git a/source/node_modules/es5-ext/string/#/plain-replace-all.js b/source/node_modules/es5-ext/string/#/plain-replace-all.js
new file mode 100644
index 000000000..678b1cbcf
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/plain-replace-all.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var value = require('../../object/valid-value');
+
+module.exports = function (search, replace) {
+ var index, pos = 0, str = String(value(this)), sl, rl;
+ search = String(search);
+ replace = String(replace);
+ sl = search.length;
+ rl = replace.length;
+ while ((index = str.indexOf(search, pos)) !== -1) {
+ str = str.slice(0, index) + replace + str.slice(index + sl);
+ pos = index + rl;
+ }
+ return str;
+};
diff --git a/source/node_modules/es5-ext/string/#/plain-replace.js b/source/node_modules/es5-ext/string/#/plain-replace.js
new file mode 100644
index 000000000..24ce16d3b
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/plain-replace.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var indexOf = String.prototype.indexOf, slice = String.prototype.slice;
+
+module.exports = function (search, replace) {
+ var index = indexOf.call(this, search);
+ if (index === -1) return String(this);
+ return slice.call(this, 0, index) + replace +
+ slice.call(this, index + String(search).length);
+};
diff --git a/source/node_modules/es5-ext/string/#/repeat/implement.js b/source/node_modules/es5-ext/string/#/repeat/implement.js
new file mode 100644
index 000000000..4c39b9fbe
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/repeat/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, 'repeat',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/repeat/index.js b/source/node_modules/es5-ext/string/#/repeat/index.js
new file mode 100644
index 000000000..15a800e8d
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/repeat/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype.repeat
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/repeat/is-implemented.js b/source/node_modules/es5-ext/string/#/repeat/is-implemented.js
new file mode 100644
index 000000000..f7b8750f0
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/repeat/is-implemented.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var str = 'foo';
+
+module.exports = function () {
+ if (typeof str.repeat !== 'function') return false;
+ return (str.repeat(2) === 'foofoo');
+};
diff --git a/source/node_modules/es5-ext/string/#/repeat/shim.js b/source/node_modules/es5-ext/string/#/repeat/shim.js
new file mode 100644
index 000000000..0a3928b2c
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/repeat/shim.js
@@ -0,0 +1,22 @@
+// Thanks: http://www.2ality.com/2014/01/efficient-string-repeat.html
+
+'use strict';
+
+var value = require('../../../object/valid-value')
+ , toInteger = require('../../../number/to-integer');
+
+module.exports = function (count) {
+ var str = String(value(this)), result;
+ count = toInteger(count);
+ if (count < 0) throw new RangeError("Count must be >= 0");
+ if (!isFinite(count)) throw new RangeError("Count must be < ∞");
+ result = '';
+ if (!count) return result;
+ while (true) {
+ if (count & 1) result += str;
+ count >>>= 1;
+ if (count <= 0) break;
+ str += str;
+ }
+ return result;
+};
diff --git a/source/node_modules/es5-ext/string/#/starts-with/implement.js b/source/node_modules/es5-ext/string/#/starts-with/implement.js
new file mode 100644
index 000000000..d4f1eaf54
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/starts-with/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String.prototype, 'startsWith',
+ { value: require('./shim'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/#/starts-with/index.js b/source/node_modules/es5-ext/string/#/starts-with/index.js
new file mode 100644
index 000000000..ec66a7c00
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/starts-with/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.prototype.startsWith
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/source/node_modules/es5-ext/string/#/starts-with/is-implemented.js
new file mode 100644
index 000000000..a0556f196
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/starts-with/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var str = 'razdwatrzy';
+
+module.exports = function () {
+ if (typeof str.startsWith !== 'function') return false;
+ return ((str.startsWith('trzy') === false) &&
+ (str.startsWith('raz') === true));
+};
diff --git a/source/node_modules/es5-ext/string/#/starts-with/shim.js b/source/node_modules/es5-ext/string/#/starts-with/shim.js
new file mode 100644
index 000000000..aa5aaf414
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/starts-with/shim.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var value = require('../../../object/valid-value')
+ , toInteger = require('../../../number/to-integer')
+
+ , max = Math.max, min = Math.min;
+
+module.exports = function (searchString/*, position*/) {
+ var start, self = String(value(this));
+ start = min(max(toInteger(arguments[1]), 0), self.length);
+ return (self.indexOf(searchString, start) === start);
+};
diff --git a/source/node_modules/es5-ext/string/#/uncapitalize.js b/source/node_modules/es5-ext/string/#/uncapitalize.js
new file mode 100644
index 000000000..bedd7e7b0
--- /dev/null
+++ b/source/node_modules/es5-ext/string/#/uncapitalize.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var ensureStringifiable = require('../../object/validate-stringifiable-value');
+
+module.exports = function () {
+ var str = ensureStringifiable(this);
+ return str.charAt(0).toLowerCase() + str.slice(1);
+};
diff --git a/source/node_modules/es5-ext/string/format-method.js b/source/node_modules/es5-ext/string/format-method.js
new file mode 100644
index 000000000..f1de1e301
--- /dev/null
+++ b/source/node_modules/es5-ext/string/format-method.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var isCallable = require('../object/is-callable')
+ , value = require('../object/valid-value')
+
+ , call = Function.prototype.call;
+
+module.exports = function (fmap) {
+ fmap = Object(value(fmap));
+ return function (pattern) {
+ var context = value(this);
+ pattern = String(pattern);
+ return pattern.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g,
+ function (match, token, escape) {
+ var t, r;
+ if (escape) return escape;
+ t = token;
+ while (t && !(r = fmap[t])) t = t.slice(0, -1);
+ if (!r) return match;
+ if (isCallable(r)) r = call.call(r, context);
+ return r + token.slice(t.length);
+ });
+ };
+};
diff --git a/source/node_modules/es5-ext/string/from-code-point/implement.js b/source/node_modules/es5-ext/string/from-code-point/implement.js
new file mode 100644
index 000000000..b062331cc
--- /dev/null
+++ b/source/node_modules/es5-ext/string/from-code-point/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String, 'fromCodePoint', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/from-code-point/index.js b/source/node_modules/es5-ext/string/from-code-point/index.js
new file mode 100644
index 000000000..3f3110b6e
--- /dev/null
+++ b/source/node_modules/es5-ext/string/from-code-point/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.fromCodePoint
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/from-code-point/is-implemented.js b/source/node_modules/es5-ext/string/from-code-point/is-implemented.js
new file mode 100644
index 000000000..840a20e3f
--- /dev/null
+++ b/source/node_modules/es5-ext/string/from-code-point/is-implemented.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function () {
+ var fromCodePoint = String.fromCodePoint;
+ if (typeof fromCodePoint !== 'function') return false;
+ return fromCodePoint(0x1D306, 0x61, 0x1D307) === '\ud834\udf06a\ud834\udf07';
+};
diff --git a/source/node_modules/es5-ext/string/from-code-point/shim.js b/source/node_modules/es5-ext/string/from-code-point/shim.js
new file mode 100644
index 000000000..41fd7378f
--- /dev/null
+++ b/source/node_modules/es5-ext/string/from-code-point/shim.js
@@ -0,0 +1,30 @@
+// Based on:
+// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/
+// and:
+// https://github.com/mathiasbynens/String.fromCodePoint/blob/master
+// /fromcodepoint.js
+
+'use strict';
+
+var floor = Math.floor, fromCharCode = String.fromCharCode;
+
+module.exports = function (codePoint/*, …codePoints*/) {
+ var chars = [], l = arguments.length, i, c, result = '';
+ for (i = 0; i < l; ++i) {
+ c = Number(arguments[i]);
+ if (!isFinite(c) || c < 0 || c > 0x10FFFF || floor(c) !== c) {
+ throw new RangeError("Invalid code point " + c);
+ }
+
+ if (c < 0x10000) {
+ chars.push(c);
+ } else {
+ c -= 0x10000;
+ chars.push((c >> 10) + 0xD800, (c % 0x400) + 0xDC00);
+ }
+ if (i + 1 !== l && chars.length <= 0x4000) continue;
+ result += fromCharCode.apply(null, chars);
+ chars.length = 0;
+ }
+ return result;
+};
diff --git a/source/node_modules/es5-ext/string/index.js b/source/node_modules/es5-ext/string/index.js
new file mode 100644
index 000000000..dbbcdf61f
--- /dev/null
+++ b/source/node_modules/es5-ext/string/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = {
+ '#': require('./#'),
+ formatMethod: require('./format-method'),
+ fromCodePoint: require('./from-code-point'),
+ isString: require('./is-string'),
+ randomUniq: require('./random-uniq'),
+ raw: require('./raw')
+};
diff --git a/source/node_modules/es5-ext/string/is-string.js b/source/node_modules/es5-ext/string/is-string.js
new file mode 100644
index 000000000..719aeec16
--- /dev/null
+++ b/source/node_modules/es5-ext/string/is-string.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var toString = Object.prototype.toString
+
+ , id = toString.call('');
+
+module.exports = function (x) {
+ return (typeof x === 'string') || (x && (typeof x === 'object') &&
+ ((x instanceof String) || (toString.call(x) === id))) || false;
+};
diff --git a/source/node_modules/es5-ext/string/random-uniq.js b/source/node_modules/es5-ext/string/random-uniq.js
new file mode 100644
index 000000000..54ae6f8c9
--- /dev/null
+++ b/source/node_modules/es5-ext/string/random-uniq.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var generated = Object.create(null)
+
+ , random = Math.random;
+
+module.exports = function () {
+ var str;
+ do { str = random().toString(36).slice(2); } while (generated[str]);
+ return str;
+};
diff --git a/source/node_modules/es5-ext/string/raw/implement.js b/source/node_modules/es5-ext/string/raw/implement.js
new file mode 100644
index 000000000..c417e659b
--- /dev/null
+++ b/source/node_modules/es5-ext/string/raw/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(String, 'raw', { value: require('./shim'),
+ configurable: true, enumerable: false, writable: true });
+}
diff --git a/source/node_modules/es5-ext/string/raw/index.js b/source/node_modules/es5-ext/string/raw/index.js
new file mode 100644
index 000000000..504a5de24
--- /dev/null
+++ b/source/node_modules/es5-ext/string/raw/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./is-implemented')()
+ ? String.raw
+ : require('./shim');
diff --git a/source/node_modules/es5-ext/string/raw/is-implemented.js b/source/node_modules/es5-ext/string/raw/is-implemented.js
new file mode 100644
index 000000000..d7204c0c4
--- /dev/null
+++ b/source/node_modules/es5-ext/string/raw/is-implemented.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function () {
+ var raw = String.raw, test;
+ if (typeof raw !== 'function') return false;
+ test = ['foo\nbar', 'marko\n'];
+ test.raw = ['foo\\nbar', 'marko\\n'];
+ return raw(test, 'INSE\nRT') === 'foo\\nbarINSE\nRTmarko\\n';
+};
diff --git a/source/node_modules/es5-ext/string/raw/shim.js b/source/node_modules/es5-ext/string/raw/shim.js
new file mode 100644
index 000000000..7096efbc5
--- /dev/null
+++ b/source/node_modules/es5-ext/string/raw/shim.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+ , validValue = require('../../object/valid-value')
+
+ , reduce = Array.prototype.reduce;
+
+module.exports = function (callSite/*, …substitutions*/) {
+ var args, rawValue = Object(validValue(Object(validValue(callSite)).raw));
+ if (!toPosInt(rawValue.length)) return '';
+ args = arguments;
+ return reduce.call(rawValue, function (a, b, i) {
+ return a + String(args[i]) + b;
+ });
+};
diff --git a/source/node_modules/es5-ext/test/__tad.js b/source/node_modules/es5-ext/test/__tad.js
new file mode 100644
index 000000000..884577887
--- /dev/null
+++ b/source/node_modules/es5-ext/test/__tad.js
@@ -0,0 +1,3 @@
+'use strict';
+
+exports.context = null;
diff --git a/source/node_modules/es5-ext/test/array/#/@@iterator/implement.js b/source/node_modules/es5-ext/test/array/#/@@iterator/implement.js
new file mode 100644
index 000000000..f0605399e
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/@@iterator/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/@@iterator/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/@@iterator/index.js b/source/node_modules/es5-ext/test/array/#/@@iterator/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/@@iterator/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js b/source/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/@@iterator/shim.js b/source/node_modules/es5-ext/test/array/#/@@iterator/shim.js
new file mode 100644
index 000000000..e590d8f28
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/@@iterator/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ var iterator = t.call(this);
+ a.deep(iterator.next(), { value: '1', done: false });
+ a.deep(iterator.next(), { value: '2', done: false });
+ a.deep(iterator.next(), { value: '3', done: false });
+ a.deep(iterator.next(), { value: undefined, done: true });
+};
diff --git a/source/node_modules/es5-ext/test/array/#/_compare-by-length.js b/source/node_modules/es5-ext/test/array/#/_compare-by-length.js
new file mode 100644
index 000000000..e40c305b9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/_compare-by-length.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = [4, 5, 6], y = { length: 8 }, w = {}, z = { length: 1 };
+
+ a.deep([x, y, w, z].sort(t), [w, z, x, y]);
+};
diff --git a/source/node_modules/es5-ext/test/array/#/binary-search.js b/source/node_modules/es5-ext/test/array/#/binary-search.js
new file mode 100644
index 000000000..cf3317371
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/binary-search.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var compare = function (value) { return this - value; };
+
+module.exports = function (t, a) {
+ var arr;
+ arr = [2, 5, 5, 8, 34, 67, 98, 345, 678];
+
+ // highest, equal match
+ a(t.call(arr, compare.bind(1)), 0, "All higher");
+ a(t.call(arr, compare.bind(679)), arr.length - 1, "All lower");
+ a(t.call(arr, compare.bind(4)), 0, "Mid");
+ a(t.call(arr, compare.bind(5)), 2, "Match");
+ a(t.call(arr, compare.bind(6)), 2, "Above");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/clear.js b/source/node_modules/es5-ext/test/array/#/clear.js
new file mode 100644
index 000000000..a5b1c977a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/clear.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = [1, 2, {}, 4];
+ a(t.call(x), x, "Returns same array");
+ a.deep(x, [], "Empties array");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/compact.js b/source/node_modules/es5-ext/test/array/#/compact.js
new file mode 100644
index 000000000..6390eb26d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/compact.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ a(t.call(this).length, 3);
+ },
+ "": function (t, a) {
+ var o, x, y, z;
+ o = {};
+ x = [0, 1, "", null, o, false, undefined, true];
+ y = x.slice(0);
+
+ a.not(z = t.call(x), x, "Returns different object");
+ a.deep(x, y, "Origin not changed");
+ a.deep(z, [0, 1, "", o, false, true], "Result");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/concat/implement.js b/source/node_modules/es5-ext/test/array/#/concat/implement.js
new file mode 100644
index 000000000..3bdbe8681
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/concat/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/concat/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/concat/index.js b/source/node_modules/es5-ext/test/array/#/concat/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/concat/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/concat/is-implemented.js b/source/node_modules/es5-ext/test/array/#/concat/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/concat/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/concat/shim.js b/source/node_modules/es5-ext/test/array/#/concat/shim.js
new file mode 100644
index 000000000..c30eb7eab
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/concat/shim.js
@@ -0,0 +1,26 @@
+'use strict';
+
+var SubArray = require('../../../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+ var arr = [1, 3, 45], x = {}, subArr, subArr2, result;
+
+ a.deep(t.call(arr, '2d', x, ['ere', 'fe', x], false, null),
+ [1, 3, 45, '2d', x, 'ere', 'fe', x, false, null], "Plain array");
+
+ subArr = new SubArray('lol', 'miszko');
+ subArr2 = new SubArray('elo', 'fol');
+
+ result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
+ a(result instanceof SubArray, true, "Instance of subclass");
+ a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', 'elo', 'fol', null],
+ "Spreable by default");
+
+ SubArray.prototype['@@isConcatSpreadable'] = false;
+
+ result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
+ a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', subArr2, null],
+ "Non spreadable");
+
+ delete SubArray.prototype['@@isConcatSpreadable'];
+};
diff --git a/source/node_modules/es5-ext/test/array/#/contains.js b/source/node_modules/es5-ext/test/array/#/contains.js
new file mode 100644
index 000000000..21404a17a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/contains.js
@@ -0,0 +1,21 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ a(t.call(this, this[1]), true, "Contains");
+ a(t.call(this, {}), false, "Does Not contain");
+ },
+ "": function (t, a) {
+ var o, x = {}, y = {};
+
+ o = [1, 'raz', x];
+
+ a(t.call(o, 1), true, "First");
+ a(t.call(o, '1'), false, "Type coercion");
+ a(t.call(o, 'raz'), true, "Primitive");
+ a(t.call(o, 'foo'), false, "Primitive not found");
+ a(t.call(o, x), true, "Object found");
+ a(t.call(o, y), false, "Object not found");
+ a(t.call(o, 1, 1), false, "Position");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/copy-within/implement.js b/source/node_modules/es5-ext/test/array/#/copy-within/implement.js
new file mode 100644
index 000000000..36070477d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/copy-within/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/copy-within/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/copy-within/index.js b/source/node_modules/es5-ext/test/array/#/copy-within/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/copy-within/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js b/source/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/copy-within/shim.js b/source/node_modules/es5-ext/test/array/#/copy-within/shim.js
new file mode 100644
index 000000000..93c85ea31
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/copy-within/shim.js
@@ -0,0 +1,29 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var args, x;
+
+ a.h1("2 args");
+ x = [1, 2, 3, 4, 5];
+ t.call(x, 0, 3);
+ a.deep(x, [4, 5, 3, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]);
+
+ a.h1("3 args");
+ a.deep(t.call([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]);
+
+ a.h1("Negative args");
+ a.deep(t.call([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]);
+ a.deep(t.call([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]);
+
+ a.h1("Array-likes");
+ args = { 0: 1, 1: 2, 2: 3, length: 3 };
+ a.deep(t.call(args, -2, 0), { '0': 1, '1': 1, '2': 2, length: 3 });
+};
diff --git a/source/node_modules/es5-ext/test/array/#/diff.js b/source/node_modules/es5-ext/test/array/#/diff.js
new file mode 100644
index 000000000..bcfa3a0bd
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/diff.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ a.deep(t.call(this, this), []);
+ },
+ "": function (t, a) {
+ var x = {}, y = {};
+
+ a.deep(t.call([1, 'raz', x, 2, 'trzy', y], [x, 2, 'trzy']), [1, 'raz', y],
+ "Scope longer");
+ a.deep(t.call([1, 'raz', x], [x, 2, 'trzy', 1, y]), ['raz'],
+ "Arg longer");
+ a.deep(t.call([1, 'raz', x], []), [1, 'raz', x], "Empty arg");
+ a.deep(t.call([], [1, y, 'sdfs']), [], "Empty scope");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/e-index-of.js b/source/node_modules/es5-ext/test/array/#/e-index-of.js
new file mode 100644
index 000000000..4cf6c6359
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/e-index-of.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {};
+ a(t.call([3, 'raz', {}, x, {}], x), 3, "Regular");
+ a(t.call([3, 'raz', NaN, {}, NaN], NaN), 2, "NaN");
+ a(t.call([3, 'raz', 0, {}, -0], -0), 2, "-0");
+ a(t.call([3, 'raz', -0, {}, 0], +0), 2, "+0");
+ a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 4, "fromIndex");
+ a(t.call([3, 'raz', NaN, {}, NaN], NaN, -1), 4, "fromIndex negative #1");
+ a(t.call([3, 'raz', NaN, {}, NaN], NaN, -2), 4, "fromIndex negative #2");
+ a(t.call([3, 'raz', NaN, {}, NaN], NaN, -3), 2, "fromIndex negative #3");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/e-last-index-of.js b/source/node_modules/es5-ext/test/array/#/e-last-index-of.js
new file mode 100644
index 000000000..ed4f70042
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/e-last-index-of.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {};
+ a(t.call([3, 'raz', {}, x, {}, x], x), 5, "Regular");
+ a(t.call([3, 'raz', NaN, {}, x], NaN), 2, "NaN");
+ a(t.call([3, 'raz', 0, {}, -0], -0), 4, "-0");
+ a(t.call([3, 'raz', -0, {}, 0], +0), 4, "+0");
+ a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 2, "fromIndex");
+ a(t.call([3, 'raz', NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1");
+ a(t.call([3, 'raz', NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/entries/implement.js b/source/node_modules/es5-ext/test/array/#/entries/implement.js
new file mode 100644
index 000000000..733209a1c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/entries/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/entries/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/entries/index.js b/source/node_modules/es5-ext/test/array/#/entries/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/entries/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/entries/is-implemented.js b/source/node_modules/es5-ext/test/array/#/entries/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/entries/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/entries/shim.js b/source/node_modules/es5-ext/test/array/#/entries/shim.js
new file mode 100644
index 000000000..bf40d3100
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/entries/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ var iterator = t.call(this);
+ a.deep(iterator.next(), { value: [0, '1'], done: false });
+ a.deep(iterator.next(), { value: [1, '2'], done: false });
+ a.deep(iterator.next(), { value: [2, '3'], done: false });
+ a.deep(iterator.next(), { value: undefined, done: true });
+};
diff --git a/source/node_modules/es5-ext/test/array/#/exclusion.js b/source/node_modules/es5-ext/test/array/#/exclusion.js
new file mode 100644
index 000000000..07b32d8e8
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/exclusion.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ var x = {};
+ a.deep(t.call(this, this, [this[0], this[2], x]), [x]);
+ },
+ "": function (t, a) {
+ var x = {}, y = {};
+
+ a.deep(t.call([x, y]), [x, y], "No arguments");
+ a.deep(t.call([x, 1], [], []), [x, 1], "Empty arguments");
+ a.deep(t.call([1, 'raz', x], [2, 'raz', y], [2, 'raz', x]), [1, y]);
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/fill/implement.js b/source/node_modules/es5-ext/test/array/#/fill/implement.js
new file mode 100644
index 000000000..2a01d2850
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/fill/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/fill/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/fill/index.js b/source/node_modules/es5-ext/test/array/#/fill/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/fill/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/fill/is-implemented.js b/source/node_modules/es5-ext/test/array/#/fill/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/fill/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/fill/shim.js b/source/node_modules/es5-ext/test/array/#/fill/shim.js
new file mode 100644
index 000000000..d67300fcc
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/fill/shim.js
@@ -0,0 +1,18 @@
+// Taken from https://github.com/paulmillr/es6-shim/blob/master/test/array.js
+
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+
+ x = [1, 2, 3, 4, 5, 6];
+ a(t.call(x, -1), x, "Returns self object");
+ a.deep(x, [-1, -1, -1, -1, -1, -1], "Value");
+
+ a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 3), [1, 2, 3, -1, -1, -1],
+ "Positive start");
+ a.deep(t.call([1, 2, 3, 4, 5, 6], -1, -3), [1, 2, 3, -1, -1, -1],
+ "Negative start");
+ a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 9), [1, 2, 3, 4, 5, 6],
+ "Large start");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/filter/implement.js b/source/node_modules/es5-ext/test/array/#/filter/implement.js
new file mode 100644
index 000000000..6d6b87cc3
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/filter/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/filter/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/filter/index.js b/source/node_modules/es5-ext/test/array/#/filter/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/filter/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/filter/is-implemented.js b/source/node_modules/es5-ext/test/array/#/filter/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/filter/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/filter/shim.js b/source/node_modules/es5-ext/test/array/#/filter/shim.js
new file mode 100644
index 000000000..e8b5c3984
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/filter/shim.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var SubArray = require('../../../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+ var arr, x = {}, subArr, result;
+
+ arr = ['foo', undefined, 0, '2d', false, x, null];
+
+ a.deep(t.call(arr, Boolean), ['foo', '2d', x], "Plain array");
+
+ subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
+
+ result = t.call(subArr, Boolean);
+ a(result instanceof SubArray, true, "Instance of subclass");
+ a.deep(result, ['foo', '2d', x], "Result of subclass");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/find-index/implement.js b/source/node_modules/es5-ext/test/array/#/find-index/implement.js
new file mode 100644
index 000000000..8d85e618c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find-index/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/find-index/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/find-index/index.js b/source/node_modules/es5-ext/test/array/#/find-index/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find-index/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/find-index/is-implemented.js b/source/node_modules/es5-ext/test/array/#/find-index/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find-index/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/find-index/shim.js b/source/node_modules/es5-ext/test/array/#/find-index/shim.js
new file mode 100644
index 000000000..b5fee4638
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find-index/shim.js
@@ -0,0 +1,17 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ var count = 0, o = {}, self = Object(this);
+ a(t.call(self, function (value, i, scope) {
+ a(value, this[i], "Value");
+ a(i, count++, "Index");
+ a(scope, this, "Scope");
+ }, self), -1, "Falsy result");
+ a(count, 3);
+
+ count = -1;
+ a(t.call(this, function () {
+ return ++count ? o : null;
+ }, this), 1, "Truthy result");
+ a(count, 1);
+};
diff --git a/source/node_modules/es5-ext/test/array/#/find/implement.js b/source/node_modules/es5-ext/test/array/#/find/implement.js
new file mode 100644
index 000000000..29fac41e0
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/find/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/find/index.js b/source/node_modules/es5-ext/test/array/#/find/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/find/is-implemented.js b/source/node_modules/es5-ext/test/array/#/find/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/find/shim.js b/source/node_modules/es5-ext/test/array/#/find/shim.js
new file mode 100644
index 000000000..ad2e64506
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/find/shim.js
@@ -0,0 +1,17 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ var count = 0, o = {}, self = Object(this);
+ a(t.call(self, function (value, i, scope) {
+ a(value, this[i], "Value");
+ a(i, count++, "Index");
+ a(scope, this, "Scope");
+ }, self), undefined, "Falsy result");
+ a(count, 3);
+
+ count = -1;
+ a(t.call(this, function () {
+ return ++count ? o : null;
+ }, this), this[1], "Truthy result");
+ a(count, 1);
+};
diff --git a/source/node_modules/es5-ext/test/array/#/first-index.js b/source/node_modules/es5-ext/test/array/#/first-index.js
new file mode 100644
index 000000000..4aebad64b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/first-index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a(t.call([]), null, "Empty");
+ a(t.call([null]), 0, "One value");
+ a(t.call([1, 2, 3]), 0, "Many values");
+ a(t.call(new Array(1000)), null, "Sparse empty");
+ x = [];
+ x[883] = undefined;
+ x[890] = null;
+ a(t.call(x), 883, "Manual sparse, distant value");
+ x = new Array(1000);
+ x[657] = undefined;
+ x[700] = null;
+ a(t.call(x), 657, "Sparse, distant value");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/first.js b/source/node_modules/es5-ext/test/array/#/first.js
new file mode 100644
index 000000000..87fde0357
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/first.js
@@ -0,0 +1,13 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ a(t.call(this), this[0]);
+};
+exports[''] = function (t, a) {
+ var x;
+ a(t.call([]), undefined, "Empty");
+ a(t.call(new Array(234), undefined, "Sparse empty"));
+ x = new Array(2342);
+ x[434] = {};
+ a(t.call(x), x[434], "Sparse");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/flatten.js b/source/node_modules/es5-ext/test/array/#/flatten.js
new file mode 100644
index 000000000..65f1214b0
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/flatten.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10];
+
+module.exports = {
+ __generic: function (t, a) {
+ a(t.call(this).length, 3);
+ },
+ "Nested Arrays": function (t, a) {
+ a(t.call(o).length, 10);
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/for-each-right.js b/source/node_modules/es5-ext/test/array/#/for-each-right.js
new file mode 100644
index 000000000..2d24569d9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/for-each-right.js
@@ -0,0 +1,36 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ var count = 0, first, last, x, icount = this.length;
+ t.call(this, function (item, index, col) {
+ ++count;
+ if (!first) {
+ first = item;
+ }
+ last = item;
+ x = col;
+ a(index, --icount, "Index");
+ });
+ a(count, this.length, "Iterated");
+ a(first, this[this.length - 1], "First is last");
+ a(last, this[0], "Last is first");
+ a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
+ },
+ "": function (t, a) {
+ var x = {}, y, count;
+ t.call([1], function () { y = this; }, x);
+ a(y, x, "Scope");
+ y = 0;
+ t.call([3, 4, 4], function (a, i) { y += i; });
+ a(y, 3, "Indexes");
+
+ x = [1, 3];
+ x[5] = 'x';
+ y = 0;
+ count = 0;
+ t.call(x, function (a, i) { ++count; y += i; });
+ a(y, 6, "Misssing Indexes");
+ a(count, 3, "Misssing Indexes, count");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/group.js b/source/node_modules/es5-ext/test/array/#/group.js
new file mode 100644
index 000000000..32dc8c2db
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/group.js
@@ -0,0 +1,24 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ var count = 0, self;
+
+ self = Object(this);
+ a.deep(t.call(self, function (v, i, scope) {
+ a(v, this[i], "Value");
+ a(i, count++, "Index");
+ a(scope, this, "Scope");
+ return i;
+ }, self), { 0: [this[0]], 1: [this[1]], 2: [this[2]] });
+ },
+ "": function (t, a) {
+ var r;
+ r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56],
+ function (v) {
+ return v % 2 ? 'odd' : 'even';
+ });
+ a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]);
+ a.deep(r.even, [2, 4, 6, 34, 56]);
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/indexes-of.js b/source/node_modules/es5-ext/test/array/#/indexes-of.js
new file mode 100644
index 000000000..3364170f1
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/indexes-of.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ a.deep(t.call(this, this[1]), [1]);
+ },
+ "": function (t, a) {
+ var x = {};
+ a.deep(t.call([1, 3, 5, 3, 5], 6), [], "No result");
+ a.deep(t.call([1, 3, 5, 1, 3, 5, 1], 1), [0, 3, 6], "Some results");
+ a.deep(t.call([], x), [], "Empty array");
+ a.deep(t.call([x, 3, {}, x, 3, 5, x], x), [0, 3, 6], "Search for object");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/intersection.js b/source/node_modules/es5-ext/test/array/#/intersection.js
new file mode 100644
index 000000000..b72b2fb07
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/intersection.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var toArray = require('../../../array/to-array');
+
+module.exports = {
+ __generic: function (t, a) {
+ a.deep(t.call(this, this, this), toArray(this));
+ },
+ "": function (t, a) {
+ var x = {}, y = {}, p, r;
+ a.deep(t.call([], [2, 3, 4]), [], "Empty #1");
+ a.deep(t.call([2, 3, 4], []), [], "Empty #2");
+ a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different");
+ p = t.call([3, 5, 'raz', {}, 'dwa', x], [1, 3, 'raz', 'dwa', 'trzy', x, {}],
+ [3, 'raz', x, 65]);
+ r = [3, 'raz', x];
+ p.sort();
+ r.sort();
+ a.deep(p, r, "Same parts");
+ a.deep(t.call(r, r), r, "Same");
+ a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]),
+ [1, 2, x, 4, 5, y, 7], "Long reverse same");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/is-copy.js b/source/node_modules/es5-ext/test/array/#/is-copy.js
new file mode 100644
index 000000000..e7f80e7a8
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/is-copy.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {};
+ a(t.call([], []), true, "Empty");
+ a(t.call([], {}), true, "Empty lists");
+ a(t.call([1, x, 'raz'], [1, x, 'raz']), true, "Same");
+ a(t.call([1, x, 'raz'], { 0: 1, 1: x, 2: 'raz', length: 3 }), true,
+ "Same lists");
+ a(t.call([1, x, 'raz'], [x, 1, 'raz']), false, "Diff order");
+ a(t.call([1, x], [1, x, 'raz']), false, "Diff length #1");
+ a(t.call([1, x, 'raz'], [1, x]), false, "Diff length #2");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/is-uniq.js b/source/node_modules/es5-ext/test/array/#/is-uniq.js
new file mode 100644
index 000000000..7349ba337
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/is-uniq.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {};
+ a(t.call([]), true, "Empty");
+ a(t.call({}), true, "Empty lists");
+ a(t.call([1, x, 'raz']), true, "Uniq");
+ a(t.call([1, x, 1, 'raz']), false, "Not Uniq: primitive");
+ a(t.call([1, x, '1', 'raz']), true, "Uniq: primitive");
+ a(t.call([1, x, 1, {}, 'raz']), false, "Not Uniq: Obj");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/keys/implement.js b/source/node_modules/es5-ext/test/array/#/keys/implement.js
new file mode 100644
index 000000000..b0c1aa078
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/keys/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/keys/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/keys/index.js b/source/node_modules/es5-ext/test/array/#/keys/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/keys/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/keys/is-implemented.js b/source/node_modules/es5-ext/test/array/#/keys/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/keys/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/keys/shim.js b/source/node_modules/es5-ext/test/array/#/keys/shim.js
new file mode 100644
index 000000000..a43c04cac
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/keys/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ var iterator = t.call(this);
+ a.deep(iterator.next(), { value: 0, done: false });
+ a.deep(iterator.next(), { value: 1, done: false });
+ a.deep(iterator.next(), { value: 2, done: false });
+ a.deep(iterator.next(), { value: undefined, done: true });
+};
diff --git a/source/node_modules/es5-ext/test/array/#/last-index.js b/source/node_modules/es5-ext/test/array/#/last-index.js
new file mode 100644
index 000000000..a1cac1073
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/last-index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a(t.call([]), null, "Empty");
+ a(t.call([null]), 0, "One value");
+ a(t.call([1, 2, 3]), 2, "Many values");
+ a(t.call(new Array(1000)), null, "Sparse empty");
+ x = [];
+ x[883] = null;
+ x[890] = undefined;
+ a(t.call(x), 890, "Manual sparse, distant value");
+ x = new Array(1000);
+ x[657] = null;
+ x[700] = undefined;
+ a(t.call(x), 700, "Sparse, distant value");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/last.js b/source/node_modules/es5-ext/test/array/#/last.js
new file mode 100644
index 000000000..8d051bc8d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/last.js
@@ -0,0 +1,15 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ a(t.call(this), this[this.length - 1]);
+};
+
+exports[''] = function (t, a) {
+ var x;
+ a(t.call([]), undefined, "Empty");
+ a(t.call(new Array(234), undefined, "Sparse empty"));
+ x = new Array(2342);
+ x[434] = {};
+ x[450] = {};
+ a(t.call(x), x[450], "Sparse");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/map/implement.js b/source/node_modules/es5-ext/test/array/#/map/implement.js
new file mode 100644
index 000000000..cdcbc8df6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/map/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/map/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/map/index.js b/source/node_modules/es5-ext/test/array/#/map/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/map/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/map/is-implemented.js b/source/node_modules/es5-ext/test/array/#/map/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/map/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/map/shim.js b/source/node_modules/es5-ext/test/array/#/map/shim.js
new file mode 100644
index 000000000..bbfefe8e3
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/map/shim.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var SubArray = require('../../../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+ var arr, x = {}, subArr, result;
+
+ arr = ['foo', undefined, 0, '2d', false, x, null];
+
+ a.deep(t.call(arr, Boolean), [true, false, false, true, false, true, false],
+ "Plain array");
+
+ subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
+
+ result = t.call(subArr, Boolean);
+ a(result instanceof SubArray, true, "Instance of subclass");
+ a.deep(result, [true, false, false, true, false, true, false],
+ "Result of subclass");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/remove.js b/source/node_modules/es5-ext/test/array/#/remove.js
new file mode 100644
index 000000000..3ebdca2d0
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/remove.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var y = {}, z = {}, x = [9, z, 5, y, 'foo'];
+ t.call(x, y);
+ a.deep(x, [9, z, 5, 'foo']);
+ t.call(x, {});
+ a.deep(x, [9, z, 5, 'foo'], "Not existing");
+ t.call(x, 5);
+ a.deep(x, [9, z, 'foo'], "Primitive");
+ x = [9, z, 5, y, 'foo'];
+ t.call(x, z, 5, 'foo');
+ a.deep(x, [9, y], "More than one argument");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/separate.js b/source/node_modules/es5-ext/test/array/#/separate.js
new file mode 100644
index 000000000..42918b597
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/separate.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = [], y = {}, z = {};
+ a.deep(t.call(x, y), [], "Empty");
+ a.not(t.call(x), x, "Returns copy");
+ a.deep(t.call([1], y), [1], "One");
+ a.deep(t.call([1, 'raz'], y), [1, y, 'raz'], "One");
+ a.deep(t.call([1, 'raz', x], y), [1, y, 'raz', y, x], "More");
+ x = new Array(1000);
+ x[23] = 2;
+ x[3453] = 'raz';
+ x[500] = z;
+ a.deep(t.call(x, y), [2, y, z, y, 'raz'], "Sparse");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/slice/implement.js b/source/node_modules/es5-ext/test/array/#/slice/implement.js
new file mode 100644
index 000000000..855ae2fa4
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/slice/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/slice/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/slice/index.js b/source/node_modules/es5-ext/test/array/#/slice/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/slice/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/slice/is-implemented.js b/source/node_modules/es5-ext/test/array/#/slice/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/slice/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/slice/shim.js b/source/node_modules/es5-ext/test/array/#/slice/shim.js
new file mode 100644
index 000000000..f674f3470
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/slice/shim.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var SubArray = require('../../../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+ var arr, x = {}, subArr, result;
+
+ arr = ['foo', undefined, 0, '2d', false, x, null];
+
+ a.deep(t.call(arr, 2, 4), [0, '2d'], "Plain array: result");
+
+ subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
+
+ result = t.call(subArr, 2, 4);
+ a(result instanceof SubArray, true, "Instance of subclass");
+ a.deep(result, [0, '2d'], "Subclass: result");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/some-right.js b/source/node_modules/es5-ext/test/array/#/some-right.js
new file mode 100644
index 000000000..900771a6f
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/some-right.js
@@ -0,0 +1,43 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ var count = 0, first, last, x, icount = this.length;
+ t.call(this, function (item, index, col) {
+ ++count;
+ if (!first) {
+ first = item;
+ }
+ last = item;
+ x = col;
+ a(index, --icount, "Index");
+ });
+ a(count, this.length, "Iterated");
+ a(first, this[this.length - 1], "First is last");
+ a(last, this[0], "Last is first");
+ a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
+ },
+ "": function (t, a) {
+ var x = {}, y, count;
+ t.call([1], function () { y = this; }, x);
+ a(y, x, "Scope");
+ y = 0;
+ t.call([3, 4, 4], function (a, i) { y += i; });
+ a(y, 3, "Indexes");
+
+ x = [1, 3];
+ x[5] = 'x';
+ y = 0;
+ count = 0;
+ a(t.call(x, function (a, i) { ++count; y += i; }), false, "Return");
+ a(y, 6, "Misssing Indexes");
+ a(count, 3, "Misssing Indexes, count");
+
+ count = 0;
+ a(t.call([-2, -3, -4, 2, -5], function (item) {
+ ++count;
+ return item > 0;
+ }), true, "Return");
+ a(count, 2, "Break after true is returned");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/splice/implement.js b/source/node_modules/es5-ext/test/array/#/splice/implement.js
new file mode 100644
index 000000000..0d9f46188
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/splice/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/splice/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/splice/index.js b/source/node_modules/es5-ext/test/array/#/splice/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/splice/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/splice/is-implemented.js b/source/node_modules/es5-ext/test/array/#/splice/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/splice/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/splice/shim.js b/source/node_modules/es5-ext/test/array/#/splice/shim.js
new file mode 100644
index 000000000..2c751e672
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/splice/shim.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var SubArray = require('../../../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+ var arr, x = {}, subArr, result;
+
+ arr = ['foo', undefined, 0, '2d', false, x, null];
+
+ a.deep(t.call(arr, 2, 2, 'bar'), [0, '2d'], "Plain array: result");
+ a.deep(arr, ["foo", undefined, "bar", false, x, null], "Plain array: change");
+
+ subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
+
+ result = t.call(subArr, 2, 2, 'bar');
+ a(result instanceof SubArray, true, "Instance of subclass");
+ a.deep(result, [0, '2d'], "Subclass: result");
+ a.deep(subArr, ["foo", undefined, "bar", false, x, null], "Subclass: change");
+};
diff --git a/source/node_modules/es5-ext/test/array/#/uniq.js b/source/node_modules/es5-ext/test/array/#/uniq.js
new file mode 100644
index 000000000..2f7e6c4ed
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/uniq.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = {
+ __generic: function (t, a) {
+ a(t.call(this).length, 3);
+ },
+ "": function (t, a) {
+ var o, x = {}, y = {}, z = {}, w;
+ o = [1, 2, x, 3, 1, 'raz', '1', y, x, 'trzy', z, 'raz'];
+
+ a.not(w = t.call(o), o, "Returns different object");
+ a.deep(w, [1, 2, x, 3, 'raz', '1', y, 'trzy', z], "Result");
+ }
+};
diff --git a/source/node_modules/es5-ext/test/array/#/values/implement.js b/source/node_modules/es5-ext/test/array/#/values/implement.js
new file mode 100644
index 000000000..9f40138c2
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/values/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../array/#/values/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/#/values/index.js b/source/node_modules/es5-ext/test/array/#/values/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/values/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/#/values/is-implemented.js b/source/node_modules/es5-ext/test/array/#/values/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/values/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/#/values/shim.js b/source/node_modules/es5-ext/test/array/#/values/shim.js
new file mode 100644
index 000000000..e590d8f28
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/#/values/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+exports.__generic = function (t, a) {
+ var iterator = t.call(this);
+ a.deep(iterator.next(), { value: '1', done: false });
+ a.deep(iterator.next(), { value: '2', done: false });
+ a.deep(iterator.next(), { value: '3', done: false });
+ a.deep(iterator.next(), { value: undefined, done: true });
+};
diff --git a/source/node_modules/es5-ext/test/array/__scopes.js b/source/node_modules/es5-ext/test/array/__scopes.js
new file mode 100644
index 000000000..6bfdcbc94
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/__scopes.js
@@ -0,0 +1,11 @@
+'use strict';
+
+exports.Array = ['1', '2', '3'];
+
+exports.Arguments = (function () {
+ return arguments;
+}('1', '2', '3'));
+
+exports.String = "123";
+
+exports.Object = { 0: '1', 1: '2', 2: '3', 3: '4', length: 3 };
diff --git a/source/node_modules/es5-ext/test/array/_is-extensible.js b/source/node_modules/es5-ext/test/array/_is-extensible.js
new file mode 100644
index 000000000..d387126fe
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/_is-extensible.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(typeof t, 'boolean');
+};
diff --git a/source/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js b/source/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js
new file mode 100644
index 000000000..29d8699d4
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var isArray = Array.isArray;
+
+module.exports = function (t, a) {
+ t((t === null) || isArray(t.prototype), true);
+};
diff --git a/source/node_modules/es5-ext/test/array/_sub-array-dummy.js b/source/node_modules/es5-ext/test/array/_sub-array-dummy.js
new file mode 100644
index 000000000..29d8699d4
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/_sub-array-dummy.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var isArray = Array.isArray;
+
+module.exports = function (t, a) {
+ t((t === null) || isArray(t.prototype), true);
+};
diff --git a/source/node_modules/es5-ext/test/array/from/implement.js b/source/node_modules/es5-ext/test/array/from/implement.js
new file mode 100644
index 000000000..e0db846f9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/from/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../array/from/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/from/index.js b/source/node_modules/es5-ext/test/array/from/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/from/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/from/is-implemented.js b/source/node_modules/es5-ext/test/array/from/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/from/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/from/shim.js b/source/node_modules/es5-ext/test/array/from/shim.js
new file mode 100644
index 000000000..310302ac4
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/from/shim.js
@@ -0,0 +1,60 @@
+// Some tests taken from: https://github.com/mathiasbynens/Array.from/blob/master/tests/tests.js
+
+'use strict';
+
+module.exports = function (t, a) {
+ var o = [1, 2, 3], MyType;
+ a.not(t(o), o, "Array");
+ a.deep(t(o), o, "Array: same content");
+ a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
+ a.deep(t((function () { return arguments; }(3, o, 'raz'))),
+ [3, o, 'raz'], "Arguments");
+ a.deep(t((function () { return arguments; }(3))), [3],
+ "Arguments with one numeric value");
+
+ a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
+
+ a.deep(t(o, function (val) { return (val + 2) * 10; }, 10), [30, 40, 50],
+ "Mapping");
+
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.deep(t(3), [], "Primitive");
+
+ a(t.length, 1, "Length");
+ a.deep(t({ length: 0 }), [], "No values Array-like");
+ a.deep(t({ length: -1 }), [], "Invalid length Array-like");
+ a.deep(t({ length: -Infinity }), [], "Invalid length Array-like #2");
+ a.throws(function () { t(undefined); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "Null");
+ a.deep(t(false), [], "Boolean");
+ a.deep(t(-Infinity), [], "Inifity");
+ a.deep(t(-0), [], "-0");
+ a.deep(t(+0), [], "+0");
+ a.deep(t(1), [], "1");
+ a.deep(t(+Infinity), [], "+Infinity");
+ a.deep(t({}), [], "Plain object");
+ a.deep(t({ length: 1 }), [undefined], "Sparse array-like");
+ a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return x + x; }), ['aa', 'bb'],
+ "Map");
+ a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, undefined),
+ ['undefined', 'undefined'], "Map context");
+ a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, 'x'),
+ ['x', 'x'], "Map primitive context");
+ a.throws(function () { t({}, 'foo', 'x'); }, TypeError, "Non callable for map");
+
+ a.deep(t.call(null, { length: 1, '0': 'a' }), ['a'], "Null context");
+
+ a(t({ __proto__: { '0': 'abc', length: 1 } })[0], 'abc', "Values on prototype");
+
+ a.throws(function () { t.call(function () { return Object.freeze({}); }, {}); },
+ TypeError, "Contructor producing freezed objects");
+
+ // Ensure no setters are called for the indexes
+ // Ensure no setters are called for the indexes
+ MyType = function () {};
+ Object.defineProperty(MyType.prototype, '0', {
+ set: function (x) { throw new Error('Setter called: ' + x); }
+ });
+ a.deep(t.call(MyType, { '0': 'abc', length: 1 }), { '0': 'abc', length: 1 },
+ "Defined not set");
+};
diff --git a/source/node_modules/es5-ext/test/array/generate.js b/source/node_modules/es5-ext/test/array/generate.js
new file mode 100644
index 000000000..d72e05688
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/generate.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {}, y = {};
+ a.deep(t(3), [undefined, undefined, undefined], "Just length");
+ a.deep(t(0, 'x'), [], "No repeat");
+ a.deep(t(1, x, y), [x], "Arguments length larger than repeat number");
+ a.deep(t(3, x), [x, x, x], "Single argument");
+ a.deep(t(5, x, y), [x, y, x, y, x], "Many arguments");
+};
diff --git a/source/node_modules/es5-ext/test/array/is-plain-array.js b/source/node_modules/es5-ext/test/array/is-plain-array.js
new file mode 100644
index 000000000..871a08aec
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/is-plain-array.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var SubArray = require('../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+ var arr = [1, 2, 3];
+ a(t(arr), true, "Array");
+ a(t(null), false, "Null");
+ a(t(), false, "Undefined");
+ a(t('234'), false, "String");
+ a(t(23), false, "Number");
+ a(t({}), false, "Plain object");
+ a(t({ length: 1, 0: 'raz' }), false, "Array-like");
+ a(t(Object.create(arr)), false, "Array extension");
+ if (!SubArray) return;
+ a(t(new SubArray(23)), false, "Subclass instance");
+ a(t(Array.prototype), false, "Array.prototype");
+};
diff --git a/source/node_modules/es5-ext/test/array/of/implement.js b/source/node_modules/es5-ext/test/array/of/implement.js
new file mode 100644
index 000000000..30d53be2d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/of/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../array/of/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/array/of/index.js b/source/node_modules/es5-ext/test/array/of/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/of/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/array/of/is-implemented.js b/source/node_modules/es5-ext/test/array/of/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/of/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/array/of/shim.js b/source/node_modules/es5-ext/test/array/of/shim.js
new file mode 100644
index 000000000..e6974420c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/of/shim.js
@@ -0,0 +1,68 @@
+// Most tests taken from https://github.com/mathiasbynens/Array.of/blob/master/tests/tests.js
+// Thanks @mathiasbynens
+
+'use strict';
+
+var defineProperty = Object.defineProperty;
+
+module.exports = function (t, a) {
+ var x = {}, testObject, MyType;
+
+ a.deep(t(), [], "No arguments");
+ a.deep(t(3), [3], "One numeric argument");
+ a.deep(t(3, 'raz', null, x, undefined), [3, 'raz', null, x, undefined],
+ "Many arguments");
+
+ a(t.length, 0, "Length");
+
+ a.deep(t('abc'), ['abc'], "String");
+ a.deep(t(undefined), [undefined], "Undefined");
+ a.deep(t(null), [null], "Null");
+ a.deep(t(false), [false], "Boolean");
+ a.deep(t(-Infinity), [-Infinity], "Infinity");
+ a.deep(t(-0), [-0], "-0");
+ a.deep(t(+0), [+0], "+0");
+ a.deep(t(1), [1], "1");
+ a.deep(t(1, 2, 3), [1, 2, 3], "Numeric args");
+ a.deep(t(+Infinity), [+Infinity], "+Infinity");
+ a.deep(t({ '0': 'a', '1': 'b', '2': 'c', length: 3 }),
+ [{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array like");
+ a.deep(t(undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity),
+ [undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy arguments");
+
+ a.h1("Null context");
+ a.deep(t.call(null, 'abc'), ['abc'], "String");
+ a.deep(t.call(null, undefined), [undefined], "Undefined");
+ a.deep(t.call(null, null), [null], "Null");
+ a.deep(t.call(null, false), [false], "Boolean");
+ a.deep(t.call(null, -Infinity), [-Infinity], "-Infinity");
+ a.deep(t.call(null, -0), [-0], "-0");
+ a.deep(t.call(null, +0), [+0], "+0");
+ a.deep(t.call(null, 1), [1], "1");
+ a.deep(t.call(null, 1, 2, 3), [1, 2, 3], "Numeric");
+ a.deep(t.call(null, +Infinity), [+Infinity], "+Infinity");
+ a.deep(t.call(null, { '0': 'a', '1': 'b', '2': 'c', length: 3 }),
+ [{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array-like");
+ a.deep(t.call(null, undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity),
+ [undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy");
+
+ a.h1("Other constructor context");
+ a.deep(t.call(Object, 1, 2, 3), { '0': 1, '1': 2, '2': 3, length: 3 }, "Many arguments");
+
+ testObject = Object(3);
+ testObject[0] = 1;
+ testObject[1] = 2;
+ testObject[2] = 3;
+ testObject.length = 3;
+ a.deep(t.call(Object, 1, 2, 3), testObject, "Test object");
+ a(t.call(Object).length, 0, "No arguments");
+ a.throws(function () { t.call(function () { return Object.freeze({}); }); }, TypeError,
+ "Frozen instance");
+
+ // Ensure no setters are called for the indexes
+ MyType = function () {};
+ defineProperty(MyType.prototype, '0', {
+ set: function (x) { throw new Error('Setter called: ' + x); }
+ });
+ a.deep(t.call(MyType, 'abc'), { '0': 'abc', length: 1 }, "Define, not set");
+};
diff --git a/source/node_modules/es5-ext/test/array/to-array.js b/source/node_modules/es5-ext/test/array/to-array.js
new file mode 100644
index 000000000..4985b5eae
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/to-array.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = [1, 2, 3];
+ a(t(o), o, "Array");
+ a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
+ a.deep(t((function () { return arguments; }(3, o, 'raz'))),
+ [3, o, 'raz'], "Arguments");
+ a.deep(t((function () { return arguments; }(3))), [3],
+ "Arguments with one numeric value");
+
+ a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
+};
diff --git a/source/node_modules/es5-ext/test/array/valid-array.js b/source/node_modules/es5-ext/test/array/valid-array.js
new file mode 100644
index 000000000..3732192d1
--- /dev/null
+++ b/source/node_modules/es5-ext/test/array/valid-array.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "Null");
+ a.throws(function () { t(0); }, TypeError, "Number");
+ a.throws(function () { t(true); }, TypeError, "Boolean");
+ a.throws(function () { t('raz'); }, TypeError, "String");
+ a.throws(function () { t(function () {}); }, TypeError, "Function");
+ a.throws(function () { t({}); }, TypeError, "Object");
+ a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
+ a(t(x = []), x, "Array");
+};
diff --git a/source/node_modules/es5-ext/test/boolean/is-boolean.js b/source/node_modules/es5-ext/test/boolean/is-boolean.js
new file mode 100644
index 000000000..4e6b3cb73
--- /dev/null
+++ b/source/node_modules/es5-ext/test/boolean/is-boolean.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t('arar'), false, "String");
+ a(t(12), false, "Number");
+ a(t(false), true, "Boolean");
+ a(t(new Boolean(false)), true, "Boolean object");
+ a(t(new Date()), false, "Date");
+ a(t(new String('raz')), false, "String object");
+ a(t({}), false, "Plain object");
+ a(t(/a/), false, "Regular expression");
+};
diff --git a/source/node_modules/es5-ext/test/date/#/copy.js b/source/node_modules/es5-ext/test/date/#/copy.js
new file mode 100644
index 000000000..767c5e16a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/#/copy.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = new Date(), o2;
+
+ o2 = t.call(o);
+ a.not(o, o2, "Different objects");
+ a.ok(o2 instanceof Date, "Instance of Date");
+ a(o.getTime(), o2.getTime(), "Same time");
+};
diff --git a/source/node_modules/es5-ext/test/date/#/days-in-month.js b/source/node_modules/es5-ext/test/date/#/days-in-month.js
new file mode 100644
index 000000000..9ddba55f7
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/#/days-in-month.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(new Date(2001, 0, 1)), 31, "January");
+ a(t.call(new Date(2001, 1, 1)), 28, "February");
+ a(t.call(new Date(2000, 1, 1)), 29, "February (leap)");
+ a(t.call(new Date(2001, 2, 1)), 31, "March");
+ a(t.call(new Date(2001, 3, 1)), 30, "April");
+ a(t.call(new Date(2001, 4, 1)), 31, "May");
+ a(t.call(new Date(2001, 5, 1)), 30, "June");
+ a(t.call(new Date(2001, 6, 1)), 31, "July");
+ a(t.call(new Date(2001, 7, 1)), 31, "August");
+ a(t.call(new Date(2001, 8, 1)), 30, "September");
+ a(t.call(new Date(2001, 9, 1)), 31, "October");
+ a(t.call(new Date(2001, 10, 1)), 30, "November");
+ a(t.call(new Date(2001, 11, 1)), 31, "December");
+};
diff --git a/source/node_modules/es5-ext/test/date/#/floor-day.js b/source/node_modules/es5-ext/test/date/#/floor-day.js
new file mode 100644
index 000000000..d4f4a9087
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/#/floor-day.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(),
+ new Date(2000, 0, 1).valueOf());
+};
diff --git a/source/node_modules/es5-ext/test/date/#/floor-month.js b/source/node_modules/es5-ext/test/date/#/floor-month.js
new file mode 100644
index 000000000..b4a81bef6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/#/floor-month.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(),
+ new Date(2000, 0, 1).valueOf());
+};
diff --git a/source/node_modules/es5-ext/test/date/#/floor-year.js b/source/node_modules/es5-ext/test/date/#/floor-year.js
new file mode 100644
index 000000000..aae117e76
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/#/floor-year.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(),
+ new Date(2000, 0, 1).valueOf());
+};
diff --git a/source/node_modules/es5-ext/test/date/#/format.js b/source/node_modules/es5-ext/test/date/#/format.js
new file mode 100644
index 000000000..e68e4bf78
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/#/format.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var dt = new Date(2011, 2, 3, 3, 5, 5, 32);
+ a(t.call(dt, ' %Y.%y.%m.%d.%H.%M.%S.%L '), ' 2011.11.03.03.03.05.05.032 ');
+};
diff --git a/source/node_modules/es5-ext/test/date/is-date.js b/source/node_modules/es5-ext/test/date/is-date.js
new file mode 100644
index 000000000..109093dfb
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/is-date.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t('arar'), false, "String");
+ a(t(12), false, "Number");
+ a(t(true), false, "Boolean");
+ a(t(new Date()), true, "Date");
+ a(t(new String('raz')), false, "String object");
+ a(t({}), false, "Plain object");
+};
diff --git a/source/node_modules/es5-ext/test/date/valid-date.js b/source/node_modules/es5-ext/test/date/valid-date.js
new file mode 100644
index 000000000..98787e407
--- /dev/null
+++ b/source/node_modules/es5-ext/test/date/valid-date.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var d = new Date();
+ a(t(d), d, "Date");
+ a.throws(function () {
+ t({});
+ }, "Object");
+ a.throws(function () {
+ t({ valueOf: function () { return 20; } });
+ }, "Number object");
+};
diff --git a/source/node_modules/es5-ext/test/error/#/throw.js b/source/node_modules/es5-ext/test/error/#/throw.js
new file mode 100644
index 000000000..1213cfc3b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/error/#/throw.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var e = new Error();
+ try {
+ t.call(e);
+ } catch (e2) {
+ a(e2, e);
+ }
+};
diff --git a/source/node_modules/es5-ext/test/error/custom.js b/source/node_modules/es5-ext/test/error/custom.js
new file mode 100644
index 000000000..d4ff500c9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/error/custom.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var T = t, err = new T('My Error', 'MY_ERROR', { errno: 123 });
+ a(err instanceof Error, true, "Instance of error");
+ a(err.constructor, Error, "Constructor");
+ a(err.name, 'Error', "Name");
+ a(String(err), 'Error: My Error', "String representation");
+ a(err.code, 'MY_ERROR', "Code");
+ a(err.errno, 123, "Errno");
+ a(typeof err.stack, 'string', "Stack trace");
+};
diff --git a/source/node_modules/es5-ext/test/error/is-error.js b/source/node_modules/es5-ext/test/error/is-error.js
new file mode 100644
index 000000000..f8b5e2000
--- /dev/null
+++ b/source/node_modules/es5-ext/test/error/is-error.js
@@ -0,0 +1,16 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(), false, "Undefined");
+ a(t(1), false, "Primitive");
+ a(t({}), false, "Objectt");
+ a(t({ toString: function () { return '[object Error]'; } }), false,
+ "Fake error");
+ a(t(new Error()), true, "Error");
+ a(t(new EvalError()), true, "EvalError");
+ a(t(new RangeError()), true, "RangeError");
+ a(t(new ReferenceError()), true, "ReferenceError");
+ a(t(new SyntaxError()), true, "SyntaxError");
+ a(t(new TypeError()), true, "TypeError");
+ a(t(new URIError()), true, "URIError");
+};
diff --git a/source/node_modules/es5-ext/test/error/valid-error.js b/source/node_modules/es5-ext/test/error/valid-error.js
new file mode 100644
index 000000000..e04cdb33b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/error/valid-error.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var e = new Error();
+ a(t(e), e, "Error");
+ a.throws(function () {
+ t({});
+ }, "Other");
+};
diff --git a/source/node_modules/es5-ext/test/function/#/compose.js b/source/node_modules/es5-ext/test/function/#/compose.js
new file mode 100644
index 000000000..83de5e844
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/compose.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var f = function (a, b) { return ['a', arguments.length, a, b]; }
+ , g = function (a) { return ['b', arguments.length].concat(a); }
+ , h = function (a) { return ['c', arguments.length].concat(a); };
+
+module.exports = function (t, a) {
+ a.deep(t.call(h, g, f)(1, 2), ['c', 1, 'b', 1, 'a', 2, 1, 2]);
+};
diff --git a/source/node_modules/es5-ext/test/function/#/copy.js b/source/node_modules/es5-ext/test/function/#/copy.js
new file mode 100644
index 000000000..7a22e2f24
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/copy.js
@@ -0,0 +1,19 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var foo = 'raz', bar = 'dwa'
+ , fn = function marko(a, b) { return this + a + b + foo + bar; }
+ , result, o = {};
+
+ fn.prototype = o;
+
+ fn.foo = 'raz';
+
+ result = t.call(fn);
+
+ a(result.length, fn.length, "Length");
+ a(result.name, fn.name, "Length");
+ a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Body");
+ a(result.prototype, fn.prototype, "Prototype");
+ a(result.foo, fn.foo, "Custom property");
+};
diff --git a/source/node_modules/es5-ext/test/function/#/curry.js b/source/node_modules/es5-ext/test/function/#/curry.js
new file mode 100644
index 000000000..18fb0389e
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/curry.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var toArray = require('../../../array/to-array')
+
+ , f = function () { return toArray(arguments); };
+
+module.exports = function (t, a) {
+ var x, y = {}, z;
+ a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments");
+ x = t.call(f, 5, {});
+ a(x.length, 5, "Length #1");
+ z = x(1, 2);
+ a(z.length, 3, "Length #2");
+ z = z(3, 4);
+ a(z.length, 1, "Length #1");
+ a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments");
+ a.deep(x(8, 3)(y, 45)('raz', 6), [8, 3, y, 45, 'raz'], "Many arguments #2");
+};
diff --git a/source/node_modules/es5-ext/test/function/#/lock.js b/source/node_modules/es5-ext/test/function/#/lock.js
new file mode 100644
index 000000000..44a12d7b5
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/lock.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(function () {
+ return arguments.length;
+ })(1, 2, 3), 0);
+};
diff --git a/source/node_modules/es5-ext/test/function/#/not.js b/source/node_modules/es5-ext/test/function/#/not.js
new file mode 100644
index 000000000..c0f5e9d4b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/not.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var identity = require('../../../function/identity')
+ , noop = require('../../../function/noop');
+
+module.exports = function (t, a) {
+ a(t.call(identity)(''), true, "Falsy");
+ a(t.call(noop)(), true, "Undefined");
+ a(t.call(identity)({}), false, "Any object");
+ a(t.call(identity)(true), false, "True");
+};
diff --git a/source/node_modules/es5-ext/test/function/#/partial.js b/source/node_modules/es5-ext/test/function/#/partial.js
new file mode 100644
index 000000000..bd00ce752
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/partial.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var toArray = require('../../../array/to-array')
+
+ , f = function () { return toArray(arguments); };
+
+module.exports = function (t, a) {
+ a.deep(t.call(f, 1)(2, 3), [1, 2, 3]);
+};
diff --git a/source/node_modules/es5-ext/test/function/#/spread.js b/source/node_modules/es5-ext/test/function/#/spread.js
new file mode 100644
index 000000000..b82dfecfe
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/spread.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var f = function (a, b) { return this[a] + this[b]; }
+ , o = { a: 3, b: 4 };
+
+module.exports = function (t, a) {
+ a(t.call(f).call(o, ['a', 'b']), 7);
+};
diff --git a/source/node_modules/es5-ext/test/function/#/to-string-tokens.js b/source/node_modules/es5-ext/test/function/#/to-string-tokens.js
new file mode 100644
index 000000000..4c54d3035
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/#/to-string-tokens.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t.call(function (a, b) { return this[a] + this[b]; }),
+ { args: 'a, b', body: ' return this[a] + this[b]; ' });
+ a.deep(t.call(function () {}),
+ { args: '', body: '' });
+ a.deep(t.call(function (raz) {}),
+ { args: 'raz', body: '' });
+ a.deep(t.call(function () { Object(); }),
+ { args: '', body: ' Object(); ' });
+};
diff --git a/source/node_modules/es5-ext/test/function/_define-length.js b/source/node_modules/es5-ext/test/function/_define-length.js
new file mode 100644
index 000000000..8f037e857
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/_define-length.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var foo = 'raz', bar = 'dwa'
+ , fn = function (a, b) { return this + a + b + foo + bar; }
+ , result;
+
+ result = t(fn, 3);
+ a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Content");
+ a(result.length, 3, "Length");
+ a(result.prototype, fn.prototype, "Prototype");
+};
diff --git a/source/node_modules/es5-ext/test/function/constant.js b/source/node_modules/es5-ext/test/function/constant.js
new file mode 100644
index 000000000..fda52aa43
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/constant.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var o = {};
+
+module.exports = function (t, a) {
+ a(t(o)(), o);
+};
diff --git a/source/node_modules/es5-ext/test/function/identity.js b/source/node_modules/es5-ext/test/function/identity.js
new file mode 100644
index 000000000..8013e2e5a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/identity.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var o = {};
+
+module.exports = function (t, a) {
+ a(t(o), o);
+};
diff --git a/source/node_modules/es5-ext/test/function/invoke.js b/source/node_modules/es5-ext/test/function/invoke.js
new file mode 100644
index 000000000..fcce4aaaa
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/invoke.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var constant = require('../../function/constant')
+
+ , o = { b: constant('c') };
+
+module.exports = function (t, a) {
+ a(t('b')(o), 'c');
+};
diff --git a/source/node_modules/es5-ext/test/function/is-arguments.js b/source/node_modules/es5-ext/test/function/is-arguments.js
new file mode 100644
index 000000000..f8de8812a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/is-arguments.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var args, dummy;
+ args = (function () { return arguments; }());
+ dummy = { '0': 1, '1': 2 };
+ Object.defineProperty(dummy, 'length', { value: 2 });
+ a(t(args), true, "Arguments");
+ a(t(dummy), false, "Dummy");
+ a(t([]), false, "Array");
+};
diff --git a/source/node_modules/es5-ext/test/function/is-function.js b/source/node_modules/es5-ext/test/function/is-function.js
new file mode 100644
index 000000000..83acc42f9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/is-function.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var o = { call: Function.prototype.call, apply: Function.prototype.apply };
+
+module.exports = function (t, a) {
+ a(t(function () {}), true, "Function is function");
+ a(t(o), false, "Plain object is not function");
+};
diff --git a/source/node_modules/es5-ext/test/function/noop.js b/source/node_modules/es5-ext/test/function/noop.js
new file mode 100644
index 000000000..4305c6fcf
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/noop.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(typeof t(1, 2, 3), 'undefined');
+};
diff --git a/source/node_modules/es5-ext/test/function/pluck.js b/source/node_modules/es5-ext/test/function/pluck.js
new file mode 100644
index 000000000..5bf9583ad
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/pluck.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var o = { foo: 'bar' };
+
+module.exports = function (t, a) {
+ a(t('foo')(o), o.foo);
+};
diff --git a/source/node_modules/es5-ext/test/function/valid-function.js b/source/node_modules/es5-ext/test/function/valid-function.js
new file mode 100644
index 000000000..59b16233b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/function/valid-function.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var f = function () {};
+ a(t(f), f, "Function");
+ f = new Function();
+ a(t(f), f, "Function");
+ a.throws(function () {
+ t({});
+ }, "Object");
+ a.throws(function () {
+ t(/re/);
+ }, "RegExp");
+ a.throws(function () {
+ t({ call: function () { return 20; } });
+ }, "Plain object");
+};
diff --git a/source/node_modules/es5-ext/test/global.js b/source/node_modules/es5-ext/test/global.js
new file mode 100644
index 000000000..1f452aefb
--- /dev/null
+++ b/source/node_modules/es5-ext/test/global.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.ok(t && typeof t === 'object');
+};
diff --git a/source/node_modules/es5-ext/test/iterable/for-each.js b/source/node_modules/es5-ext/test/iterable/for-each.js
new file mode 100644
index 000000000..0fed8ad89
--- /dev/null
+++ b/source/node_modules/es5-ext/test/iterable/for-each.js
@@ -0,0 +1,40 @@
+'use strict';
+
+var ArrayIterator = require('es6-iterator/array')
+
+ , slice = Array.prototype.slice;
+
+module.exports = function (t, a) {
+ var i = 0, x = ['raz', 'dwa', 'trzy'], y = {};
+ t(x, function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
+ a(this, y, "Array: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t((function () { return arguments; }('raz', 'dwa', 'trzy')), function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#");
+ a(this, y, "Arguments: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t({ 0: 'raz', 1: 'dwa', 2: 'trzy', length: 3 }, function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Array-like" + i + "#");
+ a(this, y, "Array-like: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t(x = 'foo', function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
+ a(this, y, "Regular String: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ x = ['r', '💩', 'z'];
+ t('r💩z', function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
+ a(this, y, "Unicode String: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t(new ArrayIterator(x), function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
+ a(this, y, "Iterator: context: " + (i++) + "#");
+ }, y);
+
+};
diff --git a/source/node_modules/es5-ext/test/iterable/is.js b/source/node_modules/es5-ext/test/iterable/is.js
new file mode 100644
index 000000000..c0d2a43eb
--- /dev/null
+++ b/source/node_modules/es5-ext/test/iterable/is.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (t, a) {
+ var x;
+ a(t([]), true, "Array");
+ a(t(""), true, "String");
+ a(t((function () { return arguments; }())), true, "Arguments");
+ a(t({ length: 0 }), true, "List object");
+ a(t(function () {}), false, "Function");
+ a(t({}), false, "Plain object");
+ a(t(/raz/), false, "Regexp");
+ a(t(), false, "No argument");
+ a(t(null), false, "Null");
+ a(t(undefined), false, "Undefined");
+ x = {};
+ x[iteratorSymbol] = function () {};
+ a(t(x), true, "Iterable");
+};
diff --git a/source/node_modules/es5-ext/test/iterable/validate-object.js b/source/node_modules/es5-ext/test/iterable/validate-object.js
new file mode 100644
index 000000000..da12529bc
--- /dev/null
+++ b/source/node_modules/es5-ext/test/iterable/validate-object.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(0); }, TypeError, "0");
+ a.throws(function () { t(false); }, TypeError, "false");
+ a.throws(function () { t(''); }, TypeError, "String");
+ a.throws(function () { t({}); }, TypeError, "Plain Object");
+ a.throws(function () { t(function () {}); }, TypeError, "Function");
+ a(t(x = new String('raz')), x, "String object"); //jslint: ignore
+
+ a(t(x = { length: 1 }), x, "Array like");
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "null");
+ x = {};
+ x[iteratorSymbol] = function () {};
+ a(t(x), x, "Iterable");
+};
diff --git a/source/node_modules/es5-ext/test/iterable/validate.js b/source/node_modules/es5-ext/test/iterable/validate.js
new file mode 100644
index 000000000..bcc2ad3d0
--- /dev/null
+++ b/source/node_modules/es5-ext/test/iterable/validate.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(0); }, TypeError, "0");
+ a.throws(function () { t(false); }, TypeError, "false");
+ a(t(''), '', "''");
+ a.throws(function () { t({}); }, TypeError, "Plain Object");
+ a.throws(function () { t(function () {}); }, TypeError, "Function");
+ a(t(x = new String('raz')), x, "String object"); //jslint: ignore
+
+ a(t(x = { length: 1 }), x, "Array like");
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "null");
+ x = {};
+ x[iteratorSymbol] = function () {};
+ a(t(x), x, "Iterable");
+};
diff --git a/source/node_modules/es5-ext/test/math/_pack-ieee754.js b/source/node_modules/es5-ext/test/math/_pack-ieee754.js
new file mode 100644
index 000000000..9041431d7
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/_pack-ieee754.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t(1.337, 8, 23), [63, 171, 34, 209]);
+};
diff --git a/source/node_modules/es5-ext/test/math/_unpack-ieee754.js b/source/node_modules/es5-ext/test/math/_unpack-ieee754.js
new file mode 100644
index 000000000..ca30b8208
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/_unpack-ieee754.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661);
+};
diff --git a/source/node_modules/es5-ext/test/math/acosh/implement.js b/source/node_modules/es5-ext/test/math/acosh/implement.js
new file mode 100644
index 000000000..01fb6d082
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/acosh/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/acosh/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/acosh/index.js b/source/node_modules/es5-ext/test/math/acosh/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/acosh/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/acosh/is-implemented.js b/source/node_modules/es5-ext/test/math/acosh/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/acosh/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/acosh/shim.js b/source/node_modules/es5-ext/test/math/acosh/shim.js
new file mode 100644
index 000000000..3d710c793
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/acosh/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-1), NaN, "Negative");
+ a(t(0), NaN, "Zero");
+ a(t(0.5), NaN, "Below 1");
+ a(t(1), 0, "1");
+ a(t(2), 1.3169578969248166, "Other");
+ a(t(Infinity), Infinity, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/math/asinh/implement.js b/source/node_modules/es5-ext/test/math/asinh/implement.js
new file mode 100644
index 000000000..d1fceceee
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/asinh/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/asinh/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/asinh/index.js b/source/node_modules/es5-ext/test/math/asinh/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/asinh/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/asinh/is-implemented.js b/source/node_modules/es5-ext/test/math/asinh/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/asinh/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/asinh/shim.js b/source/node_modules/es5-ext/test/math/asinh/shim.js
new file mode 100644
index 000000000..d9fbe49ed
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/asinh/shim.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(-2), -1.4436354751788103, "Negative");
+ a(t(2), 1.4436354751788103, "Positive");
+};
diff --git a/source/node_modules/es5-ext/test/math/atanh/implement.js b/source/node_modules/es5-ext/test/math/atanh/implement.js
new file mode 100644
index 000000000..cba8fad83
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/atanh/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/atanh/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/atanh/index.js b/source/node_modules/es5-ext/test/math/atanh/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/atanh/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/atanh/is-implemented.js b/source/node_modules/es5-ext/test/math/atanh/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/atanh/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/atanh/shim.js b/source/node_modules/es5-ext/test/math/atanh/shim.js
new file mode 100644
index 000000000..a857b4966
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/atanh/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-2), NaN, "Less than -1");
+ a(t(2), NaN, "Greater than 1");
+ a(t(-1), -Infinity, "-1");
+ a(t(1), Infinity, "1");
+ a(t(0), 0, "Zero");
+ a(t(0.5), 0.5493061443340549, "Ohter");
+};
diff --git a/source/node_modules/es5-ext/test/math/cbrt/implement.js b/source/node_modules/es5-ext/test/math/cbrt/implement.js
new file mode 100644
index 000000000..374d4b383
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cbrt/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/cbrt/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/cbrt/index.js b/source/node_modules/es5-ext/test/math/cbrt/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cbrt/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/source/node_modules/es5-ext/test/math/cbrt/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cbrt/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/cbrt/shim.js b/source/node_modules/es5-ext/test/math/cbrt/shim.js
new file mode 100644
index 000000000..43ab68b84
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cbrt/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(-1), -1, "-1");
+ a(t(1), 1, "1");
+ a(t(2), 1.2599210498948732, "Ohter");
+};
diff --git a/source/node_modules/es5-ext/test/math/clz32/implement.js b/source/node_modules/es5-ext/test/math/clz32/implement.js
new file mode 100644
index 000000000..44f881552
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/clz32/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/clz32/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/clz32/index.js b/source/node_modules/es5-ext/test/math/clz32/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/clz32/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/clz32/is-implemented.js b/source/node_modules/es5-ext/test/math/clz32/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/clz32/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/clz32/shim.js b/source/node_modules/es5-ext/test/math/clz32/shim.js
new file mode 100644
index 000000000..a769b39b8
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/clz32/shim.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(1), 31, "1");
+ a(t(1000), 22, "1000");
+ a(t(), 32, "No arguments");
+ a(t(Infinity), 32, "Infinity");
+ a(t(-Infinity), 32, "-Infinity");
+ a(t("foo"), 32, "String");
+ a(t(true), 31, "Boolean");
+ a(t(3.5), 30, "Float");
+};
diff --git a/source/node_modules/es5-ext/test/math/cosh/implement.js b/source/node_modules/es5-ext/test/math/cosh/implement.js
new file mode 100644
index 000000000..f3c712b1d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cosh/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/cosh/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/cosh/index.js b/source/node_modules/es5-ext/test/math/cosh/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cosh/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/cosh/is-implemented.js b/source/node_modules/es5-ext/test/math/cosh/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cosh/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/cosh/shim.js b/source/node_modules/es5-ext/test/math/cosh/shim.js
new file mode 100644
index 000000000..419c12367
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/cosh/shim.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 1, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), Infinity, "-Infinity");
+ a(t(1), 1.5430806348152437, "1");
+ a(t(Number.MAX_VALUE), Infinity);
+ a(t(-Number.MAX_VALUE), Infinity);
+ a(t(Number.MIN_VALUE), 1);
+ a(t(-Number.MIN_VALUE), 1);
+};
diff --git a/source/node_modules/es5-ext/test/math/expm1/implement.js b/source/node_modules/es5-ext/test/math/expm1/implement.js
new file mode 100644
index 000000000..c21296725
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/expm1/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/expm1/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/expm1/index.js b/source/node_modules/es5-ext/test/math/expm1/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/expm1/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/expm1/is-implemented.js b/source/node_modules/es5-ext/test/math/expm1/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/expm1/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/expm1/shim.js b/source/node_modules/es5-ext/test/math/expm1/shim.js
new file mode 100644
index 000000000..15f0e796c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/expm1/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -1, "-Infinity");
+ a(t(1).toFixed(15), '1.718281828459045', "1");
+};
diff --git a/source/node_modules/es5-ext/test/math/fround/implement.js b/source/node_modules/es5-ext/test/math/fround/implement.js
new file mode 100644
index 000000000..c909af7c3
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/fround/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/fround/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/fround/index.js b/source/node_modules/es5-ext/test/math/fround/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/fround/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/fround/is-implemented.js b/source/node_modules/es5-ext/test/math/fround/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/fround/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/fround/shim.js b/source/node_modules/es5-ext/test/math/fround/shim.js
new file mode 100644
index 000000000..4ef6d4ea9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/fround/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(1.337), 1.3370000123977661, "1");
+};
diff --git a/source/node_modules/es5-ext/test/math/hypot/implement.js b/source/node_modules/es5-ext/test/math/hypot/implement.js
new file mode 100644
index 000000000..99466464c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/hypot/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/hypot/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/hypot/index.js b/source/node_modules/es5-ext/test/math/hypot/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/hypot/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/hypot/is-implemented.js b/source/node_modules/es5-ext/test/math/hypot/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/hypot/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/hypot/shim.js b/source/node_modules/es5-ext/test/math/hypot/shim.js
new file mode 100644
index 000000000..91d950a5d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/hypot/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(), 0, "No arguments");
+ a(t(0, -0, 0), 0, "Zeros");
+ a(t(4, NaN, Infinity), Infinity, "Infinity");
+ a(t(4, NaN, -Infinity), Infinity, "Infinity");
+ a(t(4, NaN, 34), NaN, "NaN");
+ a(t(3, 4), 5, "#1");
+ a(t(3, 4, 5), 7.0710678118654755, "#2");
+};
diff --git a/source/node_modules/es5-ext/test/math/imul/implement.js b/source/node_modules/es5-ext/test/math/imul/implement.js
new file mode 100644
index 000000000..7b2a2a616
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/imul/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/imul/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/imul/index.js b/source/node_modules/es5-ext/test/math/imul/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/imul/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/imul/is-implemented.js b/source/node_modules/es5-ext/test/math/imul/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/imul/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/imul/shim.js b/source/node_modules/es5-ext/test/math/imul/shim.js
new file mode 100644
index 000000000..a2ca7fe78
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/imul/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(), 0, "No arguments");
+ a(t(0, 0), 0, "Zeros");
+ a(t(2, 4), 8, "#1");
+ a(t(-1, 8), -8, "#2");
+ a(t(0xfffffffe, 5), -10, "#3");
+};
diff --git a/source/node_modules/es5-ext/test/math/log10/implement.js b/source/node_modules/es5-ext/test/math/log10/implement.js
new file mode 100644
index 000000000..4b3b4a456
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log10/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/log10/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/log10/index.js b/source/node_modules/es5-ext/test/math/log10/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log10/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/log10/is-implemented.js b/source/node_modules/es5-ext/test/math/log10/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log10/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/log10/shim.js b/source/node_modules/es5-ext/test/math/log10/shim.js
new file mode 100644
index 000000000..5fa0d5be3
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log10/shim.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-0.5), NaN, "Less than 0");
+ a(t(0), -Infinity, "0");
+ a(t(1), 0, "1");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(2), 0.3010299956639812, "Other");
+};
diff --git a/source/node_modules/es5-ext/test/math/log1p/implement.js b/source/node_modules/es5-ext/test/math/log1p/implement.js
new file mode 100644
index 000000000..5d269bd3e
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log1p/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/log1p/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/log1p/index.js b/source/node_modules/es5-ext/test/math/log1p/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log1p/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/log1p/is-implemented.js b/source/node_modules/es5-ext/test/math/log1p/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log1p/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/log1p/shim.js b/source/node_modules/es5-ext/test/math/log1p/shim.js
new file mode 100644
index 000000000..d495ce049
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log1p/shim.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-1.5), NaN, "Less than -1");
+ a(t(-1), -Infinity, "-1");
+ a(t(0), 0, "0");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(1), 0.6931471805599453, "Other");
+};
diff --git a/source/node_modules/es5-ext/test/math/log2/implement.js b/source/node_modules/es5-ext/test/math/log2/implement.js
new file mode 100644
index 000000000..92b501ac7
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log2/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/log2/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/log2/index.js b/source/node_modules/es5-ext/test/math/log2/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log2/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/log2/is-implemented.js b/source/node_modules/es5-ext/test/math/log2/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log2/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/log2/shim.js b/source/node_modules/es5-ext/test/math/log2/shim.js
new file mode 100644
index 000000000..faa9c32a8
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/log2/shim.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-0.5), NaN, "Less than 0");
+ a(t(0), -Infinity, "0");
+ a(t(1), 0, "1");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(3).toFixed(15), '1.584962500721156', "Other");
+};
diff --git a/source/node_modules/es5-ext/test/math/sign/implement.js b/source/node_modules/es5-ext/test/math/sign/implement.js
new file mode 100644
index 000000000..5875c42d6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sign/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/sign/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/sign/index.js b/source/node_modules/es5-ext/test/math/sign/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sign/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/sign/is-implemented.js b/source/node_modules/es5-ext/test/math/sign/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sign/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/sign/shim.js b/source/node_modules/es5-ext/test/math/sign/shim.js
new file mode 100644
index 000000000..b6b89c158
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sign/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var is = require('../../../object/is');
+
+module.exports = function (t, a) {
+ a(is(t(0), +0), true, "+0");
+ a(is(t(-0), -0), true, "-0");
+ a(t({}), NaN, true, "NaN");
+ a(t(-234234234), -1, "Negative");
+ a(t(234234234), 1, "Positive");
+};
diff --git a/source/node_modules/es5-ext/test/math/sinh/implement.js b/source/node_modules/es5-ext/test/math/sinh/implement.js
new file mode 100644
index 000000000..e52089e45
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sinh/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/sinh/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/sinh/index.js b/source/node_modules/es5-ext/test/math/sinh/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sinh/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/sinh/is-implemented.js b/source/node_modules/es5-ext/test/math/sinh/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sinh/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/sinh/shim.js b/source/node_modules/es5-ext/test/math/sinh/shim.js
new file mode 100644
index 000000000..4f63b59e7
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/sinh/shim.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(1), 1.1752011936438014, "1");
+ a(t(Number.MAX_VALUE), Infinity);
+ a(t(-Number.MAX_VALUE), -Infinity);
+ a(t(Number.MIN_VALUE), 5e-324);
+ a(t(-Number.MIN_VALUE), -5e-324);
+};
diff --git a/source/node_modules/es5-ext/test/math/tanh/implement.js b/source/node_modules/es5-ext/test/math/tanh/implement.js
new file mode 100644
index 000000000..a96bf1933
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/tanh/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/tanh/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/tanh/index.js b/source/node_modules/es5-ext/test/math/tanh/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/tanh/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/tanh/is-implemented.js b/source/node_modules/es5-ext/test/math/tanh/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/tanh/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/tanh/shim.js b/source/node_modules/es5-ext/test/math/tanh/shim.js
new file mode 100644
index 000000000..2c67aaf47
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/tanh/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), 1, "Infinity");
+ a(t(-Infinity), -1, "-Infinity");
+ a(t(1), 0.7615941559557649, "1");
+ a(t(Number.MAX_VALUE), 1);
+ a(t(-Number.MAX_VALUE), -1);
+};
diff --git a/source/node_modules/es5-ext/test/math/trunc/implement.js b/source/node_modules/es5-ext/test/math/trunc/implement.js
new file mode 100644
index 000000000..1830e61f6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/trunc/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../math/trunc/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/math/trunc/index.js b/source/node_modules/es5-ext/test/math/trunc/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/trunc/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/math/trunc/is-implemented.js b/source/node_modules/es5-ext/test/math/trunc/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/trunc/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/math/trunc/shim.js b/source/node_modules/es5-ext/test/math/trunc/shim.js
new file mode 100644
index 000000000..9e5eed791
--- /dev/null
+++ b/source/node_modules/es5-ext/test/math/trunc/shim.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var is = require('../../../object/is');
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(is(t(0.234), 0), true, "0");
+ a(is(t(-0.234), -0), true, "-0");
+ a(t(13.7), 13, "Positive #1");
+ a(t(12.3), 12, "Positive #2");
+ a(t(-12.3), -12, "Negative #1");
+ a(t(-14.7), -14, "Negative #2");
+};
diff --git a/source/node_modules/es5-ext/test/number/#/pad.js b/source/node_modules/es5-ext/test/number/#/pad.js
new file mode 100644
index 000000000..e02082353
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/#/pad.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(78, 4), '0078');
+ a(t.call(65.12323, 4, 3), '0065.123', "Precision");
+ a(t.call(65, 4, 3), '0065.000', "Precision integer");
+};
diff --git a/source/node_modules/es5-ext/test/number/epsilon/implement.js b/source/node_modules/es5-ext/test/number/epsilon/implement.js
new file mode 100644
index 000000000..574da75dc
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/epsilon/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/epsilon/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/epsilon/index.js b/source/node_modules/es5-ext/test/number/epsilon/index.js
new file mode 100644
index 000000000..c892fd47d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/epsilon/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(typeof t, 'number');
+};
diff --git a/source/node_modules/es5-ext/test/number/epsilon/is-implemented.js b/source/node_modules/es5-ext/test/number/epsilon/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/epsilon/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/is-finite/implement.js b/source/node_modules/es5-ext/test/number/is-finite/implement.js
new file mode 100644
index 000000000..b35345fa6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-finite/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/is-finite/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/is-finite/index.js b/source/node_modules/es5-ext/test/number/is-finite/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-finite/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/number/is-finite/is-implemented.js b/source/node_modules/es5-ext/test/number/is-finite/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-finite/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/is-finite/shim.js b/source/node_modules/es5-ext/test/number/is-finite/shim.js
new file mode 100644
index 000000000..5205d1c26
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-finite/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(2), true, "Number");
+ a(t('23'), false, "Not numeric");
+ a(t(NaN), false, "NaN");
+ a(t(Infinity), false, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/number/is-integer/implement.js b/source/node_modules/es5-ext/test/number/is-integer/implement.js
new file mode 100644
index 000000000..127149cee
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-integer/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/is-integer/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/is-integer/index.js b/source/node_modules/es5-ext/test/number/is-integer/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-integer/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/number/is-integer/is-implemented.js b/source/node_modules/es5-ext/test/number/is-integer/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-integer/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/is-integer/shim.js b/source/node_modules/es5-ext/test/number/is-integer/shim.js
new file mode 100644
index 000000000..3f3985c3a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-integer/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(2), true, "Number");
+ a(t(2.34), false, "Float");
+ a(t('23'), false, "Not numeric");
+ a(t(NaN), false, "NaN");
+ a(t(Infinity), false, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/number/is-nan/implement.js b/source/node_modules/es5-ext/test/number/is-nan/implement.js
new file mode 100644
index 000000000..2f01d6d30
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-nan/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/is-nan/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/is-nan/index.js b/source/node_modules/es5-ext/test/number/is-nan/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-nan/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/number/is-nan/is-implemented.js b/source/node_modules/es5-ext/test/number/is-nan/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-nan/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/is-nan/shim.js b/source/node_modules/es5-ext/test/number/is-nan/shim.js
new file mode 100644
index 000000000..425723e74
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-nan/shim.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(2), false, "Number");
+ a(t({}), false, "Not numeric");
+ a(t(NaN), true, "NaN");
+};
diff --git a/source/node_modules/es5-ext/test/number/is-natural.js b/source/node_modules/es5-ext/test/number/is-natural.js
new file mode 100644
index 000000000..d56f12042
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-natural.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(2), true, "Number");
+ a(t(-2), false, "Negative");
+ a(t(2.34), false, "Float");
+ a(t('23'), false, "Not numeric");
+ a(t(NaN), false, "NaN");
+ a(t(Infinity), false, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/number/is-number.js b/source/node_modules/es5-ext/test/number/is-number.js
new file mode 100644
index 000000000..275133476
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-number.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(0), true, "Zero");
+ a(t(NaN), true, "NaN");
+ a(t(Infinity), true, "Infinity");
+ a(t(12), true, "Number");
+ a(t(false), false, "Boolean");
+ a(t(new Date()), false, "Date");
+ a(t(new Number(2)), true, "Number object");
+ a(t('asdfaf'), false, "String");
+ a(t(''), false, "Empty String");
+};
diff --git a/source/node_modules/es5-ext/test/number/is-safe-integer/implement.js b/source/node_modules/es5-ext/test/number/is-safe-integer/implement.js
new file mode 100644
index 000000000..33667e2e9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-safe-integer/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/is-safe-integer/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/is-safe-integer/index.js b/source/node_modules/es5-ext/test/number/is-safe-integer/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-safe-integer/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js b/source/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/is-safe-integer/shim.js b/source/node_modules/es5-ext/test/number/is-safe-integer/shim.js
new file mode 100644
index 000000000..77e066747
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/is-safe-integer/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(2), true, "Number");
+ a(t(2.34), false, "Float");
+ a(t(Math.pow(2, 53)), false, "Too large");
+ a(t(Math.pow(2, 53) - 1), true, "Maximum");
+ a(t('23'), false, "Not numeric");
+ a(t(NaN), false, "NaN");
+ a(t(Infinity), false, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/number/max-safe-integer/implement.js b/source/node_modules/es5-ext/test/number/max-safe-integer/implement.js
new file mode 100644
index 000000000..bef00ca41
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/max-safe-integer/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/max-safe-integer/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/max-safe-integer/index.js b/source/node_modules/es5-ext/test/number/max-safe-integer/index.js
new file mode 100644
index 000000000..c892fd47d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/max-safe-integer/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(typeof t, 'number');
+};
diff --git a/source/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js b/source/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/min-safe-integer/implement.js b/source/node_modules/es5-ext/test/number/min-safe-integer/implement.js
new file mode 100644
index 000000000..fa440248b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/min-safe-integer/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../number/min-safe-integer/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/number/min-safe-integer/index.js b/source/node_modules/es5-ext/test/number/min-safe-integer/index.js
new file mode 100644
index 000000000..c892fd47d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/min-safe-integer/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(typeof t, 'number');
+};
diff --git a/source/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js b/source/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/number/to-integer.js b/source/node_modules/es5-ext/test/number/to-integer.js
new file mode 100644
index 000000000..ff326ba7a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/to-integer.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), 0, "NaN");
+ a(t(20), 20, "Positive integer");
+ a(t('-20'), -20, "String negative integer");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(15.343), 15, "Float");
+ a(t(-15.343), -15, "Negative float");
+};
diff --git a/source/node_modules/es5-ext/test/number/to-pos-integer.js b/source/node_modules/es5-ext/test/number/to-pos-integer.js
new file mode 100644
index 000000000..2f3b4e674
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/to-pos-integer.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), 0, "NaN");
+ a(t(20), 20, "Positive integer");
+ a(t(-20), 0, "Negative integer");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(15.343), 15, "Float");
+ a(t(-15.343), 0, "Negative float");
+};
diff --git a/source/node_modules/es5-ext/test/number/to-uint32.js b/source/node_modules/es5-ext/test/number/to-uint32.js
new file mode 100644
index 000000000..00d05bdfe
--- /dev/null
+++ b/source/node_modules/es5-ext/test/number/to-uint32.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), 0, "Not numeric");
+ a(t(-4), 4294967292, "Negative");
+ a(t(133432), 133432, "Positive");
+ a(t(8589934592), 0, "Greater than maximum");
+};
diff --git a/source/node_modules/es5-ext/test/object/_iterate.js b/source/node_modules/es5-ext/test/object/_iterate.js
new file mode 100644
index 000000000..179afed88
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/_iterate.js
@@ -0,0 +1,30 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = { raz: 1, dwa: 2, trzy: 3 }
+ , o2 = {}, o3 = {}, arr, i = -1;
+
+ t = t('forEach');
+ t(o, function (value, name, self, index) {
+ o2[name] = value;
+ a(index, ++i, "Index");
+ a(self, o, "Self");
+ a(this, o3, "Scope");
+ }, o3);
+ a.deep(o2, o);
+
+ arr = [];
+ o2 = {};
+ i = -1;
+ t(o, function (value, name, self, index) {
+ arr.push(value);
+ o2[name] = value;
+ a(index, ++i, "Index");
+ a(self, o, "Self");
+ a(this, o3, "Scope");
+ }, o3, function (a, b) {
+ return o[b] - o[a];
+ });
+ a.deep(o2, o, "Sort by Values: Content");
+ a.deep(arr, [3, 2, 1], "Sort by Values: Order");
+};
diff --git a/source/node_modules/es5-ext/test/object/assign/implement.js b/source/node_modules/es5-ext/test/object/assign/implement.js
new file mode 100644
index 000000000..400655941
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/assign/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../object/assign/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/object/assign/index.js b/source/node_modules/es5-ext/test/object/assign/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/assign/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/object/assign/is-implemented.js b/source/node_modules/es5-ext/test/object/assign/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/assign/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/object/assign/shim.js b/source/node_modules/es5-ext/test/object/assign/shim.js
new file mode 100644
index 000000000..9afe5f658
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/assign/shim.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o1 = { a: 1, b: 2 }
+ , o2 = { b: 3, c: 4 };
+
+ a(t(o1, o2), o1, "Returns self");
+ a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content");
+
+ a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument");
+};
diff --git a/source/node_modules/es5-ext/test/object/clear.js b/source/node_modules/es5-ext/test/object/clear.js
new file mode 100644
index 000000000..bfc08cc20
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/clear.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var isEmpty = require('../../object/is-empty');
+
+module.exports = function (t, a) {
+ var x = {};
+ a(t(x), x, "Empty: Returns same object");
+ a(isEmpty(x), true, "Empty: Not changed");
+ x.foo = 'raz';
+ x.bar = 'dwa';
+ a(t(x), x, "Same object");
+ a(isEmpty(x), true, "Emptied");
+};
diff --git a/source/node_modules/es5-ext/test/object/compact.js b/source/node_modules/es5-ext/test/object/compact.js
new file mode 100644
index 000000000..9c9064c78
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/compact.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {}, y = {}, z;
+ z = t(x);
+ a.not(z, x, "Returns different object");
+ a.deep(z, {}, "Empty on empty");
+
+ x = { foo: 'bar', a: 0, b: false, c: '', d: '0', e: null, bar: y,
+ elo: undefined };
+ z = t(x);
+ a.deep(z, { foo: 'bar', a: 0, b: false, c: '', d: '0', bar: y },
+ "Cleared null values");
+};
diff --git a/source/node_modules/es5-ext/test/object/compare.js b/source/node_modules/es5-ext/test/object/compare.js
new file mode 100644
index 000000000..cb9424109
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/compare.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var d = new Date();
+
+ a.ok(t(12, 3) > 0, "Numbers");
+ a.ok(t(2, 13) < 0, "Numbers #2");
+ a.ok(t("aaa", "aa") > 0, "Strings");
+ a.ok(t("aa", "ab") < 0, "Strings #2");
+ a(t("aa", "aa"), 0, "Strings same");
+ a(t(d, new Date(d.getTime())), 0, "Same date");
+ a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date");
+};
diff --git a/source/node_modules/es5-ext/test/object/copy-deep.js b/source/node_modules/es5-ext/test/object/copy-deep.js
new file mode 100644
index 000000000..79e02be49
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/copy-deep.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var stringify = JSON.stringify;
+
+module.exports = function (t, a) {
+ var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
+ , no = t(o);
+
+ a.not(no, o, "Return different object");
+ a(stringify(no), stringify(o), "Match properties and values");
+
+ o = { foo: 'bar', raz: { dwa: 'dwa',
+ trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
+ 'dziewięć': function () { } },
+ 'dziesięć': 10, "jedenaście": ['raz', ['dwa', 'trzy', { elo: "true" }]] };
+ o.raz.rec = o;
+
+ no = t(o);
+ a.not(o.raz, no.raz, "Deep");
+ a.not(o.raz.trzy, no.raz.trzy, "Deep #2");
+ a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content");
+ a(no.raz.rec, no, "Recursive");
+ a.not(o.raz.osiem, no.raz.osiem, "Empty object");
+ a(o.raz['dziewięć'], no.raz['dziewięć'], "Function");
+ a.not(o['jedenaście'], no['jedenaście']);
+ a.not(o['jedenaście'][1], no['jedenaście'][1]);
+ a.not(o['jedenaście'][1][2], no['jedenaście'][1][2]);
+};
diff --git a/source/node_modules/es5-ext/test/object/copy.js b/source/node_modules/es5-ext/test/object/copy.js
new file mode 100644
index 000000000..2f222ef80
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/copy.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var stringify = JSON.stringify;
+
+module.exports = function (t, a) {
+ var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
+ , no = t(o);
+
+ a.not(no, o, "Return different object");
+ a(stringify(no), stringify(o), "Match properties and values");
+
+ o = { foo: 'bar', raz: { dwa: 'dwa',
+ trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
+ 'dziewięć': function () { } }, 'dziesięć': 10 };
+ o.raz.rec = o;
+
+ no = t(o);
+ a(o.raz, no.raz, "Shallow");
+};
diff --git a/source/node_modules/es5-ext/test/object/count.js b/source/node_modules/es5-ext/test/object/count.js
new file mode 100644
index 000000000..494f4f163
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/count.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), 0, "Empty");
+ a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4,
+ "Some properties");
+ a(t(Object.defineProperties({}, {
+ raz: { value: 'raz' },
+ dwa: { value: 'dwa', enumerable: true }
+ })), 1, "Some properties hidden");
+};
diff --git a/source/node_modules/es5-ext/test/object/create.js b/source/node_modules/es5-ext/test/object/create.js
new file mode 100644
index 000000000..8b7be2141
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/create.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var setPrototypeOf = require('../../object/set-prototype-of')
+
+ , getPrototypeOf = Object.getPrototypeOf;
+
+module.exports = function (t, a) {
+ var x = {}, obj;
+
+ a(getPrototypeOf(t(x)), x, "Normal object");
+ a(getPrototypeOf(t(null)),
+ (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null");
+
+ a.h1("Properties");
+ a.h2("Normal object");
+ a(getPrototypeOf(obj = t(x, { foo: { value: 'bar' } })), x, "Prototype");
+ a(obj.foo, 'bar', "Property");
+ a.h2("Null");
+ a(getPrototypeOf(obj = t(null, { foo: { value: 'bar2' } })),
+ (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype");
+ a(obj.foo, 'bar2', "Property");
+};
diff --git a/source/node_modules/es5-ext/test/object/ensure-natural-number-value.js b/source/node_modules/es5-ext/test/object/ensure-natural-number-value.js
new file mode 100644
index 000000000..dde23986b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/ensure-natural-number-value.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.throws(function () { t(undefined); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "Null");
+ a(t(2), 2, "Number");
+ a.throws(function () { t(-2); }, TypeError, "Negative");
+ a.throws(function () { t(2.34); }, TypeError, "Float");
+ a(t('23'), 23, "Numeric string");
+ a.throws(function () { t(NaN); }, TypeError, "NaN");
+ a.throws(function () { t(Infinity); }, TypeError, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/object/ensure-natural-number.js b/source/node_modules/es5-ext/test/object/ensure-natural-number.js
new file mode 100644
index 000000000..5ebed1e52
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/ensure-natural-number.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.throws(function () { t(undefined); }, TypeError, "Undefined");
+ a(t(null), 0, "Null");
+ a(t(2), 2, "Number");
+ a.throws(function () { t(-2); }, TypeError, "Negative");
+ a.throws(function () { t(2.34); }, TypeError, "Float");
+ a(t('23'), 23, "Numeric string");
+ a.throws(function () { t(NaN); }, TypeError, "NaN");
+ a.throws(function () { t(Infinity); }, TypeError, "Infinity");
+};
diff --git a/source/node_modules/es5-ext/test/object/eq.js b/source/node_modules/es5-ext/test/object/eq.js
new file mode 100644
index 000000000..02b3f0027
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/eq.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = {};
+ a(t(o, {}), false, "Different objects");
+ a(t(o, o), true, "Same objects");
+ a(t('1', '1'), true, "Same primitive");
+ a(t('1', 1), false, "Different primitive types");
+ a(t(NaN, NaN), true, "NaN");
+ a(t(0, 0), true, "0,0");
+ a(t(0, -0), true, "0,-0");
+};
diff --git a/source/node_modules/es5-ext/test/object/every.js b/source/node_modules/es5-ext/test/object/every.js
new file mode 100644
index 000000000..07d5bbbd6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/every.js
@@ -0,0 +1,21 @@
+'use strict';
+
+var o = { 1: 1, 2: 2, 3: 3 };
+
+module.exports = function (t, a) {
+ var o2 = {};
+ t(o, function (value, name) {
+ o2[name] = value;
+ return true;
+ });
+ a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
+
+ a(t(o, function () {
+ return true;
+ }), true, "Succeeds");
+
+ a(t(o, function () {
+ return false;
+ }), false, "Fails");
+
+};
diff --git a/source/node_modules/es5-ext/test/object/filter.js b/source/node_modules/es5-ext/test/object/filter.js
new file mode 100644
index 000000000..7307da864
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/filter.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 },
+ function (value) { return Boolean(value % 2); }), { 1: 1, 3: 3 });
+};
diff --git a/source/node_modules/es5-ext/test/object/find-key.js b/source/node_modules/es5-ext/test/object/find-key.js
new file mode 100644
index 000000000..cca834d93
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/find-key.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var o = { 1: 1, 2: 2, 3: 3 };
+
+module.exports = function (t, a) {
+ var o2 = {}, i = 0;
+ t(o, function (value, name) {
+ o2[name] = value;
+ return false;
+ });
+ a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
+
+ a(t(o, function () {
+ ++i;
+ return true;
+ }), '1', "Finds");
+ a(i, 1, "Stops iteration after condition is met");
+
+ a(t(o, function () {
+ return false;
+ }), undefined, "Fails");
+
+};
diff --git a/source/node_modules/es5-ext/test/object/find.js b/source/node_modules/es5-ext/test/object/find.js
new file mode 100644
index 000000000..b6ad60a54
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/find.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var o = { 1: 1, 2: 2, 3: 3 };
+
+module.exports = function (t, a) {
+ var o2 = {}, i = 0;
+ t(o, function (value, name) {
+ o2[name] = value;
+ return false;
+ });
+ a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
+
+ a(t(o, function () {
+ ++i;
+ return true;
+ }), 1, "Finds");
+ a(i, 1, "Stops iteration after condition is met");
+
+ a(t(o, function () {
+ return false;
+ }), undefined, "Fails");
+
+};
diff --git a/source/node_modules/es5-ext/test/object/first-key.js b/source/node_modules/es5-ext/test/object/first-key.js
new file mode 100644
index 000000000..8169cd235
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/first-key.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {}, y = Object.create(null);
+ a(t(x), null, "Normal: Empty");
+ a(t(y), null, "Null extension: Empty");
+ x.foo = 'raz';
+ x.bar = 343;
+ a(['foo', 'bar'].indexOf(t(x)) !== -1, true, "Normal");
+ y.elo = 'foo';
+ y.mar = 'wew';
+ a(['elo', 'mar'].indexOf(t(y)) !== -1, true, "Null extension");
+};
diff --git a/source/node_modules/es5-ext/test/object/flatten.js b/source/node_modules/es5-ext/test/object/flatten.js
new file mode 100644
index 000000000..ca342eab9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/flatten.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }),
+ { aa: 1, ab: 2, ba: 3, bb: 4 });
+};
diff --git a/source/node_modules/es5-ext/test/object/for-each.js b/source/node_modules/es5-ext/test/object/for-each.js
new file mode 100644
index 000000000..8690d1e82
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/for-each.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = { raz: 1, dwa: 2, trzy: 3 }
+ , o2 = {};
+ a(t(o, function (value, name) {
+ o2[name] = value;
+ }), undefined, "Return");
+ a.deep(o2, o);
+};
diff --git a/source/node_modules/es5-ext/test/object/get-property-names.js b/source/node_modules/es5-ext/test/object/get-property-names.js
new file mode 100644
index 000000000..b91c3dd50
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/get-property-names.js
@@ -0,0 +1,18 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = { first: 1, second: 4 }, r1, r2;
+ o = Object.create(o, {
+ third: { value: null }
+ });
+ o.first = 2;
+ o = Object.create(o);
+ o.fourth = 3;
+
+ r1 = t(o);
+ r1.sort();
+ r2 = ['first', 'second', 'third', 'fourth']
+ .concat(Object.getOwnPropertyNames(Object.prototype));
+ r2.sort();
+ a.deep(r1, r2);
+};
diff --git a/source/node_modules/es5-ext/test/object/is-array-like.js b/source/node_modules/es5-ext/test/object/is-array-like.js
new file mode 100644
index 000000000..6295973ca
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-array-like.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t([]), true, "Array");
+ a(t(""), true, "String");
+ a(t((function () { return arguments; }())), true, "Arguments");
+ a(t({ length: 0 }), true, "List object");
+ a(t(function () {}), false, "Function");
+ a(t({}), false, "Plain object");
+ a(t(/raz/), false, "Regexp");
+ a(t(), false, "No argument");
+ a(t(null), false, "Null");
+ a(t(undefined), false, "Undefined");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-callable.js b/source/node_modules/es5-ext/test/object/is-callable.js
new file mode 100644
index 000000000..625e221d2
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-callable.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(function () {}), true, "Function");
+ a(t({}), false, "Object");
+ a(t(), false, "Undefined");
+ a(t(null), false, "Null");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-copy-deep.js b/source/node_modules/es5-ext/test/object/is-copy-deep.js
new file mode 100644
index 000000000..4f14cbbe8
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-copy-deep.js
@@ -0,0 +1,46 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x, y;
+
+ a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
+ a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
+ "Different property value");
+ a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
+ "Property only in source");
+ a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
+ "Property only in target");
+
+ a(t("raz", "dwa"), false, "String: diff");
+ a(t("raz", "raz"), true, "String: same");
+ a(t("32", 32), false, "String & Number");
+
+ a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
+ a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
+ a(t(['foo'], ['one']), false, "Array: One value comparision");
+
+ x = { foo: { bar: { mar: {} } } };
+ y = { foo: { bar: { mar: {} } } };
+ a(t(x, y), true, "Deep");
+
+ a(t({ foo: { bar: { mar: 'foo' } } }, { foo: { bar: { mar: {} } } }),
+ false, "Deep: false");
+
+ x = { foo: { bar: { mar: {} } } };
+ x.rec = { foo: x };
+
+ y = { foo: { bar: { mar: {} } } };
+ y.rec = { foo: x };
+
+ a(t(x, y), true, "Object: Infinite Recursion: Same #1");
+
+ x.rec.foo = y;
+ a(t(x, y), true, "Object: Infinite Recursion: Same #2");
+
+ x.rec.foo = x;
+ y.rec.foo = y;
+ a(t(x, y), true, "Object: Infinite Recursion: Same #3");
+
+ y.foo.bar.mar = 'raz';
+ a(t(x, y), false, "Object: Infinite Recursion: Diff");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-copy.js b/source/node_modules/es5-ext/test/object/is-copy.js
new file mode 100644
index 000000000..394e2ed94
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-copy.js
@@ -0,0 +1,18 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
+ a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
+ "Different property value");
+ a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
+ "Property only in source");
+ a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
+ "Property only in target");
+
+ a(t("raz", "dwa"), false, "String: diff");
+ a(t("raz", "raz"), true, "String: same");
+ a(t("32", 32), false, "String & Number");
+
+ a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
+ a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-empty.js b/source/node_modules/es5-ext/test/object/is-empty.js
new file mode 100644
index 000000000..b560c2c36
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-empty.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), true, "Empty");
+ a(t({ 1: 1 }), false, "Not empty");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-number-value.js b/source/node_modules/es5-ext/test/object/is-number-value.js
new file mode 100644
index 000000000..21b6b6203
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-number-value.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(undefined), false, "Undefined");
+ a(t(null), false, "Null");
+ a(t(0), true, "Zero");
+ a(t(NaN), false, "NaN");
+ a(t(Infinity), true, "Infinity");
+ a(t(12), true, "Number");
+ a(t(false), true, "Boolean");
+ a(t(new Date()), true, "Date");
+ a(t(new Number(2)), true, "Number object");
+ a(t('asdfaf'), false, "String");
+ a(t(''), true, "Empty String");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-object.js b/source/node_modules/es5-ext/test/object/is-object.js
new file mode 100644
index 000000000..72c8aa6da
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-object.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t('arar'), false, "String");
+ a(t(12), false, "Number");
+ a(t(true), false, "Boolean");
+ a(t(null), false, "Null");
+ a(t(new Date()), true, "Date");
+ a(t(new String('raz')), true, "String object");
+ a(t({}), true, "Plain object");
+ a(t(/a/), true, "Regular expression");
+ a(t(function () {}), true, "Function");
+};
diff --git a/source/node_modules/es5-ext/test/object/is-plain-object.js b/source/node_modules/es5-ext/test/object/is-plain-object.js
new file mode 100644
index 000000000..e988829d5
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is-plain-object.js
@@ -0,0 +1,18 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t({}), true, "Empty {} is plain object");
+ a(t({ a: true }), true, "{} with property is plain object");
+ a(t({ prototype: 1, constructor: 2, __proto__: 3 }), true,
+ "{} with any property keys is plain object");
+ a(t(null), false, "Null is not plain object");
+ a(t('string'), false, "Primitive is not plain object");
+ a(t(function () {}), false, "Function is not plain object");
+ a(t(Object.create({})), false,
+ "Object whose prototype is not Object.prototype is not plain object");
+ a(t(Object.create(Object.prototype)), true,
+ "Object whose prototype is Object.prototype is plain object");
+ a(t(Object.create(null)), true,
+ "Object whose prototype is null is plain object");
+ a(t(Object.prototype), false, "Object.prototype");
+};
diff --git a/source/node_modules/es5-ext/test/object/is.js b/source/node_modules/es5-ext/test/object/is.js
new file mode 100644
index 000000000..4f8948cbf
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/is.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = {};
+ a(t(o, {}), false, "Different objects");
+ a(t(o, o), true, "Same objects");
+ a(t('1', '1'), true, "Same primitive");
+ a(t('1', 1), false, "Different primitive types");
+ a(t(NaN, NaN), true, "NaN");
+ a(t(0, 0), true, "0,0");
+ a(t(0, -0), false, "0,-0");
+};
diff --git a/source/node_modules/es5-ext/test/object/key-of.js b/source/node_modules/es5-ext/test/object/key-of.js
new file mode 100644
index 000000000..a9225a048
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/key-of.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x = {}, y = {}
+ , o = { foo: 'bar', raz: x, trzy: 'cztery', five: '6' };
+
+ a(t(o, 'bar'), 'foo', "First property");
+ a(t(o, 6), null, "Primitive that's not there");
+ a(t(o, x), 'raz', "Object");
+ a(t(o, y), null, "Object that's not there");
+ a(t(o, '6'), 'five', "Last property");
+};
diff --git a/source/node_modules/es5-ext/test/object/keys/implement.js b/source/node_modules/es5-ext/test/object/keys/implement.js
new file mode 100644
index 000000000..179e1e561
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/keys/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../object/keys/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/object/keys/index.js b/source/node_modules/es5-ext/test/object/keys/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/keys/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/object/keys/is-implemented.js b/source/node_modules/es5-ext/test/object/keys/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/keys/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/object/keys/shim.js b/source/node_modules/es5-ext/test/object/keys/shim.js
new file mode 100644
index 000000000..ed29eebcd
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/keys/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t({ foo: 'bar' }), ['foo'], "Object");
+ a.deep(t('raz'), ['0', '1', '2'], "Primitive");
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "Undefined");
+};
diff --git a/source/node_modules/es5-ext/test/object/map-keys.js b/source/node_modules/es5-ext/test/object/map-keys.js
new file mode 100644
index 000000000..be84825b1
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/map-keys.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) {
+ return 'x' + (key + value);
+ }), { x11: 1, x22: 2, x33: 3 });
+};
diff --git a/source/node_modules/es5-ext/test/object/map.js b/source/node_modules/es5-ext/test/object/map.js
new file mode 100644
index 000000000..f9cc09c01
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/map.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var obj = { 1: 1, 2: 2, 3: 3 };
+ a.deep(t(obj, function (value, key, context) {
+ a(context, obj, "Context argument");
+ return (value + 1) + key;
+ }), { 1: '21', 2: '32', 3: '43' });
+};
diff --git a/source/node_modules/es5-ext/test/object/mixin-prototypes.js b/source/node_modules/es5-ext/test/object/mixin-prototypes.js
new file mode 100644
index 000000000..d1c727a95
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/mixin-prototypes.js
@@ -0,0 +1,67 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o, o1, o2, x, y = {}, z = {};
+ o = { inherited: true, visible: 23 };
+ o1 = Object.create(o);
+ o1.visible = z;
+ o1.nonremovable = 'raz';
+ Object.defineProperty(o1, 'hidden', { value: 'hidden' });
+
+ o2 = Object.defineProperties({}, { nonremovable: { value: y } });
+ o2.other = 'other';
+
+ try { t(o2, o1); } catch (ignore) {}
+
+ a(o2.visible, z, "Enumerable");
+ a(o1.hidden, 'hidden', "Not Enumerable");
+ a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
+ a(o2.propertyIsEnumerable('hidden'), false,
+ "Not enumerable is not enumerable");
+
+ a(o2.inherited, true, "Extend deep");
+
+ a(o2.nonremovable, y, "Do not overwrite non configurable");
+ a(o2.other, 'other', "Own kept");
+
+ x = {};
+ t(x, o2);
+ try { t(x, o1); } catch (ignore) {}
+
+ a(x.visible, z, "Enumerable");
+ a(x.hidden, 'hidden', "Not Enumerable");
+ a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
+ a(x.propertyIsEnumerable('hidden'), false,
+ "Not enumerable is not enumerable");
+
+ a(x.inherited, true, "Extend deep");
+
+ a(x.nonremovable, y, "Ignored non configurable");
+ a(x.other, 'other', "Other");
+
+ x.visible = 3;
+ a(x.visible, 3, "Writable is writable");
+
+ x = {};
+ t(x, o1);
+ a.throws(function () {
+ x.hidden = 3;
+ }, "Not writable is not writable");
+
+ x = {};
+ t(x, o1);
+ delete x.visible;
+ a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable");
+
+ x = {};
+ t(x, o1);
+ a.throws(function () {
+ delete x.hidden;
+ }, "Not configurable is not configurable");
+
+ x = Object.defineProperty({}, 'foo',
+ { configurable: false, writable: true, enumerable: false, value: 'bar' });
+
+ try { t(x, { foo: 'lorem' }); } catch (ignore) {}
+ a(x.foo, 'bar', "Writable, not enumerable");
+};
diff --git a/source/node_modules/es5-ext/test/object/mixin.js b/source/node_modules/es5-ext/test/object/mixin.js
new file mode 100644
index 000000000..866005b03
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/mixin.js
@@ -0,0 +1,69 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o, o1, o2, x, y = {}, z = {};
+ o = { inherited: true };
+ o1 = Object.create(o);
+ o1.visible = z;
+ o1.nonremovable = 'raz';
+ Object.defineProperty(o1, 'hidden', { value: 'hidden' });
+
+ o2 = Object.defineProperties({}, { nonremovable: { value: y } });
+ o2.other = 'other';
+
+ try { t(o2, o1); } catch (ignore) {}
+
+ a(o2.visible, z, "Enumerable");
+ a(o1.hidden, 'hidden', "Not Enumerable");
+ a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
+ a(o2.propertyIsEnumerable('hidden'), false,
+ "Not enumerable is not enumerable");
+
+ a(o2.hasOwnProperty('inherited'), false, "Extend only own");
+ a(o2.inherited, undefined, "Extend ony own: value");
+
+ a(o2.nonremovable, y, "Do not overwrite non configurable");
+ a(o2.other, 'other', "Own kept");
+
+ x = {};
+ t(x, o2);
+ try { t(x, o1); } catch (ignore) {}
+
+ a(x.visible, z, "Enumerable");
+ a(x.hidden, 'hidden', "Not Enumerable");
+ a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
+ a(x.propertyIsEnumerable('hidden'), false,
+ "Not enumerable is not enumerable");
+
+ a(x.hasOwnProperty('inherited'), false, "Extend only own");
+ a(x.inherited, undefined, "Extend ony own: value");
+
+ a(x.nonremovable, y, "Ignored non configurable");
+ a(x.other, 'other', "Other");
+
+ x.visible = 3;
+ a(x.visible, 3, "Writable is writable");
+
+ x = {};
+ t(x, o1);
+ a.throws(function () {
+ x.hidden = 3;
+ }, "Not writable is not writable");
+
+ x = {};
+ t(x, o1);
+ delete x.visible;
+ a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable");
+
+ x = {};
+ t(x, o1);
+ a.throws(function () {
+ delete x.hidden;
+ }, "Not configurable is not configurable");
+
+ x = Object.defineProperty({}, 'foo',
+ { configurable: false, writable: true, enumerable: false, value: 'bar' });
+
+ try { t(x, { foo: 'lorem' }); } catch (ignore) {}
+ a(x.foo, 'bar', "Writable, not enumerable");
+};
diff --git a/source/node_modules/es5-ext/test/object/normalize-options.js b/source/node_modules/es5-ext/test/object/normalize-options.js
new file mode 100644
index 000000000..0d2d4da04
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/normalize-options.js
@@ -0,0 +1,32 @@
+'use strict';
+
+var create = Object.create, defineProperty = Object.defineProperty;
+
+module.exports = function (t, a) {
+ var x = { foo: 'raz', bar: 'dwa' }, y;
+ y = t(x);
+ a.not(y, x, "Returns copy");
+ a.deep(y, x, "Plain");
+
+ x = { raz: 'one', dwa: 'two' };
+ defineProperty(x, 'get', {
+ configurable: true,
+ enumerable: true,
+ get: function () { return this.dwa; }
+ });
+ x = create(x);
+ x.trzy = 'three';
+ x.cztery = 'four';
+ x = create(x);
+ x.dwa = 'two!';
+ x.trzy = 'three!';
+ x.piec = 'five';
+ x.szesc = 'six';
+
+ a.deep(t(x), { raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four',
+ piec: 'five', szesc: 'six', get: 'two!' }, "Deep object");
+
+ a.deep(t({ marko: 'raz', raz: 'foo' }, x, { szesc: 'elo', siedem: 'bibg' }),
+ { marko: 'raz', raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four',
+ piec: 'five', szesc: 'elo', siedem: 'bibg', get: 'two!' }, "Multiple options");
+};
diff --git a/source/node_modules/es5-ext/test/object/primitive-set.js b/source/node_modules/es5-ext/test/object/primitive-set.js
new file mode 100644
index 000000000..839857eab
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/primitive-set.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var getPropertyNames = require('../../object/get-property-names')
+ , isPlainObject = require('../../object/is-plain-object');
+
+module.exports = function (t, a) {
+ var x = t();
+ a(isPlainObject(x), true, "Plain object");
+ a.deep(getPropertyNames(x), [], "No properties");
+ x.foo = 'bar';
+ a.deep(getPropertyNames(x), ['foo'], "Extensible");
+
+ a.deep(t('raz', 'dwa', 3), { raz: true, dwa: true, 3: true },
+ "Arguments handling");
+};
diff --git a/source/node_modules/es5-ext/test/object/safe-traverse.js b/source/node_modules/es5-ext/test/object/safe-traverse.js
new file mode 100644
index 000000000..d30cdefe6
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/safe-traverse.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var obj = { foo: { bar: { lorem: 12 } } };
+ a(t(obj), obj, "No props");
+ a(t(obj, 'foo'), obj.foo, "One");
+ a(t(obj, 'raz'), undefined, "One: Fail");
+ a(t(obj, 'foo', 'bar'), obj.foo.bar, "Two");
+ a(t(obj, 'dsd', 'raz'), undefined, "Two: Fail #1");
+ a(t(obj, 'foo', 'raz'), undefined, "Two: Fail #2");
+ a(t(obj, 'foo', 'bar', 'lorem'), obj.foo.bar.lorem, "Three");
+ a(t(obj, 'dsd', 'raz', 'fef'), undefined, "Three: Fail #1");
+ a(t(obj, 'foo', 'raz', 'asdf'), undefined, "Three: Fail #2");
+ a(t(obj, 'foo', 'bar', 'asd'), undefined, "Three: Fail #3");
+};
diff --git a/source/node_modules/es5-ext/test/object/serialize.js b/source/node_modules/es5-ext/test/object/serialize.js
new file mode 100644
index 000000000..43eed6a86
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/serialize.js
@@ -0,0 +1,25 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var fn = function (raz, dwa) { return raz + dwa; };
+ a(t(), 'undefined', "Undefined");
+ a(t(null), 'null', "Null");
+ a(t(null), 'null', "Null");
+ a(t('raz'), '"raz"', "String");
+ a(t('raz"ddwa\ntrzy'), '"raz\\"ddwa\\ntrzy"', "String with escape");
+ a(t(false), 'false', "Booelean");
+ a(t(fn), String(fn), "Function");
+
+ a(t(/raz-dwa/g), '/raz-dwa/g', "RegExp");
+ a(t(new Date(1234567)), 'new Date(1234567)', "Date");
+ a(t([]), '[]', "Empty array");
+ a(t([undefined, false, null, 'raz"ddwa\ntrzy', fn, /raz/g, new Date(1234567), ['foo']]),
+ '[undefined,false,null,"raz\\"ddwa\\ntrzy",' + String(fn) +
+ ',/raz/g,new Date(1234567),["foo"]]', "Rich Array");
+ a(t({}), '{}', "Empty object");
+ a(t({ raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', piec: fn, szesc: /raz/g,
+ siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } }),
+ '{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy","piec":' + String(fn) +
+ ',"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' +
+ '"dziewiec":{"foo":"bar","dwa":343}}', "Rich object");
+};
diff --git a/source/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/source/node_modules/es5-ext/test/object/set-prototype-of/implement.js
new file mode 100644
index 000000000..30b2ac4b9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/set-prototype-of/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+var create = require('../../../object/create')
+ , isImplemented = require('../../../object/set-prototype-of/is-implemented');
+
+module.exports = function (a) { a(isImplemented(create), true); };
diff --git a/source/node_modules/es5-ext/test/object/set-prototype-of/index.js b/source/node_modules/es5-ext/test/object/set-prototype-of/index.js
new file mode 100644
index 000000000..aec2605cc
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/set-prototype-of/index.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var create = require('../../../object/create')
+
+ , getPrototypeOf = Object.getPrototypeOf;
+
+module.exports = function (t, a) {
+ var x = {}, y = {};
+
+ if (t === null) return;
+ a(t(x, y), x, "Return self object");
+ a(getPrototypeOf(x), y, "Object");
+ a.throws(function () { t(x); }, TypeError, "Undefined");
+ a.throws(function () { t('foo'); }, TypeError, "Primitive");
+ a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
+ x = create(null);
+ a.h1("Change null prototype");
+ a(t(x, y), x, "Result");
+ a(getPrototypeOf(x), y, "Prototype");
+ a.h1("Set null prototype");
+ a(t(y, null), y, "Result");
+ a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
+};
diff --git a/source/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/source/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/source/node_modules/es5-ext/test/object/set-prototype-of/shim.js
new file mode 100644
index 000000000..aec2605cc
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/set-prototype-of/shim.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var create = require('../../../object/create')
+
+ , getPrototypeOf = Object.getPrototypeOf;
+
+module.exports = function (t, a) {
+ var x = {}, y = {};
+
+ if (t === null) return;
+ a(t(x, y), x, "Return self object");
+ a(getPrototypeOf(x), y, "Object");
+ a.throws(function () { t(x); }, TypeError, "Undefined");
+ a.throws(function () { t('foo'); }, TypeError, "Primitive");
+ a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
+ x = create(null);
+ a.h1("Change null prototype");
+ a(t(x, y), x, "Result");
+ a(getPrototypeOf(x), y, "Prototype");
+ a.h1("Set null prototype");
+ a(t(y, null), y, "Result");
+ a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
+};
diff --git a/source/node_modules/es5-ext/test/object/some.js b/source/node_modules/es5-ext/test/object/some.js
new file mode 100644
index 000000000..490431e7a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/some.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var o = { 1: 1, 2: 2, 3: 3 };
+
+module.exports = function (t, a) {
+ var o2 = {}, i = 0;
+ t(o, function (value, name) {
+ o2[name] = value;
+ return false;
+ });
+ a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
+
+ a(t(o, function () {
+ ++i;
+ return true;
+ }), true, "Succeeds");
+ a(i, 1, "Stops iteration after condition is met");
+
+ a(t(o, function () {
+ return false;
+ }), false, "Fails");
+
+};
diff --git a/source/node_modules/es5-ext/test/object/to-array.js b/source/node_modules/es5-ext/test/object/to-array.js
new file mode 100644
index 000000000..1f4beef7e
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/to-array.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var o = { 1: 1, 2: 2, 3: 3 }, o1 = {}
+ , o2 = t(o, function (value, name, self) {
+ a(self, o, "Self");
+ a(this, o1, "Scope");
+ return value + Number(name);
+ }, o1);
+ a.deep(o2, [2, 4, 6]);
+
+ t(o).sort().forEach(function (item) {
+ a.deep(item, [item[0], o[item[0]]], "Default");
+ });
+};
diff --git a/source/node_modules/es5-ext/test/object/unserialize.js b/source/node_modules/es5-ext/test/object/unserialize.js
new file mode 100644
index 000000000..405eef112
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/unserialize.js
@@ -0,0 +1,24 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var fn = function (raz, dwa) { return raz + dwa; };
+ a(t('undefined'), undefined, "Undefined");
+ a(t('null'), null, "Null");
+ a(t('"raz"'), 'raz', "String");
+ a(t('"raz\\"ddwa\\ntrzy"'), 'raz"ddwa\ntrzy', "String with escape");
+ a(t('false'), false, "Booelean");
+ a(String(t(String(fn))), String(fn), "Function");
+
+ a.deep(t('/raz-dwa/g'), /raz-dwa/g, "RegExp");
+ a.deep(t('new Date(1234567)'), new Date(1234567), "Date");
+ a.deep(t('[]'), [], "Empty array");
+ a.deep(t('[undefined,false,null,"raz\\"ddwa\\ntrzy",/raz/g,new Date(1234567),["foo"]]'),
+ [undefined, false, null, 'raz"ddwa\ntrzy', /raz/g, new Date(1234567), ['foo']], "Rich Array");
+ a.deep(t('{}'), {}, "Empty object");
+ a.deep(t('{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy",' +
+ '"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' +
+ '"dziewiec":{"foo":"bar","dwa":343}}'),
+ { raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', szesc: /raz/g,
+ siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } },
+ "Rich object");
+};
diff --git a/source/node_modules/es5-ext/test/object/valid-callable.js b/source/node_modules/es5-ext/test/object/valid-callable.js
new file mode 100644
index 000000000..b40540b6b
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/valid-callable.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var f = function () {};
+ a(t(f), f, "Function");
+ a.throws(function () {
+ t({});
+ }, "Not Function");
+};
diff --git a/source/node_modules/es5-ext/test/object/valid-object.js b/source/node_modules/es5-ext/test/object/valid-object.js
new file mode 100644
index 000000000..eaa8e7bcb
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/valid-object.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(0); }, TypeError, "0");
+ a.throws(function () { t(false); }, TypeError, "false");
+ a.throws(function () { t(''); }, TypeError, "''");
+ a(t(x = {}), x, "Object");
+ a(t(x = function () {}), x, "Function");
+ a(t(x = new String('raz')), x, "String object"); //jslint: ignore
+ a(t(x = new Date()), x, "Date");
+
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "null");
+};
diff --git a/source/node_modules/es5-ext/test/object/valid-value.js b/source/node_modules/es5-ext/test/object/valid-value.js
new file mode 100644
index 000000000..f1eeafa97
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/valid-value.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var numIsNaN = require('../../number/is-nan');
+
+module.exports = function (t, a) {
+ var x;
+ a(t(0), 0, "0");
+ a(t(false), false, "false");
+ a(t(''), '', "''");
+ a(numIsNaN(t(NaN)), true, "NaN");
+ a(t(x = {}), x, "{}");
+
+ a.throws(function () {
+ t();
+ }, "Undefined");
+ a.throws(function () {
+ t(null);
+ }, "null");
+};
diff --git a/source/node_modules/es5-ext/test/object/validate-array-like-object.js b/source/node_modules/es5-ext/test/object/validate-array-like-object.js
new file mode 100644
index 000000000..2f3e31b44
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/validate-array-like-object.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(0); }, TypeError, "0");
+ a.throws(function () { t(false); }, TypeError, "false");
+ a.throws(function () { t(''); }, TypeError, "String");
+ a.throws(function () { t({}); }, TypeError, "Plain Object");
+ a.throws(function () { t(function () {}); }, TypeError, "Function");
+ a(t(x = new String('raz')), x, "String object"); //jslint: ignore
+
+ a(t(x = { length: 1 }), x, "Array like");
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "null");
+};
diff --git a/source/node_modules/es5-ext/test/object/validate-array-like.js b/source/node_modules/es5-ext/test/object/validate-array-like.js
new file mode 100644
index 000000000..53bd11249
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/validate-array-like.js
@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(0); }, TypeError, "0");
+ a.throws(function () { t(false); }, TypeError, "false");
+ a(t(''), '', "''");
+ a.throws(function () { t({}); }, TypeError, "Plain Object");
+ a.throws(function () { t(function () {}); }, TypeError, "Function");
+ a(t(x = new String('raz')), x, "String object"); //jslint: ignore
+
+ a(t(x = { length: 1 }), x, "Array like");
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "null");
+};
diff --git a/source/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/source/node_modules/es5-ext/test/object/validate-stringifiable-value.js
new file mode 100644
index 000000000..ae9bd17a5
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/validate-stringifiable-value.js
@@ -0,0 +1,16 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "Null");
+ a(t(0), "0");
+ a(t(false), "false");
+ a(t(''), "");
+ a(t({}), String({}), "Object");
+ a(t(x = function () {}), String(x), "Function");
+ a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore
+ a(t(x = new Date()), String(x), "Date");
+
+ a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object");
+};
diff --git a/source/node_modules/es5-ext/test/object/validate-stringifiable.js b/source/node_modules/es5-ext/test/object/validate-stringifiable.js
new file mode 100644
index 000000000..4a46bb521
--- /dev/null
+++ b/source/node_modules/es5-ext/test/object/validate-stringifiable.js
@@ -0,0 +1,16 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var x;
+ a(t(), 'undefined', "Undefined");
+ a(t(null), 'null', "Null");
+ a(t(0), "0");
+ a(t(false), "false");
+ a(t(''), "");
+ a(t({}), String({}), "Object");
+ a(t(x = function () {}), String(x), "Function");
+ a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore
+ a(t(x = new Date()), String(x), "Date");
+
+ a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object");
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/index.js b/source/node_modules/es5-ext/test/reg-exp/#/index.js
new file mode 100644
index 000000000..ca2bd6506
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/index.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var indexTest = require('tad/lib/utils/index-test')
+
+ , path = require('path').resolve(__dirname, '../../../reg-exp/#');
+
+module.exports = function (t, a, d) {
+ indexTest(indexTest.readDir(path).aside(function (data) {
+ delete data.sticky;
+ delete data.unicode;
+ }))(t, a, d);
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/is-sticky.js b/source/node_modules/es5-ext/test/reg-exp/#/is-sticky.js
new file mode 100644
index 000000000..e154ac291
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/is-sticky.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var re;
+ a(t.call(/raz/), false, "Normal");
+ a(t.call(/raz/g), false, "Global");
+ try { re = new RegExp('raz', 'y'); } catch (ignore) {}
+ if (!re) return;
+ a(t.call(re), true, "Sticky");
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/is-unicode.js b/source/node_modules/es5-ext/test/reg-exp/#/is-unicode.js
new file mode 100644
index 000000000..2ffb9e869
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/is-unicode.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var re;
+ a(t.call(/raz/), false, "Normal");
+ a(t.call(/raz/g), false, "Global");
+ try { re = new RegExp('raz', 'u'); } catch (ignore) {}
+ if (!re) return;
+ a(t.call(re), true, "Unicode");
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/match/implement.js b/source/node_modules/es5-ext/test/reg-exp/#/match/implement.js
new file mode 100644
index 000000000..89825a45f
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/match/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../reg-exp/#/match/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/match/index.js b/source/node_modules/es5-ext/test/reg-exp/#/match/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/match/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js b/source/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/match/shim.js b/source/node_modules/es5-ext/test/reg-exp/#/match/shim.js
new file mode 100644
index 000000000..5249139ff
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/match/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var result = ['foo'];
+ result.index = 0;
+ result.input = 'foobar';
+ a.deep(t.call(/foo/, 'foobar'), result);
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/replace/implement.js b/source/node_modules/es5-ext/test/reg-exp/#/replace/implement.js
new file mode 100644
index 000000000..c32b23a6d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/replace/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../reg-exp/#/replace/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/replace/index.js b/source/node_modules/es5-ext/test/reg-exp/#/replace/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/replace/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js b/source/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/replace/shim.js b/source/node_modules/es5-ext/test/reg-exp/#/replace/shim.js
new file mode 100644
index 000000000..2b378fd59
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/replace/shim.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(/foo/, 'foobar', 'mar'), 'marbar');
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/search/implement.js b/source/node_modules/es5-ext/test/reg-exp/#/search/implement.js
new file mode 100644
index 000000000..ff1b8087f
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/search/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../reg-exp/#/search/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/search/index.js b/source/node_modules/es5-ext/test/reg-exp/#/search/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/search/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js b/source/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/search/shim.js b/source/node_modules/es5-ext/test/reg-exp/#/search/shim.js
new file mode 100644
index 000000000..596bcdb92
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/search/shim.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(/foo/, 'barfoo'), 3);
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/split/implement.js b/source/node_modules/es5-ext/test/reg-exp/#/split/implement.js
new file mode 100644
index 000000000..1cee44180
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/split/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../reg-exp/#/split/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/split/index.js b/source/node_modules/es5-ext/test/reg-exp/#/split/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/split/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js b/source/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/split/shim.js b/source/node_modules/es5-ext/test/reg-exp/#/split/shim.js
new file mode 100644
index 000000000..6a95cd03d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/split/shim.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a.deep(t.call(/\|/, 'bar|foo'), ['bar', 'foo']);
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js b/source/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js
new file mode 100644
index 000000000..d94e7b98d
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../reg-exp/#/sticky/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js b/source/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js b/source/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js
new file mode 100644
index 000000000..9b1aa0f2a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../reg-exp/#/unicode/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js b/source/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/reg-exp/escape.js b/source/node_modules/es5-ext/test/reg-exp/escape.js
new file mode 100644
index 000000000..5b00f67f2
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/escape.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var str = "(?:^te|er)s{2}t\\[raz]+$";
+ a(RegExp('^' + t(str) + '$').test(str), true);
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/is-reg-exp.js b/source/node_modules/es5-ext/test/reg-exp/is-reg-exp.js
new file mode 100644
index 000000000..785ca28c2
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/is-reg-exp.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t('arar'), false, "String");
+ a(t(12), false, "Number");
+ a(t(true), false, "Boolean");
+ a(t(new Date()), false, "Date");
+ a(t(new String('raz')), false, "String object");
+ a(t({}), false, "Plain object");
+ a(t(/a/), true, "Regular expression");
+ a(t(new RegExp('a')), true, "Regular expression via constructor");
+};
diff --git a/source/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js b/source/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js
new file mode 100644
index 000000000..cd12cf126
--- /dev/null
+++ b/source/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var r = /raz/;
+ a(t(r), r, "Direct");
+ r = new RegExp('foo');
+ a(t(r), r, "Constructor");
+ a.throws(function () {
+ t({});
+ }, "Object");
+ a.throws(function () {
+ t(function () {});
+ }, "Function");
+ a.throws(function () {
+ t({ exec: function () { return 20; } });
+ }, "Plain object");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/@@iterator/implement.js b/source/node_modules/es5-ext/test/string/#/@@iterator/implement.js
new file mode 100644
index 000000000..09bf3361a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/@@iterator/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../string/#/@@iterator/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/@@iterator/index.js b/source/node_modules/es5-ext/test/string/#/@@iterator/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/@@iterator/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js b/source/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/@@iterator/shim.js b/source/node_modules/es5-ext/test/string/#/@@iterator/shim.js
new file mode 100644
index 000000000..3b0e0b754
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/@@iterator/shim.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ var it = t.call('r💩z');
+ a.deep(it.next(), { done: false, value: 'r' }, "#1");
+ a.deep(it.next(), { done: false, value: '💩' }, "#2");
+ a.deep(it.next(), { done: false, value: 'z' }, "#3");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/at.js b/source/node_modules/es5-ext/test/string/#/at.js
new file mode 100644
index 000000000..2447a9f64
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/at.js
@@ -0,0 +1,97 @@
+// See tests at https://github.com/mathiasbynens/String.prototype.at
+
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.length, 1, "Length");
+
+ a.h1("BMP");
+ a(t.call('abc\uD834\uDF06def', -Infinity), '', "-Infinity");
+ a(t.call('abc\uD834\uDF06def', -1), '', "-1");
+ a(t.call('abc\uD834\uDF06def', -0), 'a', "-0");
+ a(t.call('abc\uD834\uDF06def', +0), 'a', "+0");
+ a(t.call('abc\uD834\uDF06def', 1), 'b', "1");
+ a(t.call('abc\uD834\uDF06def', 3), '\uD834\uDF06', "3");
+ a(t.call('abc\uD834\uDF06def', 4), '\uDF06', "4");
+ a(t.call('abc\uD834\uDF06def', 5), 'd', "5");
+ a(t.call('abc\uD834\uDF06def', 42), '', "42");
+ a(t.call('abc\uD834\uDF06def', +Infinity), '', "+Infinity");
+ a(t.call('abc\uD834\uDF06def', null), 'a', "null");
+ a(t.call('abc\uD834\uDF06def', undefined), 'a', "undefined");
+ a(t.call('abc\uD834\uDF06def'), 'a', "No argument");
+ a(t.call('abc\uD834\uDF06def', false), 'a', "false");
+ a(t.call('abc\uD834\uDF06def', NaN), 'a', "NaN");
+ a(t.call('abc\uD834\uDF06def', ''), 'a', "Empty string");
+ a(t.call('abc\uD834\uDF06def', '_'), 'a', "_");
+ a(t.call('abc\uD834\uDF06def', '1'), 'b', "'1'");
+ a(t.call('abc\uD834\uDF06def', []), 'a', "[]");
+ a(t.call('abc\uD834\uDF06def', {}), 'a', "{}");
+ a(t.call('abc\uD834\uDF06def', -0.9), 'a', "-0.9");
+ a(t.call('abc\uD834\uDF06def', 1.9), 'b', "1.9");
+ a(t.call('abc\uD834\uDF06def', 7.9), 'f', "7.9");
+ a(t.call('abc\uD834\uDF06def', Math.pow(2, 32)), '', "Big number");
+
+ a.h1("Astral symbol");
+ a(t.call('\uD834\uDF06def', -Infinity), '', "-Infinity");
+ a(t.call('\uD834\uDF06def', -1), '', "-1");
+ a(t.call('\uD834\uDF06def', -0), '\uD834\uDF06', "-0");
+ a(t.call('\uD834\uDF06def', +0), '\uD834\uDF06', "+0");
+ a(t.call('\uD834\uDF06def', 1), '\uDF06', "1");
+ a(t.call('\uD834\uDF06def', 2), 'd', "2");
+ a(t.call('\uD834\uDF06def', 3), 'e', "3");
+ a(t.call('\uD834\uDF06def', 4), 'f', "4");
+ a(t.call('\uD834\uDF06def', 42), '', "42");
+ a(t.call('\uD834\uDF06def', +Infinity), '', "+Infinity");
+ a(t.call('\uD834\uDF06def', null), '\uD834\uDF06', "null");
+ a(t.call('\uD834\uDF06def', undefined), '\uD834\uDF06', "undefined");
+ a(t.call('\uD834\uDF06def'), '\uD834\uDF06', "No arguments");
+ a(t.call('\uD834\uDF06def', false), '\uD834\uDF06', "false");
+ a(t.call('\uD834\uDF06def', NaN), '\uD834\uDF06', "NaN");
+ a(t.call('\uD834\uDF06def', ''), '\uD834\uDF06', "Empty string");
+ a(t.call('\uD834\uDF06def', '_'), '\uD834\uDF06', "_");
+ a(t.call('\uD834\uDF06def', '1'), '\uDF06', "'1'");
+
+ a.h1("Lone high surrogates");
+ a(t.call('\uD834abc', -Infinity), '', "-Infinity");
+ a(t.call('\uD834abc', -1), '', "-1");
+ a(t.call('\uD834abc', -0), '\uD834', "-0");
+ a(t.call('\uD834abc', +0), '\uD834', "+0");
+ a(t.call('\uD834abc', 1), 'a', "1");
+ a(t.call('\uD834abc', 42), '', "42");
+ a(t.call('\uD834abc', +Infinity), '', "Infinity");
+ a(t.call('\uD834abc', null), '\uD834', "null");
+ a(t.call('\uD834abc', undefined), '\uD834', "undefined");
+ a(t.call('\uD834abc'), '\uD834', "No arguments");
+ a(t.call('\uD834abc', false), '\uD834', "false");
+ a(t.call('\uD834abc', NaN), '\uD834', "NaN");
+ a(t.call('\uD834abc', ''), '\uD834', "Empty string");
+ a(t.call('\uD834abc', '_'), '\uD834', "_");
+ a(t.call('\uD834abc', '1'), 'a', "'a'");
+
+ a.h1("Lone low surrogates");
+ a(t.call('\uDF06abc', -Infinity), '', "-Infinity");
+ a(t.call('\uDF06abc', -1), '', "-1");
+ a(t.call('\uDF06abc', -0), '\uDF06', "-0");
+ a(t.call('\uDF06abc', +0), '\uDF06', "+0");
+ a(t.call('\uDF06abc', 1), 'a', "1");
+ a(t.call('\uDF06abc', 42), '', "42");
+ a(t.call('\uDF06abc', +Infinity), '', "+Infinity");
+ a(t.call('\uDF06abc', null), '\uDF06', "null");
+ a(t.call('\uDF06abc', undefined), '\uDF06', "undefined");
+ a(t.call('\uDF06abc'), '\uDF06', "No arguments");
+ a(t.call('\uDF06abc', false), '\uDF06', "false");
+ a(t.call('\uDF06abc', NaN), '\uDF06', "NaN");
+ a(t.call('\uDF06abc', ''), '\uDF06', "Empty string");
+ a(t.call('\uDF06abc', '_'), '\uDF06', "_");
+ a(t.call('\uDF06abc', '1'), 'a', "'1'");
+
+ a.h1("Context");
+ a.throws(function () { t.call(undefined); }, TypeError, "Undefined");
+ a.throws(function () { t.call(undefined, 4); }, TypeError,
+ "Undefined + argument");
+ a.throws(function () { t.call(null); }, TypeError, "Null");
+ a.throws(function () { t.call(null, 4); }, TypeError, "Null + argument");
+ a(t.call(42, 0), '4', "Number #1");
+ a(t.call(42, 1), '2', "Number #2");
+ a(t.call({ toString: function () { return 'abc'; } }, 2), 'c', "Object");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/source/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
new file mode 100644
index 000000000..8b47a8158
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('razDwaTRzy4yFoo45My'), 'raz-dwa-t-rzy4y-foo45-my');
+};
diff --git a/source/node_modules/es5-ext/test/string/#/capitalize.js b/source/node_modules/es5-ext/test/string/#/capitalize.js
new file mode 100644
index 000000000..fa11ff8ee
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/capitalize.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('raz'), 'Raz', "Word");
+ a(t.call('BLA'), 'BLA', "Uppercase");
+ a(t.call(''), '', "Empty");
+ a(t.call('a'), 'A', "One letter");
+ a(t.call('this is a test'), 'This is a test', "Sentence");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/case-insensitive-compare.js b/source/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
new file mode 100644
index 000000000..01a90c39c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call("AA", "aa"), 0, "Same");
+ a.ok(t.call("Amber", "zebra") < 0, "Less");
+ a.ok(t.call("Zebra", "amber") > 0, "Greater");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/code-point-at/implement.js b/source/node_modules/es5-ext/test/string/#/code-point-at/implement.js
new file mode 100644
index 000000000..5e33cd715
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/code-point-at/implement.js
@@ -0,0 +1,6 @@
+'use strict';
+
+var isImplemented =
+ require('../../../../string/#/code-point-at/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/code-point-at/index.js b/source/node_modules/es5-ext/test/string/#/code-point-at/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/code-point-at/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js b/source/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/code-point-at/shim.js b/source/node_modules/es5-ext/test/string/#/code-point-at/shim.js
new file mode 100644
index 000000000..0df4751c5
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/code-point-at/shim.js
@@ -0,0 +1,81 @@
+// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt
+// /blob/master/tests/tests.js
+
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.length, 1, "Length");
+
+ // String that starts with a BMP symbol
+ a(t.call('abc\uD834\uDF06def', ''), 0x61);
+ a(t.call('abc\uD834\uDF06def', '_'), 0x61);
+ a(t.call('abc\uD834\uDF06def'), 0x61);
+ a(t.call('abc\uD834\uDF06def', -Infinity), undefined);
+ a(t.call('abc\uD834\uDF06def', -1), undefined);
+ a(t.call('abc\uD834\uDF06def', -0), 0x61);
+ a(t.call('abc\uD834\uDF06def', 0), 0x61);
+ a(t.call('abc\uD834\uDF06def', 3), 0x1D306);
+ a(t.call('abc\uD834\uDF06def', 4), 0xDF06);
+ a(t.call('abc\uD834\uDF06def', 5), 0x64);
+ a(t.call('abc\uD834\uDF06def', 42), undefined);
+ a(t.call('abc\uD834\uDF06def', Infinity), undefined);
+ a(t.call('abc\uD834\uDF06def', Infinity), undefined);
+ a(t.call('abc\uD834\uDF06def', NaN), 0x61);
+ a(t.call('abc\uD834\uDF06def', false), 0x61);
+ a(t.call('abc\uD834\uDF06def', null), 0x61);
+ a(t.call('abc\uD834\uDF06def', undefined), 0x61);
+
+ // String that starts with an astral symbol
+ a(t.call('\uD834\uDF06def', ''), 0x1D306);
+ a(t.call('\uD834\uDF06def', '1'), 0xDF06);
+ a(t.call('\uD834\uDF06def', '_'), 0x1D306);
+ a(t.call('\uD834\uDF06def'), 0x1D306);
+ a(t.call('\uD834\uDF06def', -1), undefined);
+ a(t.call('\uD834\uDF06def', -0), 0x1D306);
+ a(t.call('\uD834\uDF06def', 0), 0x1D306);
+ a(t.call('\uD834\uDF06def', 1), 0xDF06);
+ a(t.call('\uD834\uDF06def', 42), undefined);
+ a(t.call('\uD834\uDF06def', false), 0x1D306);
+ a(t.call('\uD834\uDF06def', null), 0x1D306);
+ a(t.call('\uD834\uDF06def', undefined), 0x1D306);
+
+ // Lone high surrogates
+ a(t.call('\uD834abc', ''), 0xD834);
+ a(t.call('\uD834abc', '_'), 0xD834);
+ a(t.call('\uD834abc'), 0xD834);
+ a(t.call('\uD834abc', -1), undefined);
+ a(t.call('\uD834abc', -0), 0xD834);
+ a(t.call('\uD834abc', 0), 0xD834);
+ a(t.call('\uD834abc', false), 0xD834);
+ a(t.call('\uD834abc', NaN), 0xD834);
+ a(t.call('\uD834abc', null), 0xD834);
+ a(t.call('\uD834abc', undefined), 0xD834);
+
+ // Lone low surrogates
+ a(t.call('\uDF06abc', ''), 0xDF06);
+ a(t.call('\uDF06abc', '_'), 0xDF06);
+ a(t.call('\uDF06abc'), 0xDF06);
+ a(t.call('\uDF06abc', -1), undefined);
+ a(t.call('\uDF06abc', -0), 0xDF06);
+ a(t.call('\uDF06abc', 0), 0xDF06);
+ a(t.call('\uDF06abc', false), 0xDF06);
+ a(t.call('\uDF06abc', NaN), 0xDF06);
+ a(t.call('\uDF06abc', null), 0xDF06);
+ a(t.call('\uDF06abc', undefined), 0xDF06);
+
+ a.throws(function () { t.call(undefined); }, TypeError);
+ a.throws(function () { t.call(undefined, 4); }, TypeError);
+ a.throws(function () { t.call(null); }, TypeError);
+ a.throws(function () { t.call(null, 4); }, TypeError);
+ a(t.call(42, 0), 0x34);
+ a(t.call(42, 1), 0x32);
+ a(t.call({ toString: function () { return 'abc'; } }, 2), 0x63);
+
+ a.throws(function () { t.apply(undefined); }, TypeError);
+ a.throws(function () { t.apply(undefined, [4]); }, TypeError);
+ a.throws(function () { t.apply(null); }, TypeError);
+ a.throws(function () { t.apply(null, [4]); }, TypeError);
+ a(t.apply(42, [0]), 0x34);
+ a(t.apply(42, [1]), 0x32);
+ a(t.apply({ toString: function () { return 'abc'; } }, [2]), 0x63);
+};
diff --git a/source/node_modules/es5-ext/test/string/#/contains/implement.js b/source/node_modules/es5-ext/test/string/#/contains/implement.js
new file mode 100644
index 000000000..220f50d46
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/contains/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../string/#/contains/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/contains/index.js b/source/node_modules/es5-ext/test/string/#/contains/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/contains/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/contains/is-implemented.js b/source/node_modules/es5-ext/test/string/#/contains/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/contains/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/contains/shim.js b/source/node_modules/es5-ext/test/string/#/contains/shim.js
new file mode 100644
index 000000000..a0ea4db20
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/contains/shim.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('raz', ''), true, "Empty");
+ a(t.call('', ''), true, "Both Empty");
+ a(t.call('raz', 'raz'), true, "Same");
+ a(t.call('razdwa', 'raz'), true, "Starts with");
+ a(t.call('razdwa', 'dwa'), true, "Ends with");
+ a(t.call('razdwa', 'zdw'), true, "In middle");
+ a(t.call('', 'raz'), false, "Something in empty");
+ a(t.call('az', 'raz'), false, "Longer");
+ a(t.call('azasdfasdf', 'azff'), false, "Not found");
+ a(t.call('razdwa', 'raz', 1), false, "Position");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/ends-with/implement.js b/source/node_modules/es5-ext/test/string/#/ends-with/implement.js
new file mode 100644
index 000000000..93bd2ddcd
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/ends-with/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../string/#/ends-with/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/ends-with/index.js b/source/node_modules/es5-ext/test/string/#/ends-with/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/ends-with/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js b/source/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/ends-with/shim.js b/source/node_modules/es5-ext/test/string/#/ends-with/shim.js
new file mode 100644
index 000000000..e4b93c407
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/ends-with/shim.js
@@ -0,0 +1,16 @@
+// In some parts copied from:
+// http://closure-library.googlecode.com/svn/trunk/closure/goog/
+// string/string_test.html
+
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('abc', ''), true, "Empty needle");
+ a(t.call('abcd', 'cd'), true, "Ends with needle");
+ a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
+ a(t.call('abcd', 'ab'), false, "Doesn't end with needle");
+ a(t.call('abc', 'defg'), false, "Length trick");
+ a(t.call('razdwa', 'zd', 3), false, "Position: false");
+ a(t.call('razdwa', 'zd', 4), true, "Position: true");
+ a(t.call('razdwa', 'zd', 5), false, "Position: false #2");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/source/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
new file mode 100644
index 000000000..bd7ded4be
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa'), 'razDwaTRzy4yRtr4Tiu45Pa');
+};
diff --git a/source/node_modules/es5-ext/test/string/#/indent.js b/source/node_modules/es5-ext/test/string/#/indent.js
new file mode 100644
index 000000000..eb92b36f5
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/indent.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('ra\nzz', ''), 'ra\nzz', "Empty");
+ a(t.call('ra\nzz', '\t', 3), '\t\t\tra\n\t\t\tzz', "String repeat");
+ a(t.call('ra\nzz\nsss\nfff\n', '\t'), '\tra\n\tzz\n\tsss\n\tfff\n',
+ "Multi-line");
+ a(t.call('ra\n\nzz\n', '\t'), '\tra\n\n\tzz\n', "Don't touch empty lines");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/last.js b/source/node_modules/es5-ext/test/string/#/last.js
new file mode 100644
index 000000000..ad36a213c
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/last.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call(''), null, "Null");
+ a(t.call('abcdef'), 'f', "String");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/normalize/_data.js b/source/node_modules/es5-ext/test/string/#/normalize/_data.js
new file mode 100644
index 000000000..c741addb0
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/normalize/_data.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t[0], 'object'); };
diff --git a/source/node_modules/es5-ext/test/string/#/normalize/implement.js b/source/node_modules/es5-ext/test/string/#/normalize/implement.js
new file mode 100644
index 000000000..4886c9b83
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/normalize/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../string/#/normalize/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/normalize/index.js b/source/node_modules/es5-ext/test/string/#/normalize/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/normalize/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/normalize/is-implemented.js b/source/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/normalize/shim.js b/source/node_modules/es5-ext/test/string/#/normalize/shim.js
new file mode 100644
index 000000000..28e27f595
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/normalize/shim.js
@@ -0,0 +1,13 @@
+// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js
+
+'use strict';
+
+var str = 'äiti';
+
+module.exports = function (t, a) {
+ a(t.call(str), "\u00e4iti");
+ a(t.call(str, "NFC"), "\u00e4iti");
+ a(t.call(str, "NFD"), "a\u0308iti");
+ a(t.call(str, "NFKC"), "\u00e4iti");
+ a(t.call(str, "NFKD"), "a\u0308iti");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/pad.js b/source/node_modules/es5-ext/test/string/#/pad.js
new file mode 100644
index 000000000..28c3fcaa1
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/pad.js
@@ -0,0 +1,24 @@
+'use strict';
+
+var partial = require('../../../function/#/partial');
+
+module.exports = {
+ Left: function (t, a) {
+ t = partial.call(t, 'x', 5);
+
+ a(t.call('yy'), 'xxxyy');
+ a(t.call(''), 'xxxxx', "Empty string");
+
+ a(t.call('yyyyy'), 'yyyyy', 'Equal length');
+ a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
+ },
+ Right: function (t, a) {
+ t = partial.call(t, 'x', -5);
+
+ a(t.call('yy'), 'yyxxx');
+ a(t.call(''), 'xxxxx', "Empty string");
+
+ a(t.call('yyyyy'), 'yyyyy', 'Equal length');
+ a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
+ }
+};
diff --git a/source/node_modules/es5-ext/test/string/#/plain-replace-all.js b/source/node_modules/es5-ext/test/string/#/plain-replace-all.js
new file mode 100644
index 000000000..a425c87a4
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/plain-replace-all.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic");
+ a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts");
+ a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace");
+
+ a(t.call('$raz$$dwa$trzy$', '$', '&&'), '&&raz&&&&dwa&&trzy&&', "Multi");
+ a(t.call('$raz$$dwa$$$$trzy$', '$$', '&'), '$raz&dwa&&trzy$',
+ "Multi many chars");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/plain-replace.js b/source/node_modules/es5-ext/test/string/#/plain-replace.js
new file mode 100644
index 000000000..54522ed74
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/plain-replace.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic");
+ a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts");
+ a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/repeat/implement.js b/source/node_modules/es5-ext/test/string/#/repeat/implement.js
new file mode 100644
index 000000000..7ff65a811
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/repeat/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../string/#/repeat/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/repeat/index.js b/source/node_modules/es5-ext/test/string/#/repeat/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/repeat/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/repeat/is-implemented.js b/source/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/repeat/shim.js b/source/node_modules/es5-ext/test/string/#/repeat/shim.js
new file mode 100644
index 000000000..7e0d077ec
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/repeat/shim.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('a', 0), '', "Empty");
+ a(t.call('a', 1), 'a', "1");
+ a(t.call('\t', 5), '\t\t\t\t\t', "Whitespace");
+ a(t.call('raz', 3), 'razrazraz', "Many chars");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/starts-with/implement.js b/source/node_modules/es5-ext/test/string/#/starts-with/implement.js
new file mode 100644
index 000000000..fc8490fc9
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/starts-with/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../../string/#/starts-with/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/#/starts-with/index.js b/source/node_modules/es5-ext/test/string/#/starts-with/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/starts-with/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js b/source/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/#/starts-with/shim.js b/source/node_modules/es5-ext/test/string/#/starts-with/shim.js
new file mode 100644
index 000000000..e0e123b32
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/starts-with/shim.js
@@ -0,0 +1,14 @@
+// Inspired and in some parts copied from:
+// http://closure-library.googlecode.com/svn/trunk/closure/goog
+// /string/string_test.html
+
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('abc', ''), true, "Empty needle");
+ a(t.call('abcd', 'ab'), true, "Starts with needle");
+ a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
+ a(t.call('abcd', 'bcde', 1), false, "Needle larger than haystack");
+ a(!t.call('abcd', 'cd'), true, "Doesn't start with needle");
+ a(t.call('abcd', 'bc', 1), true, "Position");
+};
diff --git a/source/node_modules/es5-ext/test/string/#/uncapitalize.js b/source/node_modules/es5-ext/test/string/#/uncapitalize.js
new file mode 100644
index 000000000..50f35f1fe
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/#/uncapitalize.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t.call('raz'), 'raz', "Word");
+ a(t.call('BLA'), 'bLA', "Uppercase");
+ a(t.call(''), '', "Empty");
+ a(t.call('a'), 'a', "One letter");
+ a(t.call('this is a test'), 'this is a test', "Sentence");
+ a(t.call('This is a test'), 'this is a test', "Capitalized sentence");
+};
diff --git a/source/node_modules/es5-ext/test/string/format-method.js b/source/node_modules/es5-ext/test/string/format-method.js
new file mode 100644
index 000000000..bb5561ee4
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/format-method.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = function (t, a) {
+ t = t({ a: 'A', aa: 'B', ab: 'C', b: 'D',
+ c: function () { return ++this.a; } });
+ a(t.call({ a: 0 }, ' %a%aab%abb%b\\%aa%ab%c%c '), ' ABbCbD%aaC12 ');
+};
diff --git a/source/node_modules/es5-ext/test/string/from-code-point/implement.js b/source/node_modules/es5-ext/test/string/from-code-point/implement.js
new file mode 100644
index 000000000..0aceb97ef
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/from-code-point/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../string/from-code-point/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/from-code-point/index.js b/source/node_modules/es5-ext/test/string/from-code-point/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/from-code-point/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/from-code-point/is-implemented.js b/source/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/from-code-point/shim.js b/source/node_modules/es5-ext/test/string/from-code-point/shim.js
new file mode 100644
index 000000000..88cda3d63
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/from-code-point/shim.js
@@ -0,0 +1,47 @@
+// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master
+// /tests/tests.js
+
+'use strict';
+
+var pow = Math.pow;
+
+module.exports = function (t, a) {
+ var counter, result;
+
+ a(t.length, 1, "Length");
+ a(String.propertyIsEnumerable('fromCodePoint'), false, "Not enumerable");
+
+ a(t(''), '\0', "Empty string");
+ a(t(), '', "No arguments");
+ a(t(-0), '\0', "-0");
+ a(t(0), '\0', "0");
+ a(t(0x1D306), '\uD834\uDF06', "Unicode");
+ a(t(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07', "Complex unicode");
+ a(t(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07', "Complex");
+ a(t(false), '\0', "false");
+ a(t(null), '\0', "null");
+
+ a.throws(function () { t('_'); }, RangeError, "_");
+ a.throws(function () { t(Infinity); }, RangeError, "Infinity");
+ a.throws(function () { t(-Infinity); }, RangeError, "-Infinity");
+ a.throws(function () { t(-1); }, RangeError, "-1");
+ a.throws(function () { t(0x10FFFF + 1); }, RangeError, "Range error #1");
+ a.throws(function () { t(3.14); }, RangeError, "Range error #2");
+ a.throws(function () { t(3e-2); }, RangeError, "Range error #3");
+ a.throws(function () { t(-Infinity); }, RangeError, "Range error #4");
+ a.throws(function () { t(+Infinity); }, RangeError, "Range error #5");
+ a.throws(function () { t(NaN); }, RangeError, "Range error #6");
+ a.throws(function () { t(undefined); }, RangeError, "Range error #7");
+ a.throws(function () { t({}); }, RangeError, "Range error #8");
+ a.throws(function () { t(/re/); }, RangeError, "Range error #9");
+
+ counter = pow(2, 15) * 3 / 2;
+ result = [];
+ while (--counter >= 0) result.push(0); // one code unit per symbol
+ t.apply(null, result); // must not throw
+
+ counter = pow(2, 15) * 3 / 2;
+ result = [];
+ while (--counter >= 0) result.push(0xFFFF + 1); // two code units per symbol
+ t.apply(null, result); // must not throw
+};
diff --git a/source/node_modules/es5-ext/test/string/is-string.js b/source/node_modules/es5-ext/test/string/is-string.js
new file mode 100644
index 000000000..32f595829
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/is-string.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function (t, a) {
+ a(t(null), false, "Null");
+ a(t(''), true, "Empty string");
+ a(t(12), false, "Number");
+ a(t(false), false, "Boolean");
+ a(t(new Date()), false, "Date");
+ a(t(new String('raz')), true, "String object");
+ a(t('asdfaf'), true, "String");
+};
diff --git a/source/node_modules/es5-ext/test/string/random-uniq.js b/source/node_modules/es5-ext/test/string/random-uniq.js
new file mode 100644
index 000000000..6791ac266
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/random-uniq.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/);
+
+module.exports = function (t, a) {
+ a(typeof t(), 'string');
+ a.ok(t().length > 7);
+ a.not(t(), t());
+ a.ok(isValidFormat(t()));
+ a.ok(isValidFormat(t()));
+ a.ok(isValidFormat(t()));
+ a.ok(isValidFormat(t()));
+ a.ok(isValidFormat(t()));
+};
diff --git a/source/node_modules/es5-ext/test/string/raw/implement.js b/source/node_modules/es5-ext/test/string/raw/implement.js
new file mode 100644
index 000000000..59416de3a
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/raw/implement.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isImplemented = require('../../../string/raw/is-implemented');
+
+module.exports = function (a) { a(isImplemented(), true); };
diff --git a/source/node_modules/es5-ext/test/string/raw/index.js b/source/node_modules/es5-ext/test/string/raw/index.js
new file mode 100644
index 000000000..2e0bfa324
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/raw/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./shim');
diff --git a/source/node_modules/es5-ext/test/string/raw/is-implemented.js b/source/node_modules/es5-ext/test/string/raw/is-implemented.js
new file mode 100644
index 000000000..1a8832889
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/raw/is-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/source/node_modules/es5-ext/test/string/raw/shim.js b/source/node_modules/es5-ext/test/string/raw/shim.js
new file mode 100644
index 000000000..025ed7804
--- /dev/null
+++ b/source/node_modules/es5-ext/test/string/raw/shim.js
@@ -0,0 +1,15 @@
+// Partially taken from:
+// https://github.com/paulmillr/es6-shim/blob/master/test/string.js
+
+'use strict';
+
+module.exports = function (t, a) {
+ var callSite = [];
+
+ callSite.raw = ["The total is ", " ($", " with tax)"];
+ a(t(callSite, '{total}', '{total * 1.01}'),
+ 'The total is {total} (${total * 1.01} with tax)');
+
+ callSite.raw = [];
+ a(t(callSite, '{total}', '{total * 1.01}'), '');
+};
diff --git a/source/node_modules/es6-iterator/#/chain.js b/source/node_modules/es6-iterator/#/chain.js
new file mode 100644
index 000000000..6dc1543b3
--- /dev/null
+++ b/source/node_modules/es6-iterator/#/chain.js
@@ -0,0 +1,40 @@
+'use strict';
+
+var setPrototypeOf = require('es5-ext/object/set-prototype-of')
+ , d = require('d')
+ , Iterator = require('../')
+ , validIterable = require('../valid-iterable')
+
+ , push = Array.prototype.push
+ , defineProperties = Object.defineProperties
+ , IteratorChain;
+
+IteratorChain = function (iterators) {
+ defineProperties(this, {
+ __iterators__: d('', iterators),
+ __current__: d('w', iterators.shift())
+ });
+};
+if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator);
+
+IteratorChain.prototype = Object.create(Iterator.prototype, {
+ constructor: d(IteratorChain),
+ next: d(function () {
+ var result;
+ if (!this.__current__) return { done: true, value: undefined };
+ result = this.__current__.next();
+ while (result.done) {
+ this.__current__ = this.__iterators__.shift();
+ if (!this.__current__) return { done: true, value: undefined };
+ result = this.__current__.next();
+ }
+ return result;
+ })
+});
+
+module.exports = function () {
+ var iterators = [this];
+ push.apply(iterators, arguments);
+ iterators.forEach(validIterable);
+ return new IteratorChain(iterators);
+};
diff --git a/source/node_modules/es6-iterator/.lint b/source/node_modules/es6-iterator/.lint
new file mode 100644
index 000000000..cf54d8156
--- /dev/null
+++ b/source/node_modules/es6-iterator/.lint
@@ -0,0 +1,11 @@
+@root
+
+module
+
+tabs
+indent 2
+maxlen 100
+
+ass
+nomen
+plusplus
diff --git a/source/node_modules/es6-iterator/.npmignore b/source/node_modules/es6-iterator/.npmignore
new file mode 100644
index 000000000..155e41f69
--- /dev/null
+++ b/source/node_modules/es6-iterator/.npmignore
@@ -0,0 +1,4 @@
+.DS_Store
+/node_modules
+/npm-debug.log
+/.lintcache
diff --git a/source/node_modules/es6-iterator/.travis.yml b/source/node_modules/es6-iterator/.travis.yml
new file mode 100644
index 000000000..fc2541106
--- /dev/null
+++ b/source/node_modules/es6-iterator/.travis.yml
@@ -0,0 +1,11 @@
+sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
+language: node_js
+node_js:
+ - 0.12
+ - 4
+
+notifications:
+ email:
+ - medikoo+es6-iterator@medikoo.com
+
+script: "npm test && npm run lint"
diff --git a/source/node_modules/es6-iterator/CHANGES b/source/node_modules/es6-iterator/CHANGES
new file mode 100644
index 000000000..ce3318093
--- /dev/null
+++ b/source/node_modules/es6-iterator/CHANGES
@@ -0,0 +1,35 @@
+v2.0.0 -- 2015.10.02
+* Use es6-symbol at v3
+
+v1.0.0 -- 2015.06.23
+* Implement support for arguments object
+* Drop support for v0.8 node ('^' in package.json dependencies)
+
+v0.1.3 -- 2015.02.02
+* Update dependencies
+* Fix spelling of LICENSE
+
+v0.1.2 -- 2014.11.19
+* Optimise internal `_next` to not verify internal's list length at all times
+ (#2 thanks @RReverser)
+* Fix documentation examples
+* Configure lint scripts
+
+v0.1.1 -- 2014.04.29
+* Fix es6-symbol dependency version
+
+v0.1.0 -- 2014.04.29
+* Assure strictly npm hosted dependencies
+* Remove sparse arrays dedicated handling (as per spec)
+* Add: isIterable, validIterable and chain (method)
+* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from)
+* Add break possiblity to 'forOf' via 'doBreak' function argument
+* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator)
+* Provide @@toStringTag symbol
+* When available rely on @@iterator symbol
+* Remove 32bit integer maximum list length restriction
+* Improve Iterator internals
+* Update to use latest version of dependencies
+
+v0.0.0 -- 2013.10.12
+Initial (dev version)
\ No newline at end of file
diff --git a/source/node_modules/es6-iterator/LICENSE b/source/node_modules/es6-iterator/LICENSE
new file mode 100644
index 000000000..04724a3ab
--- /dev/null
+++ b/source/node_modules/es6-iterator/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/es6-iterator/README.md b/source/node_modules/es6-iterator/README.md
new file mode 100644
index 000000000..288373da7
--- /dev/null
+++ b/source/node_modules/es6-iterator/README.md
@@ -0,0 +1,148 @@
+# es6-iterator
+## ECMAScript 6 Iterator interface
+
+### Installation
+
+ $ npm install es6-iterator
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+## API
+
+### Constructors
+
+#### Iterator(list) _(es6-iterator)_
+
+Abstract Iterator interface. Meant for extensions and not to be used on its own.
+
+Accepts any _list_ object (technically object with numeric _length_ property).
+
+_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_
+
+```javascript
+var Iterator = require('es6-iterator')
+var iterator = new Iterator([1, 2, 3]);
+
+iterator.next(); // { value: 1, done: false }
+iterator.next(); // { value: 2, done: false }
+iterator.next(); // { value: 3, done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+
+#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_
+
+Dedicated for arrays and array-likes. Supports three iteration kinds:
+* __value__ _(default)_ - Iterates values
+* __key__ - Iterates indexes
+* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.
+
+
+```javascript
+var ArrayIterator = require('es6-iterator/array')
+var iterator = new ArrayIterator([1, 2, 3], 'key+value');
+
+iterator.next(); // { value: [0, 1], done: false }
+iterator.next(); // { value: [1, 2], done: false }
+iterator.next(); // { value: [2, 3], done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+May also be used for _arguments_ objects:
+
+```javascript
+(function () {
+ var iterator = new ArrayIterator(arguments);
+
+ iterator.next(); // { value: 1, done: false }
+ iterator.next(); // { value: 2, done: false }
+ iterator.next(); // { value: 3, done: false }
+ iterator.next(); // { value: undefined, done: true }
+}(1, 2, 3));
+```
+
+#### StringIterator(str) _(es6-iterator/string)_
+
+Assures proper iteration over unicode symbols.
+See: http://mathiasbynens.be/notes/javascript-unicode
+
+```javascript
+var StringIterator = require('es6-iterator/string');
+var iterator = new StringIterator('f🙈o🙉o🙊');
+
+iterator.next(); // { value: 'f', done: false }
+iterator.next(); // { value: '🙈', done: false }
+iterator.next(); // { value: 'o', done: false }
+iterator.next(); // { value: '🙉', done: false }
+iterator.next(); // { value: 'o', done: false }
+iterator.next(); // { value: '🙊', done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+### Function utilities
+
+#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_
+
+Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.
+
+```
+var forOf = require('es6-iterator/for-of');
+var result = [];
+
+forOf('🙈🙉🙊', function (monkey) { result.push(monkey); });
+console.log(result); // ['🙈', '🙉', '🙊'];
+```
+
+Optionally you can break iteration at any point:
+
+```javascript
+var result = [];
+
+forOf([1,2,3,4]', function (val, doBreak) {
+ result.push(monkey);
+ if (val >= 3) doBreak();
+});
+console.log(result); // [1, 2, 3];
+```
+
+#### get(obj) _(es6-iterator/get)_
+
+Return iterator for any iterable object.
+
+```javascript
+var getIterator = require('es6-iterator/get');
+var iterator = get([1,2,3]);
+
+iterator.next(); // { value: 1, done: false }
+iterator.next(); // { value: 2, done: false }
+iterator.next(); // { value: 3, done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+#### isIterable(obj) _(es6-iterator/is-iterable)_
+
+Whether _obj_ is iterable
+
+```javascript
+var isIterable = require('es6-iterator/is-iterable');
+
+isIterable(null); // false
+isIterable(true); // false
+isIterable('str'); // true
+isIterable(['a', 'r', 'r']); // true
+isIterable(new ArrayIterator([])); // true
+```
+
+#### validIterable(obj) _(es6-iterator/valid-iterable)_
+
+If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.
+
+### Method extensions
+
+#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_
+
+Chain multiple iterators into one.
+
+### Tests [](https://travis-ci.org/medikoo/es6-iterator)
+
+ $ npm test
diff --git a/source/node_modules/es6-iterator/array.js b/source/node_modules/es6-iterator/array.js
new file mode 100644
index 000000000..885ad0a4f
--- /dev/null
+++ b/source/node_modules/es6-iterator/array.js
@@ -0,0 +1,30 @@
+'use strict';
+
+var setPrototypeOf = require('es5-ext/object/set-prototype-of')
+ , contains = require('es5-ext/string/#/contains')
+ , d = require('d')
+ , Iterator = require('./')
+
+ , defineProperty = Object.defineProperty
+ , ArrayIterator;
+
+ArrayIterator = module.exports = function (arr, kind) {
+ if (!(this instanceof ArrayIterator)) return new ArrayIterator(arr, kind);
+ Iterator.call(this, arr);
+ if (!kind) kind = 'value';
+ else if (contains.call(kind, 'key+value')) kind = 'key+value';
+ else if (contains.call(kind, 'key')) kind = 'key';
+ else kind = 'value';
+ defineProperty(this, '__kind__', d('', kind));
+};
+if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);
+
+ArrayIterator.prototype = Object.create(Iterator.prototype, {
+ constructor: d(ArrayIterator),
+ _resolve: d(function (i) {
+ if (this.__kind__ === 'value') return this.__list__[i];
+ if (this.__kind__ === 'key+value') return [i, this.__list__[i]];
+ return i;
+ }),
+ toString: d(function () { return '[object Array Iterator]'; })
+});
diff --git a/source/node_modules/es6-iterator/for-of.js b/source/node_modules/es6-iterator/for-of.js
new file mode 100644
index 000000000..c7a28411d
--- /dev/null
+++ b/source/node_modules/es6-iterator/for-of.js
@@ -0,0 +1,46 @@
+'use strict';
+
+var isArguments = require('es5-ext/function/is-arguments')
+ , callable = require('es5-ext/object/valid-callable')
+ , isString = require('es5-ext/string/is-string')
+ , get = require('./get')
+
+ , isArray = Array.isArray, call = Function.prototype.call
+ , some = Array.prototype.some;
+
+module.exports = function (iterable, cb/*, thisArg*/) {
+ var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code;
+ if (isArray(iterable) || isArguments(iterable)) mode = 'array';
+ else if (isString(iterable)) mode = 'string';
+ else iterable = get(iterable);
+
+ callable(cb);
+ doBreak = function () { broken = true; };
+ if (mode === 'array') {
+ some.call(iterable, function (value) {
+ call.call(cb, thisArg, value, doBreak);
+ if (broken) return true;
+ });
+ return;
+ }
+ if (mode === 'string') {
+ l = iterable.length;
+ for (i = 0; i < l; ++i) {
+ char = iterable[i];
+ if ((i + 1) < l) {
+ code = char.charCodeAt(0);
+ if ((code >= 0xD800) && (code <= 0xDBFF)) char += iterable[++i];
+ }
+ call.call(cb, thisArg, char, doBreak);
+ if (broken) break;
+ }
+ return;
+ }
+ result = iterable.next();
+
+ while (!result.done) {
+ call.call(cb, thisArg, result.value, doBreak);
+ if (broken) return;
+ result = iterable.next();
+ }
+};
diff --git a/source/node_modules/es6-iterator/get.js b/source/node_modules/es6-iterator/get.js
new file mode 100644
index 000000000..7c7e052b1
--- /dev/null
+++ b/source/node_modules/es6-iterator/get.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var isArguments = require('es5-ext/function/is-arguments')
+ , isString = require('es5-ext/string/is-string')
+ , ArrayIterator = require('./array')
+ , StringIterator = require('./string')
+ , iterable = require('./valid-iterable')
+ , iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (obj) {
+ if (typeof iterable(obj)[iteratorSymbol] === 'function') return obj[iteratorSymbol]();
+ if (isArguments(obj)) return new ArrayIterator(obj);
+ if (isString(obj)) return new StringIterator(obj);
+ return new ArrayIterator(obj);
+};
diff --git a/source/node_modules/es6-iterator/index.js b/source/node_modules/es6-iterator/index.js
new file mode 100644
index 000000000..10fd08958
--- /dev/null
+++ b/source/node_modules/es6-iterator/index.js
@@ -0,0 +1,90 @@
+'use strict';
+
+var clear = require('es5-ext/array/#/clear')
+ , assign = require('es5-ext/object/assign')
+ , callable = require('es5-ext/object/valid-callable')
+ , value = require('es5-ext/object/valid-value')
+ , d = require('d')
+ , autoBind = require('d/auto-bind')
+ , Symbol = require('es6-symbol')
+
+ , defineProperty = Object.defineProperty
+ , defineProperties = Object.defineProperties
+ , Iterator;
+
+module.exports = Iterator = function (list, context) {
+ if (!(this instanceof Iterator)) return new Iterator(list, context);
+ defineProperties(this, {
+ __list__: d('w', value(list)),
+ __context__: d('w', context),
+ __nextIndex__: d('w', 0)
+ });
+ if (!context) return;
+ callable(context.on);
+ context.on('_add', this._onAdd);
+ context.on('_delete', this._onDelete);
+ context.on('_clear', this._onClear);
+};
+
+defineProperties(Iterator.prototype, assign({
+ constructor: d(Iterator),
+ _next: d(function () {
+ var i;
+ if (!this.__list__) return;
+ if (this.__redo__) {
+ i = this.__redo__.shift();
+ if (i !== undefined) return i;
+ }
+ if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;
+ this._unBind();
+ }),
+ next: d(function () { return this._createResult(this._next()); }),
+ _createResult: d(function (i) {
+ if (i === undefined) return { done: true, value: undefined };
+ return { done: false, value: this._resolve(i) };
+ }),
+ _resolve: d(function (i) { return this.__list__[i]; }),
+ _unBind: d(function () {
+ this.__list__ = null;
+ delete this.__redo__;
+ if (!this.__context__) return;
+ this.__context__.off('_add', this._onAdd);
+ this.__context__.off('_delete', this._onDelete);
+ this.__context__.off('_clear', this._onClear);
+ this.__context__ = null;
+ }),
+ toString: d(function () { return '[object Iterator]'; })
+}, autoBind({
+ _onAdd: d(function (index) {
+ if (index >= this.__nextIndex__) return;
+ ++this.__nextIndex__;
+ if (!this.__redo__) {
+ defineProperty(this, '__redo__', d('c', [index]));
+ return;
+ }
+ this.__redo__.forEach(function (redo, i) {
+ if (redo >= index) this.__redo__[i] = ++redo;
+ }, this);
+ this.__redo__.push(index);
+ }),
+ _onDelete: d(function (index) {
+ var i;
+ if (index >= this.__nextIndex__) return;
+ --this.__nextIndex__;
+ if (!this.__redo__) return;
+ i = this.__redo__.indexOf(index);
+ if (i !== -1) this.__redo__.splice(i, 1);
+ this.__redo__.forEach(function (redo, i) {
+ if (redo > index) this.__redo__[i] = --redo;
+ }, this);
+ }),
+ _onClear: d(function () {
+ if (this.__redo__) clear.call(this.__redo__);
+ this.__nextIndex__ = 0;
+ })
+})));
+
+defineProperty(Iterator.prototype, Symbol.iterator, d(function () {
+ return this;
+}));
+defineProperty(Iterator.prototype, Symbol.toStringTag, d('', 'Iterator'));
diff --git a/source/node_modules/es6-iterator/is-iterable.js b/source/node_modules/es6-iterator/is-iterable.js
new file mode 100644
index 000000000..2c6f496c3
--- /dev/null
+++ b/source/node_modules/es6-iterator/is-iterable.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var isArguments = require('es5-ext/function/is-arguments')
+ , isString = require('es5-ext/string/is-string')
+ , iteratorSymbol = require('es6-symbol').iterator
+
+ , isArray = Array.isArray;
+
+module.exports = function (value) {
+ if (value == null) return false;
+ if (isArray(value)) return true;
+ if (isString(value)) return true;
+ if (isArguments(value)) return true;
+ return (typeof value[iteratorSymbol] === 'function');
+};
diff --git a/source/node_modules/es6-iterator/package.json b/source/node_modules/es6-iterator/package.json
new file mode 100644
index 000000000..95e41fabe
--- /dev/null
+++ b/source/node_modules/es6-iterator/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ "es6-iterator@2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/es5-ext"
+ ]
+ ],
+ "_from": "es6-iterator@>=2.0.0 <3.0.0",
+ "_id": "es6-iterator@2.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/es6-iterator",
+ "_nodeVersion": "0.12.7",
+ "_npmUser": {
+ "email": "medikoo+npm@medikoo.com",
+ "name": "medikoo"
+ },
+ "_npmVersion": "2.11.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "es6-iterator",
+ "raw": "es6-iterator@2",
+ "rawSpec": "2",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/es5-ext"
+ ],
+ "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz",
+ "_shasum": "bd968567d61635e33c0b80727613c9cb4b096bac",
+ "_shrinkwrap": null,
+ "_spec": "es6-iterator@2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/es5-ext",
+ "author": {
+ "email": "medyk@medikoo.com",
+ "name": "Mariusz Nowak",
+ "url": "http://www.medikoo.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/medikoo/es6-iterator/issues"
+ },
+ "dependencies": {
+ "d": "^0.1.1",
+ "es5-ext": "^0.10.7",
+ "es6-symbol": "3"
+ },
+ "description": "Iterator abstraction based on ES6 specification",
+ "devDependencies": {
+ "event-emitter": "^0.3.4",
+ "tad": "^0.2.3",
+ "xlint": "^0.2.2",
+ "xlint-jslint-medikoo": "^0.1.3"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "bd968567d61635e33c0b80727613c9cb4b096bac",
+ "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz"
+ },
+ "gitHead": "4d9445834e87780ab373b14d6791e860899e2d31",
+ "homepage": "https://github.com/medikoo/es6-iterator#readme",
+ "keywords": [
+ "array",
+ "generator",
+ "iterator",
+ "list",
+ "map",
+ "set"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "medikoo",
+ "email": "medikoo+npm@medikoo.com"
+ }
+ ],
+ "name": "es6-iterator",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/medikoo/es6-iterator.git"
+ },
+ "scripts": {
+ "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+ "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+ "test": "node ./node_modules/tad/bin/tad"
+ },
+ "version": "2.0.0"
+}
diff --git a/source/node_modules/es6-iterator/string.js b/source/node_modules/es6-iterator/string.js
new file mode 100644
index 000000000..cdb39ea4e
--- /dev/null
+++ b/source/node_modules/es6-iterator/string.js
@@ -0,0 +1,37 @@
+// Thanks @mathiasbynens
+// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols
+
+'use strict';
+
+var setPrototypeOf = require('es5-ext/object/set-prototype-of')
+ , d = require('d')
+ , Iterator = require('./')
+
+ , defineProperty = Object.defineProperty
+ , StringIterator;
+
+StringIterator = module.exports = function (str) {
+ if (!(this instanceof StringIterator)) return new StringIterator(str);
+ str = String(str);
+ Iterator.call(this, str);
+ defineProperty(this, '__length__', d('', str.length));
+
+};
+if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);
+
+StringIterator.prototype = Object.create(Iterator.prototype, {
+ constructor: d(StringIterator),
+ _next: d(function () {
+ if (!this.__list__) return;
+ if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;
+ this._unBind();
+ }),
+ _resolve: d(function (i) {
+ var char = this.__list__[i], code;
+ if (this.__nextIndex__ === this.__length__) return char;
+ code = char.charCodeAt(0);
+ if ((code >= 0xD800) && (code <= 0xDBFF)) return char + this.__list__[this.__nextIndex__++];
+ return char;
+ }),
+ toString: d(function () { return '[object String Iterator]'; })
+});
diff --git a/source/node_modules/es6-iterator/test/#/chain.js b/source/node_modules/es6-iterator/test/#/chain.js
new file mode 100644
index 000000000..a414c66d7
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/#/chain.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var Iterator = require('../../');
+
+module.exports = function (t, a) {
+ var i1 = new Iterator(['raz', 'dwa', 'trzy'])
+ , i2 = new Iterator(['cztery', 'pięć', 'sześć'])
+ , i3 = new Iterator(['siedem', 'osiem', 'dziewięć'])
+
+ , iterator = t.call(i1, i2, i3);
+
+ a.deep(iterator.next(), { done: false, value: 'raz' }, "#1");
+ a.deep(iterator.next(), { done: false, value: 'dwa' }, "#2");
+ a.deep(iterator.next(), { done: false, value: 'trzy' }, "#3");
+ a.deep(iterator.next(), { done: false, value: 'cztery' }, "#4");
+ a.deep(iterator.next(), { done: false, value: 'pięć' }, "#5");
+ a.deep(iterator.next(), { done: false, value: 'sześć' }, "#6");
+ a.deep(iterator.next(), { done: false, value: 'siedem' }, "#7");
+ a.deep(iterator.next(), { done: false, value: 'osiem' }, "#8");
+ a.deep(iterator.next(), { done: false, value: 'dziewięć' }, "#9");
+ a.deep(iterator.next(), { done: true, value: undefined }, "Done #1");
+ a.deep(iterator.next(), { done: true, value: undefined }, "Done #2");
+};
diff --git a/source/node_modules/es6-iterator/test/array.js b/source/node_modules/es6-iterator/test/array.js
new file mode 100644
index 000000000..ae7c2199e
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/array.js
@@ -0,0 +1,67 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (T) {
+ return {
+ Values: function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
+
+ it = new T(x);
+ a(it[iteratorSymbol](), it, "@@iterator");
+ a.deep(it.next(), { done: false, value: 'raz' }, "#1");
+ a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
+ x.splice(1, 0, 'elo');
+ a.deep(it.next(), { done: false, value: 'dwa' }, "Insert");
+ a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
+ a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
+ x.pop();
+ a.deep(it.next(), { done: false, value: 'pięć' }, "#5");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ },
+ "Keys & Values": function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
+
+ it = new T(x, 'key+value');
+ a(it[iteratorSymbol](), it, "@@iterator");
+ a.deep(it.next(), { done: false, value: [0, 'raz'] }, "#1");
+ a.deep(it.next(), { done: false, value: [1, 'dwa'] }, "#2");
+ x.splice(1, 0, 'elo');
+ a.deep(it.next(), { done: false, value: [2, 'dwa'] }, "Insert");
+ a.deep(it.next(), { done: false, value: [3, 'trzy'] }, "#3");
+ a.deep(it.next(), { done: false, value: [4, 'cztery'] }, "#4");
+ x.pop();
+ a.deep(it.next(), { done: false, value: [5, 'pięć'] }, "#5");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ },
+ Keys: function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
+
+ it = new T(x, 'key');
+ a(it[iteratorSymbol](), it, "@@iterator");
+ a.deep(it.next(), { done: false, value: 0 }, "#1");
+ a.deep(it.next(), { done: false, value: 1 }, "#2");
+ x.splice(1, 0, 'elo');
+ a.deep(it.next(), { done: false, value: 2 }, "Insert");
+ a.deep(it.next(), { done: false, value: 3 }, "#3");
+ a.deep(it.next(), { done: false, value: 4 }, "#4");
+ x.pop();
+ a.deep(it.next(), { done: false, value: 5 }, "#5");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ },
+ Sparse: function (a) {
+ var x = new Array(6), it;
+
+ x[2] = 'raz';
+ x[4] = 'dwa';
+ it = new T(x);
+ a.deep(it.next(), { done: false, value: undefined }, "#1");
+ a.deep(it.next(), { done: false, value: undefined }, "#2");
+ a.deep(it.next(), { done: false, value: 'raz' }, "#3");
+ a.deep(it.next(), { done: false, value: undefined }, "#4");
+ a.deep(it.next(), { done: false, value: 'dwa' }, "#5");
+ a.deep(it.next(), { done: false, value: undefined }, "#6");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ }
+ };
+};
diff --git a/source/node_modules/es6-iterator/test/for-of.js b/source/node_modules/es6-iterator/test/for-of.js
new file mode 100644
index 000000000..108df7d97
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/for-of.js
@@ -0,0 +1,40 @@
+'use strict';
+
+var ArrayIterator = require('../array')
+
+ , slice = Array.prototype.slice;
+
+module.exports = function (t, a) {
+ var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}, called = 0;
+ t(x, function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
+ a(this, y, "Array: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t((function () { return arguments; }('raz', 'dwa', 'trzy')), function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#");
+ a(this, y, "Arguments: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t(x = 'foo', function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
+ a(this, y, "Regular String: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ x = ['r', '💩', 'z'];
+ t('r💩z', function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
+ a(this, y, "Unicode String: context: " + (i++) + "#");
+ }, y);
+ i = 0;
+ t(new ArrayIterator(x), function () {
+ a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
+ a(this, y, "Iterator: context: " + (i++) + "#");
+ }, y);
+
+ t(x = ['raz', 'dwa', 'trzy'], function (value, doBreak) {
+ ++called;
+ return doBreak();
+ });
+ a(called, 1, "Break");
+};
diff --git a/source/node_modules/es6-iterator/test/get.js b/source/node_modules/es6-iterator/test/get.js
new file mode 100644
index 000000000..81ce6e6ae
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/get.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator
+ , Iterator = require('../');
+
+module.exports = function (t, a) {
+ var iterator;
+ a.throws(function () { t(); }, TypeError, "Null");
+ a.throws(function () { t({}); }, TypeError, "Plain object");
+ a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
+ iterator = {};
+ iterator[iteratorSymbol] = function () { return new Iterator([]); };
+ a(t(iterator) instanceof Iterator, true, "Iterator");
+ a(String(t([])), '[object Array Iterator]', " Array");
+ a(String(t((function () { return arguments; }()))), '[object Array Iterator]', " Arguments");
+ a(String(t('foo')), '[object String Iterator]', "String");
+};
diff --git a/source/node_modules/es6-iterator/test/index.js b/source/node_modules/es6-iterator/test/index.js
new file mode 100644
index 000000000..ea3621adf
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/index.js
@@ -0,0 +1,99 @@
+'use strict';
+
+var ee = require('event-emitter')
+ , iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (T) {
+ return {
+ "": function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], it, y, z;
+
+ it = new T(x);
+ a(it[iteratorSymbol](), it, "@@iterator");
+ y = it.next();
+ a.deep(y, { done: false, value: 'raz' }, "#1");
+ z = it.next();
+ a.not(y, z, "Recreate result");
+ a.deep(z, { done: false, value: 'dwa' }, "#2");
+ a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
+ a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
+ a.deep(it.next(), { done: false, value: 'pięć' }, "#5");
+ a.deep(y = it.next(), { done: true, value: undefined }, "End");
+ a.not(y, it.next(), "Recreate result on dead");
+ },
+ Emited: function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], y, it;
+
+ y = ee();
+ it = new T(x, y);
+ a.deep(it.next(), { done: false, value: 'raz' }, "#1");
+ a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
+ y.emit('_add', x.push('sześć') - 1);
+ a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
+ x.splice(1, 0, 'półtora');
+ y.emit('_add', 1);
+ a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
+ x.splice(5, 1);
+ y.emit('_delete', 5);
+ a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
+ a.deep(it.next(), { done: false, value: 'sześć' }, "#5");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ },
+ "Emited #2": function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
+
+ y = ee();
+ it = new T(x, y);
+ a.deep(it.next(), { done: false, value: 'raz' }, "#1");
+ a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
+ x.splice(1, 0, 'półtora');
+ y.emit('_add', 1);
+ x.splice(1, 0, '1.25');
+ y.emit('_add', 1);
+ x.splice(0, 1);
+ y.emit('_delete', 0);
+ a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
+ a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2");
+ a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
+ a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
+ x.splice(5, 1);
+ y.emit('_delete', 5);
+ a.deep(it.next(), { done: false, value: 'sześć' }, "#5");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ },
+ "Emited: Clear #1": function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
+
+ y = ee();
+ it = new T(x, y);
+ a.deep(it.next(), { done: false, value: 'raz' }, "#1");
+ a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
+ x.length = 0;
+ y.emit('_clear');
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ },
+ "Emited: Clear #2": function (a) {
+ var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
+
+ y = ee();
+ it = new T(x, y);
+ a.deep(it.next(), { done: false, value: 'raz' }, "#1");
+ a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
+ x.length = 0;
+ y.emit('_clear');
+ x.push('foo');
+ x.push('bar');
+ a.deep(it.next(), { done: false, value: 'foo' }, "#3");
+ a.deep(it.next(), { done: false, value: 'bar' }, "#4");
+ x.splice(1, 0, 'półtora');
+ y.emit('_add', 1);
+ x.splice(1, 0, '1.25');
+ y.emit('_add', 1);
+ x.splice(0, 1);
+ y.emit('_delete', 0);
+ a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
+ a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+ }
+ };
+};
diff --git a/source/node_modules/es6-iterator/test/is-iterable.js b/source/node_modules/es6-iterator/test/is-iterable.js
new file mode 100644
index 000000000..438ad349c
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/is-iterable.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator
+ , Iterator = require('../');
+
+module.exports = function (t, a) {
+ var iterator;
+ a(t(), false, "Undefined");
+ a(t(123), false, "Number");
+ a(t({}), false, "Plain object");
+ a(t({ length: 0 }), false, "Array-like");
+ iterator = {};
+ iterator[iteratorSymbol] = function () { return new Iterator([]); };
+ a(t(iterator), true, "Iterator");
+ a(t([]), true, "Array");
+ a(t('foo'), true, "String");
+ a(t(''), true, "Empty string");
+ a(t((function () { return arguments; }())), true, "Arguments");
+};
diff --git a/source/node_modules/es6-iterator/test/string.js b/source/node_modules/es6-iterator/test/string.js
new file mode 100644
index 000000000..d11855f25
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/string.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (T, a) {
+ var it = new T('foobar');
+
+ a(it[iteratorSymbol](), it, "@@iterator");
+ a.deep(it.next(), { done: false, value: 'f' }, "#1");
+ a.deep(it.next(), { done: false, value: 'o' }, "#2");
+ a.deep(it.next(), { done: false, value: 'o' }, "#3");
+ a.deep(it.next(), { done: false, value: 'b' }, "#4");
+ a.deep(it.next(), { done: false, value: 'a' }, "#5");
+ a.deep(it.next(), { done: false, value: 'r' }, "#6");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+
+ a.h1("Outside of BMP");
+ it = new T('r💩z');
+ a.deep(it.next(), { done: false, value: 'r' }, "#1");
+ a.deep(it.next(), { done: false, value: '💩' }, "#2");
+ a.deep(it.next(), { done: false, value: 'z' }, "#3");
+ a.deep(it.next(), { done: true, value: undefined }, "End");
+};
diff --git a/source/node_modules/es6-iterator/test/valid-iterable.js b/source/node_modules/es6-iterator/test/valid-iterable.js
new file mode 100644
index 000000000..a407f1a0c
--- /dev/null
+++ b/source/node_modules/es6-iterator/test/valid-iterable.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var iteratorSymbol = require('es6-symbol').iterator
+ , Iterator = require('../');
+
+module.exports = function (t, a) {
+ var obj;
+ a.throws(function () { t(); }, TypeError, "Undefined");
+ a.throws(function () { t({}); }, TypeError, "Plain object");
+ a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
+ obj = {};
+ obj[iteratorSymbol] = function () { return new Iterator([]); };
+ a(t(obj), obj, "Iterator");
+ obj = [];
+ a(t(obj), obj, 'Array');
+ obj = (function () { return arguments; }());
+ a(t(obj), obj, "Arguments");
+};
diff --git a/source/node_modules/es6-iterator/valid-iterable.js b/source/node_modules/es6-iterator/valid-iterable.js
new file mode 100644
index 000000000..d330997cb
--- /dev/null
+++ b/source/node_modules/es6-iterator/valid-iterable.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isIterable = require('./is-iterable');
+
+module.exports = function (value) {
+ if (!isIterable(value)) throw new TypeError(value + " is not iterable");
+ return value;
+};
diff --git a/source/node_modules/es6-symbol/.lint b/source/node_modules/es6-symbol/.lint
new file mode 100644
index 000000000..df1e53cd5
--- /dev/null
+++ b/source/node_modules/es6-symbol/.lint
@@ -0,0 +1,15 @@
+@root
+
+module
+
+tabs
+indent 2
+maxlen 100
+
+ass
+nomen
+plusplus
+newcap
+vars
+
+predef+ Symbol
diff --git a/source/node_modules/es6-symbol/.npmignore b/source/node_modules/es6-symbol/.npmignore
new file mode 100644
index 000000000..155e41f69
--- /dev/null
+++ b/source/node_modules/es6-symbol/.npmignore
@@ -0,0 +1,4 @@
+.DS_Store
+/node_modules
+/npm-debug.log
+/.lintcache
diff --git a/source/node_modules/es6-symbol/.travis.yml b/source/node_modules/es6-symbol/.travis.yml
new file mode 100644
index 000000000..6830765b5
--- /dev/null
+++ b/source/node_modules/es6-symbol/.travis.yml
@@ -0,0 +1,10 @@
+sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
+language: node_js
+node_js:
+ - 0.12
+ - v4
+ - v5
+
+notifications:
+ email:
+ - medikoo+es6-symbol@medikoo.com
diff --git a/source/node_modules/es6-symbol/CHANGES b/source/node_modules/es6-symbol/CHANGES
new file mode 100644
index 000000000..cbedd4244
--- /dev/null
+++ b/source/node_modules/es6-symbol/CHANGES
@@ -0,0 +1,46 @@
+v3.0.2 -- 2015.12.12
+* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of
+ polyfill. See #13
+
+v3.0.1 -- 2015.10.22
+* Workaround for IE11 bug (reported in #12)
+
+v3.0.0 -- 2015.10.02
+* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available
+ Otherwise polyfill symbols may not be recognized by other functions
+* Improve documentation
+
+v2.0.1 -- 2015.01.28
+* Fix Symbol.prototype[Symbol.isPrimitive] implementation
+* Improve validation within Symbol.prototype.toString and
+ Symbol.prototype.valueOf
+
+v2.0.0 -- 2015.01.28
+* Update up to changes in specification:
+ * Implement `for` and `keyFor`
+ * Remove `Symbol.create` and `Symbol.isRegExp`
+ * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and
+ `Symbol.split`
+* Rename `validSymbol` to `validateSymbol`
+* Improve documentation
+* Remove dead test modules
+
+v1.0.0 -- 2015.01.26
+* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value)
+* Introduce initialization via hidden constructor
+* Fix isSymbol handling of polyfill values when native Symbol is present
+* Fix spelling of LICENSE
+* Configure lint scripts
+
+v0.1.1 -- 2014.10.07
+* Fix isImplemented, so it returns true in case of polyfill
+* Improve documentations
+
+v0.1.0 -- 2014.04.28
+* Assure strictly npm dependencies
+* Update to use latest versions of dependencies
+* Fix implementation detection so it doesn't crash on `String(symbol)`
+* throw on `new Symbol()` (as decided by TC39)
+
+v0.0.0 -- 2013.11.15
+* Initial (dev) version
\ No newline at end of file
diff --git a/source/node_modules/es6-symbol/LICENSE b/source/node_modules/es6-symbol/LICENSE
new file mode 100644
index 000000000..04724a3ab
--- /dev/null
+++ b/source/node_modules/es6-symbol/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/es6-symbol/README.md b/source/node_modules/es6-symbol/README.md
new file mode 100644
index 000000000..0fa897845
--- /dev/null
+++ b/source/node_modules/es6-symbol/README.md
@@ -0,0 +1,71 @@
+# es6-symbol
+## ECMAScript 6 Symbol polyfill
+
+For more information about symbols see following links
+- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)
+- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
+- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)
+
+### Limitations
+
+Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.
+
+### Usage
+
+It’s safest to use *es6-symbol* as a [ponyfill](http://kikobeats.com/polyfill-ponyfill-and-prollyfill/) – a polyfill which doesn’t touch global objects:
+
+```javascript
+var Symbol = require('es6-symbol');
+```
+
+If you want to make sure your environment implements `Symbol` globally, do:
+
+```javascript
+require('es6-symbol/implement');
+```
+
+If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
+
+```javascript
+var Symbol = require('es6-symbol/polyfill');
+```
+
+#### API
+
+Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
+
+```javascript
+var Symbol = require('es6-symbol');
+
+var symbol = Symbol('My custom symbol');
+var x = {};
+
+x[symbol] = 'foo';
+console.log(x[symbol]); 'foo'
+
+// Detect iterable:
+var iterator, result;
+if (possiblyIterable[Symbol.iterator]) {
+ iterator = possiblyIterable[Symbol.iterator]();
+ result = iterator.next();
+ while(!result.done) {
+ console.log(result.value);
+ result = iterator.next();
+ }
+}
+```
+
+### Installation
+#### NPM
+
+In your project path:
+
+ $ npm install es6-symbol
+
+##### Browser
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+## Tests [](https://travis-ci.org/medikoo/es6-symbol)
+
+ $ npm test
diff --git a/source/node_modules/es6-symbol/implement.js b/source/node_modules/es6-symbol/implement.js
new file mode 100644
index 000000000..153edacdb
--- /dev/null
+++ b/source/node_modules/es6-symbol/implement.js
@@ -0,0 +1,7 @@
+'use strict';
+
+if (!require('./is-implemented')()) {
+ Object.defineProperty(require('es5-ext/global'), 'Symbol',
+ { value: require('./polyfill'), configurable: true, enumerable: false,
+ writable: true });
+}
diff --git a/source/node_modules/es6-symbol/index.js b/source/node_modules/es6-symbol/index.js
new file mode 100644
index 000000000..609f1faf5
--- /dev/null
+++ b/source/node_modules/es6-symbol/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ? Symbol : require('./polyfill');
diff --git a/source/node_modules/es6-symbol/is-implemented.js b/source/node_modules/es6-symbol/is-implemented.js
new file mode 100644
index 000000000..53759f321
--- /dev/null
+++ b/source/node_modules/es6-symbol/is-implemented.js
@@ -0,0 +1,18 @@
+'use strict';
+
+module.exports = function () {
+ var symbol;
+ if (typeof Symbol !== 'function') return false;
+ symbol = Symbol('test symbol');
+ try { String(symbol); } catch (e) { return false; }
+ if (typeof Symbol.iterator === 'symbol') return true;
+
+ // Return 'true' for polyfills
+ if (typeof Symbol.isConcatSpreadable !== 'object') return false;
+ if (typeof Symbol.iterator !== 'object') return false;
+ if (typeof Symbol.toPrimitive !== 'object') return false;
+ if (typeof Symbol.toStringTag !== 'object') return false;
+ if (typeof Symbol.unscopables !== 'object') return false;
+
+ return true;
+};
diff --git a/source/node_modules/es6-symbol/is-native-implemented.js b/source/node_modules/es6-symbol/is-native-implemented.js
new file mode 100644
index 000000000..a8cb8b868
--- /dev/null
+++ b/source/node_modules/es6-symbol/is-native-implemented.js
@@ -0,0 +1,8 @@
+// Exports true if environment provides native `Symbol` implementation
+
+'use strict';
+
+module.exports = (function () {
+ if (typeof Symbol !== 'function') return false;
+ return (typeof Symbol.iterator === 'symbol');
+}());
diff --git a/source/node_modules/es6-symbol/is-symbol.js b/source/node_modules/es6-symbol/is-symbol.js
new file mode 100644
index 000000000..beeba2cb4
--- /dev/null
+++ b/source/node_modules/es6-symbol/is-symbol.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function (x) {
+ return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false;
+};
diff --git a/source/node_modules/es6-symbol/package.json b/source/node_modules/es6-symbol/package.json
new file mode 100644
index 000000000..31484db1b
--- /dev/null
+++ b/source/node_modules/es6-symbol/package.json
@@ -0,0 +1,93 @@
+{
+ "_args": [
+ [
+ "es6-symbol@^3.0.2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/array-index"
+ ]
+ ],
+ "_from": "es6-symbol@>=3.0.2 <4.0.0",
+ "_id": "es6-symbol@3.0.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/es6-symbol",
+ "_nodeVersion": "5.2.0",
+ "_npmUser": {
+ "email": "medikoo+npm@medikoo.com",
+ "name": "medikoo"
+ },
+ "_npmVersion": "3.3.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "es6-symbol",
+ "raw": "es6-symbol@^3.0.2",
+ "rawSpec": "^3.0.2",
+ "scope": null,
+ "spec": ">=3.0.2 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/array-index",
+ "/es5-ext",
+ "/es6-iterator"
+ ],
+ "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz",
+ "_shasum": "1e928878c6f5e63541625b4bb4df4af07d154219",
+ "_shrinkwrap": null,
+ "_spec": "es6-symbol@^3.0.2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/array-index",
+ "author": {
+ "email": "medyk@medikoo.com",
+ "name": "Mariusz Nowak",
+ "url": "http://www.medikoo.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/medikoo/es6-symbol/issues"
+ },
+ "dependencies": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.10"
+ },
+ "description": "ECMAScript 6 Symbol polyfill",
+ "devDependencies": {
+ "tad": "~0.2.4",
+ "xlint": "~0.2.2",
+ "xlint-jslint-medikoo": "~0.1.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "1e928878c6f5e63541625b4bb4df4af07d154219",
+ "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz"
+ },
+ "gitHead": "b7da6b926c44e3745de69b17c98c00a5c84b4ebe",
+ "homepage": "https://github.com/medikoo/es6-symbol#readme",
+ "keywords": [
+ "ecmascript",
+ "es6",
+ "harmony",
+ "polyfill",
+ "ponyfill",
+ "private",
+ "property",
+ "symbol"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "medikoo",
+ "email": "medikoo+npm@medikoo.com"
+ }
+ ],
+ "name": "es6-symbol",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/medikoo/es6-symbol.git"
+ },
+ "scripts": {
+ "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+ "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+ "test": "node ./node_modules/tad/bin/tad"
+ },
+ "version": "3.0.2"
+}
diff --git a/source/node_modules/es6-symbol/polyfill.js b/source/node_modules/es6-symbol/polyfill.js
new file mode 100644
index 000000000..7c3c8fe90
--- /dev/null
+++ b/source/node_modules/es6-symbol/polyfill.js
@@ -0,0 +1,107 @@
+// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
+
+'use strict';
+
+var d = require('d')
+ , validateSymbol = require('./validate-symbol')
+
+ , create = Object.create, defineProperties = Object.defineProperties
+ , defineProperty = Object.defineProperty, objPrototype = Object.prototype
+ , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null);
+
+if (typeof Symbol === 'function') NativeSymbol = Symbol;
+
+var generateName = (function () {
+ var created = create(null);
+ return function (desc) {
+ var postfix = 0, name, ie11BugWorkaround;
+ while (created[desc + (postfix || '')]) ++postfix;
+ desc += (postfix || '');
+ created[desc] = true;
+ name = '@@' + desc;
+ defineProperty(objPrototype, name, d.gs(null, function (value) {
+ // For IE11 issue see:
+ // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
+ // ie11-broken-getters-on-dom-objects
+ // https://github.com/medikoo/es6-symbol/issues/12
+ if (ie11BugWorkaround) return;
+ ie11BugWorkaround = true;
+ defineProperty(this, name, d(value));
+ ie11BugWorkaround = false;
+ }));
+ return name;
+ };
+}());
+
+// Internal constructor (not one exposed) for creating Symbol instances.
+// This one is used to ensure that `someSymbol instanceof Symbol` always return false
+HiddenSymbol = function Symbol(description) {
+ if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
+ return SymbolPolyfill(description);
+};
+
+// Exposed `Symbol` constructor
+// (returns instances of HiddenSymbol)
+module.exports = SymbolPolyfill = function Symbol(description) {
+ var symbol;
+ if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
+ symbol = create(HiddenSymbol.prototype);
+ description = (description === undefined ? '' : String(description));
+ return defineProperties(symbol, {
+ __description__: d('', description),
+ __name__: d('', generateName(description))
+ });
+};
+defineProperties(SymbolPolyfill, {
+ for: d(function (key) {
+ if (globalSymbols[key]) return globalSymbols[key];
+ return (globalSymbols[key] = SymbolPolyfill(String(key)));
+ }),
+ keyFor: d(function (s) {
+ var key;
+ validateSymbol(s);
+ for (key in globalSymbols) if (globalSymbols[key] === s) return key;
+ }),
+
+ // If there's native implementation of given symbol, let's fallback to it
+ // to ensure proper interoperability with other native functions e.g. Array.from
+ hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
+ isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
+ SymbolPolyfill('isConcatSpreadable')),
+ iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
+ match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
+ replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
+ search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
+ species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
+ split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
+ toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
+ toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
+ unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))
+});
+
+// Internal tweaks for real symbol producer
+defineProperties(HiddenSymbol.prototype, {
+ constructor: d(SymbolPolyfill),
+ toString: d('', function () { return this.__name__; })
+});
+
+// Proper implementation of methods exposed on Symbol.prototype
+// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
+defineProperties(SymbolPolyfill.prototype, {
+ toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
+ valueOf: d(function () { return validateSymbol(this); })
+});
+defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('',
+ function () { return validateSymbol(this); }));
+defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
+
+// Proper implementaton of toPrimitive and toStringTag for returned symbol instances
+defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
+ d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
+
+// Note: It's important to define `toPrimitive` as last one, as some implementations
+// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
+// And that may invoke error in definition flow:
+// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
+defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
+ d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
diff --git a/source/node_modules/es6-symbol/test/implement.js b/source/node_modules/es6-symbol/test/implement.js
new file mode 100644
index 000000000..eb35c3018
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/implement.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof Symbol, 'function'); };
diff --git a/source/node_modules/es6-symbol/test/index.js b/source/node_modules/es6-symbol/test/index.js
new file mode 100644
index 000000000..62b3296df
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/index.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var d = require('d')
+
+ , defineProperty = Object.defineProperty;
+
+module.exports = function (T, a) {
+ var symbol = T('test'), x = {};
+ defineProperty(x, symbol, d('foo'));
+ a(x.test, undefined, "Name");
+ a(x[symbol], 'foo', "Get");
+};
diff --git a/source/node_modules/es6-symbol/test/is-implemented.js b/source/node_modules/es6-symbol/test/is-implemented.js
new file mode 100644
index 000000000..bb0d64536
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/is-implemented.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var global = require('es5-ext/global')
+ , polyfill = require('../polyfill');
+
+module.exports = function (t, a) {
+ var cache;
+ a(typeof t(), 'boolean');
+ cache = global.Symbol;
+ global.Symbol = polyfill;
+ a(t(), true);
+ if (cache === undefined) delete global.Symbol;
+ else global.Symbol = cache;
+};
diff --git a/source/node_modules/es6-symbol/test/is-native-implemented.js b/source/node_modules/es6-symbol/test/is-native-implemented.js
new file mode 100644
index 000000000..df8ba0323
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/is-native-implemented.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/source/node_modules/es6-symbol/test/is-symbol.js b/source/node_modules/es6-symbol/test/is-symbol.js
new file mode 100644
index 000000000..ac24b9abb
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/is-symbol.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var SymbolPoly = require('../polyfill');
+
+module.exports = function (t, a) {
+ a(t(undefined), false, "Undefined");
+ a(t(null), false, "Null");
+ a(t(true), false, "Primitive");
+ a(t('raz'), false, "String");
+ a(t({}), false, "Object");
+ a(t([]), false, "Array");
+ if (typeof Symbol !== 'undefined') {
+ a(t(Symbol()), true, "Native");
+ }
+ a(t(SymbolPoly()), true, "Polyfill");
+};
diff --git a/source/node_modules/es6-symbol/test/polyfill.js b/source/node_modules/es6-symbol/test/polyfill.js
new file mode 100644
index 000000000..83fb5e925
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/polyfill.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var d = require('d')
+ , isSymbol = require('../is-symbol')
+
+ , defineProperty = Object.defineProperty;
+
+module.exports = function (T, a) {
+ var symbol = T('test'), x = {};
+ defineProperty(x, symbol, d('foo'));
+ a(x.test, undefined, "Name");
+ a(x[symbol], 'foo', "Get");
+ a(x instanceof T, false);
+
+ a(isSymbol(symbol), true, "Symbol");
+ a(isSymbol(T.iterator), true, "iterator");
+ a(isSymbol(T.toStringTag), true, "toStringTag");
+
+ x = {};
+ x[symbol] = 'foo';
+ a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
+ value: 'foo', writable: true });
+ symbol = T.for('marko');
+ a(isSymbol(symbol), true);
+ a(T.for('marko'), symbol);
+ a(T.keyFor(symbol), 'marko');
+};
diff --git a/source/node_modules/es6-symbol/test/validate-symbol.js b/source/node_modules/es6-symbol/test/validate-symbol.js
new file mode 100644
index 000000000..2c8f84c82
--- /dev/null
+++ b/source/node_modules/es6-symbol/test/validate-symbol.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var SymbolPoly = require('../polyfill');
+
+module.exports = function (t, a) {
+ var symbol;
+ a.throws(function () { t(undefined); }, TypeError, "Undefined");
+ a.throws(function () { t(null); }, TypeError, "Null");
+ a.throws(function () { t(true); }, TypeError, "Primitive");
+ a.throws(function () { t('raz'); }, TypeError, "String");
+ a.throws(function () { t({}); }, TypeError, "Object");
+ a.throws(function () { t([]); }, TypeError, "Array");
+ if (typeof Symbol !== 'undefined') {
+ symbol = Symbol();
+ a(t(symbol), symbol, "Native");
+ }
+ symbol = SymbolPoly();
+ a(t(symbol), symbol, "Polyfill");
+};
diff --git a/source/node_modules/es6-symbol/validate-symbol.js b/source/node_modules/es6-symbol/validate-symbol.js
new file mode 100644
index 000000000..42750043d
--- /dev/null
+++ b/source/node_modules/es6-symbol/validate-symbol.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var isSymbol = require('./is-symbol');
+
+module.exports = function (value) {
+ if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
+ return value;
+};
diff --git a/source/node_modules/escape-string-regexp/index.js b/source/node_modules/escape-string-regexp/index.js
new file mode 100644
index 000000000..7834bf9b2
--- /dev/null
+++ b/source/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/source/node_modules/escape-string-regexp/license b/source/node_modules/escape-string-regexp/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/source/node_modules/escape-string-regexp/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/escape-string-regexp/package.json b/source/node_modules/escape-string-regexp/package.json
new file mode 100644
index 000000000..f515f9014
--- /dev/null
+++ b/source/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,98 @@
+{
+ "_args": [
+ [
+ "escape-string-regexp@^1.0.2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/chalk"
+ ]
+ ],
+ "_from": "escape-string-regexp@>=1.0.2 <2.0.0",
+ "_id": "escape-string-regexp@1.0.4",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/escape-string-regexp",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "escape-string-regexp",
+ "raw": "escape-string-regexp@^1.0.2",
+ "rawSpec": "^1.0.2",
+ "scope": null,
+ "spec": ">=1.0.2 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/chalk",
+ "/decamelize"
+ ],
+ "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz",
+ "_shasum": "b85e679b46f72d03fbbe8a3bf7259d535c21b62f",
+ "_shrinkwrap": null,
+ "_spec": "escape-string-regexp@^1.0.2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/chalk",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
+ },
+ "dependencies": {},
+ "description": "Escape RegExp special characters",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b85e679b46f72d03fbbe8a3bf7259d535c21b62f",
+ "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "e9ca6832a9506ca26402cb0e6dc95efcf35b0b97",
+ "homepage": "https://github.com/sindresorhus/escape-string-regexp",
+ "keywords": [
+ "characters",
+ "escape",
+ "expression",
+ "re",
+ "regex",
+ "regexp",
+ "regular",
+ "special",
+ "str",
+ "string"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "name": "escape-string-regexp",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.4"
+}
diff --git a/source/node_modules/escape-string-regexp/readme.md b/source/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 000000000..87ac82d5e
--- /dev/null
+++ b/source/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+const escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/extend/.eslintrc b/source/node_modules/extend/.eslintrc
new file mode 100644
index 000000000..d49f17353
--- /dev/null
+++ b/source/node_modules/extend/.eslintrc
@@ -0,0 +1,192 @@
+{
+ "env": {
+ "browser": false,
+ "node": true,
+ "amd": false,
+ "mocha": false,
+ "jasmine": false
+ },
+
+ "rules": {
+ "accessor-pairs": [2, { getWithoutSet: false, setWithoutGet: true }],
+ "array-bracket-spacing": [2, "never", {
+ "singleValue": false,
+ "objectsInArrays": false,
+ "arraysInArrays": false
+ }],
+ "block-scoped-var": [0],
+ "brace-style": [2, "1tbs", { "allowSingleLine": true }],
+ "camelcase": [2],
+ "comma-dangle": [2, "never"],
+ "comma-spacing": [2],
+ "comma-style": [2, "last"],
+ "complexity": [2, 15],
+ "computed-property-spacing": [2, "never"],
+ "consistent-return": [2],
+ "consistent-this": [0, "that"],
+ "constructor-super": [2],
+ "curly": [2, "all"],
+ "default-case": [2],
+ "dot-notation": [2, { "allowKeywords": true }],
+ "eol-last": [2],
+ "eqeqeq": [2],
+ "func-names": [0],
+ "func-style": [2, "expression"],
+ "generator-star-spacing": [2, { "before": false, "after": true }],
+ "global-strict": [0, "never"],
+ "guard-for-in": [0],
+ "handle-callback-err": [0],
+ "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
+ "linebreak-style": [2, "unix"],
+ "lines-around-comment": [2, {
+ "beforeBlockComment": false,
+ "afterBlockComment": false,
+ "beforeLineComment": false,
+ "beforeLineComment": false,
+ "allowBlockStart": true,
+ "allowBlockEnd": true
+ }],
+ "quotes": [2, "single", "avoid-escape"],
+ "max-depth": [1, 4],
+ "max-len": [0, 80, 4],
+ "max-nested-callbacks": [2, 2],
+ "max-params": [2, 2],
+ "max-statements": [2, 21],
+ "new-parens": [2],
+ "new-cap": [2],
+ "newline-after-var": [0],
+ "no-alert": [2],
+ "no-array-constructor": [2],
+ "no-bitwise": [0],
+ "no-caller": [2],
+ "no-catch-shadow": [2],
+ "no-cond-assign": [2],
+ "no-console": [2],
+ "no-constant-condition": [2],
+ "no-continue": [2],
+ "no-control-regex": [2],
+ "no-debugger": [2],
+ "no-delete-var": [2],
+ "no-div-regex": [0],
+ "no-dupe-args": [2],
+ "no-dupe-keys": [2],
+ "no-duplicate-case": [2],
+ "no-else-return": [0],
+ "no-empty": [2],
+ "no-empty-character-class": [2],
+ "no-empty-label": [2],
+ "no-eq-null": [0],
+ "no-eval": [2],
+ "no-ex-assign": [2],
+ "no-extend-native": [2],
+ "no-extra-bind": [2],
+ "no-extra-boolean-cast": [2],
+ "no-extra-parens": [0],
+ "no-extra-semi": [2],
+ "no-fallthrough": [2],
+ "no-floating-decimal": [2],
+ "no-func-assign": [2],
+ "no-implied-eval": [2],
+ "no-inline-comments": [0],
+ "no-inner-declarations": [2, "functions"],
+ "no-invalid-regexp": [2],
+ "no-irregular-whitespace": [2],
+ "no-iterator": [2],
+ "no-label-var": [2],
+ "no-labels": [2],
+ "no-lone-blocks": [2],
+ "no-lonely-if": [2],
+ "no-loop-func": [2],
+ "no-mixed-requires": [0, false],
+ "no-mixed-spaces-and-tabs": [2, false],
+ "no-multi-spaces": [2],
+ "no-multi-str": [2],
+ "no-multiple-empty-lines": [2, {"max": 1}],
+ "no-native-reassign": [2],
+ "no-negated-in-lhs": [2],
+ "no-nested-ternary": [0],
+ "no-new": [2],
+ "no-new-func": [2],
+ "no-new-object": [2],
+ "no-new-require": [0],
+ "no-new-wrappers": [2],
+ "no-obj-calls": [2],
+ "no-octal": [2],
+ "no-octal-escape": [2],
+ "no-param-reassign": [2],
+ "no-path-concat": [0],
+ "no-plusplus": [0],
+ "no-process-env": [0],
+ "no-process-exit": [2],
+ "no-proto": [2],
+ "no-redeclare": [2],
+ "no-regex-spaces": [2],
+ "no-reserved-keys": [2],
+ "no-restricted-modules": [0],
+ "no-return-assign": [2, "always"],
+ "no-script-url": [2],
+ "no-self-compare": [0],
+ "no-sequences": [2],
+ "no-shadow": [2],
+ "no-shadow-restricted-names": [2],
+ "no-space-before-semi": [2],
+ "no-spaced-func": [2],
+ "no-sparse-arrays": [2],
+ "no-sync": [0],
+ "no-ternary": [0],
+ "no-this-before-super": [2],
+ "no-throw-literal": [2],
+ "no-trailing-spaces": [2, { "skipBlankLines": false }],
+ "no-undef": [2],
+ "no-undef-init": [2],
+ "no-undefined": [0],
+ "no-underscore-dangle": [2],
+ "no-unexpected-multiline": [2],
+ "no-unneeded-ternary": [2],
+ "no-unreachable": [2],
+ "no-unused-expressions": [2],
+ "no-unused-vars": [2, { "vars": "all", "args": "after-used" }],
+ "no-use-before-define": [2],
+ "no-void": [0],
+ "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
+ "no-with": [2],
+ "no-wrap-func": [2],
+ "object-curly-spacing": [2, "always"],
+ "object-shorthand": [2, "never"],
+ "one-var": [0],
+ "operator-assignment": [0, "always"],
+ "operator-linebreak": [2, "none"],
+ "padded-blocks": [0],
+ "prefer-const": [0],
+ "quote-props": [0],
+ "radix": [0],
+ "semi": [2],
+ "semi-spacing": [2, { "before": false, "after": true }],
+ "sort-vars": [0],
+ "space-after-keywords": [2, "always"],
+ "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
+ "space-before-blocks": [0, "always"],
+ "space-in-brackets": [0, "never", {
+ "singleValue": true,
+ "arraysInArrays": false,
+ "arraysInObjects": false,
+ "objectsInArrays": true,
+ "objectsInObjects": true,
+ "propertyName": false
+ }],
+ "space-in-parens": [2, "never"],
+ "space-infix-ops": [2],
+ "space-return-throw-case": [2],
+ "space-unary-ops": [2, { "words": true, "nonwords": false }],
+ "spaced-comment": [2, "always"],
+ "spaced-line-comment": [0, "always"],
+ "strict": [2, "global"],
+ "use-isnan": [2],
+ "valid-jsdoc": [0],
+ "valid-typeof": [2],
+ "vars-on-top": [0],
+ "wrap-iife": [2],
+ "wrap-regex": [2],
+ "yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }]
+ }
+}
diff --git a/source/node_modules/extend/.jscs.json b/source/node_modules/extend/.jscs.json
new file mode 100644
index 000000000..7e84b282b
--- /dev/null
+++ b/source/node_modules/extend/.jscs.json
@@ -0,0 +1,104 @@
+{
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": "allButReserved",
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": true,
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 6
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true
+}
+
diff --git a/source/node_modules/extend/.npmignore b/source/node_modules/extend/.npmignore
new file mode 100644
index 000000000..30d74d258
--- /dev/null
+++ b/source/node_modules/extend/.npmignore
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/source/node_modules/extend/.travis.yml b/source/node_modules/extend/.travis.yml
new file mode 100644
index 000000000..ebef64499
--- /dev/null
+++ b/source/node_modules/extend/.travis.yml
@@ -0,0 +1,44 @@
+language: node_js
+node_js:
+ - "iojs-v2.3"
+ - "iojs-v2.2"
+ - "iojs-v2.1"
+ - "iojs-v2.0"
+ - "iojs-v1.8"
+ - "iojs-v1.7"
+ - "iojs-v1.6"
+ - "iojs-v1.5"
+ - "iojs-v1.4"
+ - "iojs-v1.3"
+ - "iojs-v1.2"
+ - "iojs-v1.1"
+ - "iojs-v1.0"
+ - "0.12"
+ - "0.11"
+ - "0.10"
+ - "0.9"
+ - "0.8"
+ - "0.6"
+ - "0.4"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm'
+sudo: false
+matrix:
+ fast_finish: true
+ allow_failures:
+ - node_js: "iojs-v2.2"
+ - node_js: "iojs-v2.1"
+ - node_js: "iojs-v2.0"
+ - node_js: "iojs-v1.7"
+ - node_js: "iojs-v1.6"
+ - node_js: "iojs-v1.5"
+ - node_js: "iojs-v1.4"
+ - node_js: "iojs-v1.3"
+ - node_js: "iojs-v1.2"
+ - node_js: "iojs-v1.1"
+ - node_js: "iojs-v1.0"
+ - node_js: "0.11"
+ - node_js: "0.9"
+ - node_js: "0.8"
+ - node_js: "0.6"
+ - node_js: "0.4"
diff --git a/source/node_modules/extend/CHANGELOG.md b/source/node_modules/extend/CHANGELOG.md
new file mode 100644
index 000000000..ee0cfd6ad
--- /dev/null
+++ b/source/node_modules/extend/CHANGELOG.md
@@ -0,0 +1,69 @@
+3.0.0 / 2015-07-01
+==================
+ * [Possible breaking change] Use global "strict" directive (#32)
+ * [Tests] `int` is an ES3 reserved word
+ * [Tests] Test up to `io.js` `v2.3`
+ * [Tests] Add `npm run eslint`
+ * [Dev Deps] Update `covert`, `jscs`
+
+2.0.1 / 2015-04-25
+==================
+ * Use an inline `isArray` check, for ES3 browsers. (#27)
+ * Some old browsers fail when an identifier is `toString`
+ * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
+ * Add license info to package.json (#25)
+ * Update `tape`, `jscs`
+ * Adding a CHANGELOG
+
+2.0.0 / 2014-10-01
+==================
+ * Increase code coverage to 100%; run code coverage as part of tests
+ * Add `npm run lint`; Run linter as part of tests
+ * Remove nodeType and setInterval checks in isPlainObject
+ * Updating `tape`, `jscs`, `covert`
+ * General style and README cleanup
+
+1.3.0 / 2014-06-20
+==================
+ * Add component.json for browser support (#18)
+ * Use SVG for badges in README (#16)
+ * Updating `tape`, `covert`
+ * Updating travis-ci to work with multiple node versions
+ * Fix `deep === false` bug (returning target as {}) (#14)
+ * Fixing constructor checks in isPlainObject
+ * Adding additional test coverage
+ * Adding `npm run coverage`
+ * Add LICENSE (#13)
+ * Adding a warning about `false`, per #11
+ * General style and whitespace cleanup
+
+1.2.1 / 2013-09-14
+==================
+ * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
+ * Updating `tape`
+
+1.2.0 / 2013-09-02
+==================
+ * Updating the README: add badges
+ * Adding a missing variable reference.
+ * Using `tape` instead of `buster` for tests; add more tests (#7)
+ * Adding node 0.10 to Travis CI (#6)
+ * Enabling "npm test" and cleaning up package.json (#5)
+ * Add Travis CI.
+
+1.1.3 / 2012-12-06
+==================
+ * Added unit tests.
+ * Ensure extend function is named. (Looks nicer in a stack trace.)
+ * README cleanup.
+
+1.1.1 / 2012-11-07
+==================
+ * README cleanup.
+ * Added installation instructions.
+ * Added a missing semicolon
+
+1.0.0 / 2012-04-08
+==================
+ * Initial commit
+
diff --git a/source/node_modules/extend/LICENSE b/source/node_modules/extend/LICENSE
new file mode 100644
index 000000000..e16d6a56c
--- /dev/null
+++ b/source/node_modules/extend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Stefan Thomas
+
+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.
+
diff --git a/source/node_modules/extend/README.md b/source/node_modules/extend/README.md
new file mode 100644
index 000000000..632fb0f96
--- /dev/null
+++ b/source/node_modules/extend/README.md
@@ -0,0 +1,62 @@
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+
+# extend() for Node.js [![Version Badge][npm-version-png]][npm-url]
+
+`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
+
+## Installation
+
+This package is available on [npm][npm-url] as: `extend`
+
+``` sh
+npm install extend
+```
+
+## Usage
+
+**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
+
+*Extend one object with one or more others, returning the modified object.*
+
+Keep in mind that the target object will be modified, and will be returned from extend().
+
+If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
+Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
+Warning: passing `false` as the first argument is not supported.
+
+### Arguments
+
+* `deep` *Boolean* (optional)
+If set, the merge becomes recursive (i.e. deep copy).
+* `target` *Object*
+The object to extend.
+* `object1` *Object*
+The object that will be merged into the first.
+* `objectN` *Object* (Optional)
+More objects to merge into the first.
+
+## License
+
+`node-extend` is licensed under the [MIT License][mit-license-url].
+
+## Acknowledgements
+
+All credit to the jQuery authors for perfecting this amazing utility.
+
+Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
+
+[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
+[travis-url]: https://travis-ci.org/justmoon/node-extend
+[npm-url]: https://npmjs.org/package/extend
+[mit-license-url]: http://opensource.org/licenses/MIT
+[github-justmoon]: https://github.com/justmoon
+[github-insin]: https://github.com/insin
+[github-ljharb]: https://github.com/ljharb
+[npm-version-png]: http://vb.teelaun.ch/justmoon/node-extend.svg
+[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
+[deps-url]: https://david-dm.org/justmoon/node-extend
+[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
+[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
+
diff --git a/source/node_modules/extend/component.json b/source/node_modules/extend/component.json
new file mode 100644
index 000000000..1500a2f37
--- /dev/null
+++ b/source/node_modules/extend/component.json
@@ -0,0 +1,32 @@
+{
+ "name": "extend",
+ "author": "Stefan Thomas (http://www.justmoon.net)",
+ "version": "3.0.0",
+ "description": "Port of jQuery.extend for node.js and the browser.",
+ "scripts": [
+ "index.js"
+ ],
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "repository" : {
+ "type": "git",
+ "url": "https://github.com/justmoon/node-extend.git"
+ },
+ "dependencies": {
+ },
+ "devDependencies": {
+ "tape" : "~3.0.0",
+ "covert": "~0.4.0",
+ "jscs": "~1.6.2"
+ }
+}
+
diff --git a/source/node_modules/extend/index.js b/source/node_modules/extend/index.js
new file mode 100644
index 000000000..f5ec75d52
--- /dev/null
+++ b/source/node_modules/extend/index.js
@@ -0,0 +1,86 @@
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isArray = function isArray(arr) {
+ if (typeof Array.isArray === 'function') {
+ return Array.isArray(arr);
+ }
+
+ return toStr.call(arr) === '[object Array]';
+};
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) {/**/}
+
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+module.exports = function extend() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0],
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean') {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ } else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {
+ target = {};
+ }
+
+ for (; i < length; ++i) {
+ options = arguments[i];
+ // Only deal with non-null/undefined values
+ if (options != null) {
+ // Extend the base object
+ for (name in options) {
+ src = target[name];
+ copy = options[name];
+
+ // Prevent never-ending loop
+ if (target !== copy) {
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
+ if (copyIsArray) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+ } else {
+ clone = src && isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[name] = extend(deep, clone, copy);
+
+ // Don't bring in undefined values
+ } else if (typeof copy !== 'undefined') {
+ target[name] = copy;
+ }
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
diff --git a/source/node_modules/extend/package.json b/source/node_modules/extend/package.json
new file mode 100644
index 000000000..945219c31
--- /dev/null
+++ b/source/node_modules/extend/package.json
@@ -0,0 +1,98 @@
+{
+ "_args": [
+ [
+ "extend@~3.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request"
+ ]
+ ],
+ "_from": "extend@>=3.0.0 <3.1.0",
+ "_id": "extend@3.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/extend",
+ "_nodeVersion": "2.3.1",
+ "_npmUser": {
+ "email": "ljharb@gmail.com",
+ "name": "ljharb"
+ },
+ "_npmVersion": "2.11.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "extend",
+ "raw": "extend@~3.0.0",
+ "rawSpec": "~3.0.0",
+ "scope": null,
+ "spec": ">=3.0.0 <3.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
+ "_shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4",
+ "_shrinkwrap": null,
+ "_spec": "extend@~3.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request",
+ "author": {
+ "email": "justmoon@members.fsf.org",
+ "name": "Stefan Thomas",
+ "url": "http://www.justmoon.net"
+ },
+ "bugs": {
+ "url": "https://github.com/justmoon/node-extend/issues"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "dependencies": {},
+ "description": "Port of jQuery.extend for node.js and the browser",
+ "devDependencies": {
+ "covert": "^1.1.0",
+ "eslint": "^0.24.0",
+ "jscs": "^1.13.1",
+ "tape": "^4.0.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4",
+ "tarball": "http://registry.npmjs.org/extend/-/extend-3.0.0.tgz"
+ },
+ "gitHead": "148e7270cab2e9413af2cd0cab147070d755ed6d",
+ "homepage": "https://github.com/justmoon/node-extend#readme",
+ "keywords": [
+ "clone",
+ "extend",
+ "merge"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "maintainers": [
+ {
+ "name": "justmoon",
+ "email": "justmoon@members.fsf.org"
+ },
+ {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ }
+ ],
+ "name": "extend",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/justmoon/node-extend.git"
+ },
+ "scripts": {
+ "coverage": "covert test/index.js",
+ "coverage-quiet": "covert test/index.js --quiet",
+ "eslint": "eslint *.js */*.js",
+ "jscs": "jscs *.js */*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "test": "npm run lint && node test/index.js && npm run coverage-quiet"
+ },
+ "version": "3.0.0"
+}
diff --git a/source/node_modules/extsprintf/.gitmodules b/source/node_modules/extsprintf/.gitmodules
new file mode 100644
index 000000000..4e0f5e29d
--- /dev/null
+++ b/source/node_modules/extsprintf/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "deps/jsstyle"]
+ path = deps/jsstyle
+ url = git://github.com/davepacheco/jsstyle
+[submodule "deps/javascriptlint"]
+ path = deps/javascriptlint
+ url = git://github.com/davepacheco/javascriptlint
diff --git a/source/node_modules/extsprintf/LICENSE b/source/node_modules/extsprintf/LICENSE
new file mode 100644
index 000000000..cbc0bb3ba
--- /dev/null
+++ b/source/node_modules/extsprintf/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012, Joyent, Inc. All rights reserved.
+
+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
diff --git a/source/node_modules/extsprintf/Makefile b/source/node_modules/extsprintf/Makefile
new file mode 100644
index 000000000..1deeb5fdf
--- /dev/null
+++ b/source/node_modules/extsprintf/Makefile
@@ -0,0 +1,23 @@
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile: top-level Makefile
+#
+# This Makefile contains only repo-specific logic and uses included makefiles
+# to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are
+# used by other repos as well.
+#
+
+#
+# Files
+#
+JS_FILES := $(shell find lib -name '*.js')
+JSL_FILES_NODE = $(JS_FILES)
+JSSTYLE_FILES = $(JS_FILES)
+JSL_CONF_NODE = jsl.node.conf
+
+# Default target is "check"
+check:
+
+include ./Makefile.deps
+include ./Makefile.targ
diff --git a/source/node_modules/extsprintf/Makefile.deps b/source/node_modules/extsprintf/Makefile.deps
new file mode 100644
index 000000000..2811bde17
--- /dev/null
+++ b/source/node_modules/extsprintf/Makefile.deps
@@ -0,0 +1,39 @@
+# -*- mode: makefile -*-
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile.deps: Makefile for including common tools as dependencies
+#
+# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
+# into other repos as-is without requiring any modifications. If you find
+# yourself changing this file, you should instead update the original copy in
+# eng.git and then update your repo to use the new version.
+#
+# This file is separate from Makefile.targ so that teams can choose
+# independently whether to use the common targets in Makefile.targ and the
+# common tools here.
+#
+
+#
+# javascriptlint
+#
+JSL_EXEC ?= deps/javascriptlint/build/install/jsl
+JSL ?= python2.6 $(JSL_EXEC)
+
+$(JSL_EXEC): | deps/javascriptlint/.git
+ cd deps/javascriptlint && make install
+
+#
+# jsstyle
+#
+JSSTYLE_EXEC ?= deps/jsstyle/jsstyle
+JSSTYLE ?= $(JSSTYLE_EXEC)
+
+$(JSSTYLE_EXEC): | deps/jsstyle/.git
+
+#
+# restdown
+#
+RESTDOWN_EXEC ?= deps/restdown/bin/restdown
+RESTDOWN ?= python2.6 $(RESTDOWN_EXEC)
+$(RESTDOWN_EXEC): | deps/restdown/.git
diff --git a/source/node_modules/extsprintf/Makefile.targ b/source/node_modules/extsprintf/Makefile.targ
new file mode 100644
index 000000000..2a64fe7e9
--- /dev/null
+++ b/source/node_modules/extsprintf/Makefile.targ
@@ -0,0 +1,285 @@
+# -*- mode: makefile -*-
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile.targ: common targets.
+#
+# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
+# into other repos as-is without requiring any modifications. If you find
+# yourself changing this file, you should instead update the original copy in
+# eng.git and then update your repo to use the new version.
+#
+# This Makefile defines several useful targets and rules. You can use it by
+# including it from a Makefile that specifies some of the variables below.
+#
+# Targets defined in this Makefile:
+#
+# check Checks JavaScript files for lint and style
+# Checks bash scripts for syntax
+# Checks SMF manifests for validity against the SMF DTD
+#
+# clean Removes built files
+#
+# docs Builds restdown documentation in docs/
+#
+# prepush Depends on "check" and "test"
+#
+# test Does nothing (you should override this)
+#
+# xref Generates cscope (source cross-reference index)
+#
+# For details on what these targets are supposed to do, see the Joyent
+# Engineering Guide.
+#
+# To make use of these targets, you'll need to set some of these variables. Any
+# variables left unset will simply not be used.
+#
+# BASH_FILES Bash scripts to check for syntax
+# (paths relative to top-level Makefile)
+#
+# CLEAN_FILES Files to remove as part of the "clean" target. Note
+# that files generated by targets in this Makefile are
+# automatically included in CLEAN_FILES. These include
+# restdown-generated HTML and JSON files.
+#
+# DOC_FILES Restdown (documentation source) files. These are
+# assumed to be contained in "docs/", and must NOT
+# contain the "docs/" prefix.
+#
+# JSL_CONF_NODE Specify JavaScriptLint configuration files
+# JSL_CONF_WEB (paths relative to top-level Makefile)
+#
+# Node.js and Web configuration files are separate
+# because you'll usually want different global variable
+# configurations. If no file is specified, none is given
+# to jsl, which causes it to use a default configuration,
+# which probably isn't what you want.
+#
+# JSL_FILES_NODE JavaScript files to check with Node config file.
+# JSL_FILES_WEB JavaScript files to check with Web config file.
+#
+# You can also override these variables:
+#
+# BASH Path to bash (default: bash)
+#
+# CSCOPE_DIRS Directories to search for source files for the cscope
+# index. (default: ".")
+#
+# JSL Path to JavaScriptLint (default: "jsl")
+#
+# JSL_FLAGS_NODE Additional flags to pass through to JSL
+# JSL_FLAGS_WEB
+# JSL_FLAGS
+#
+# JSSTYLE Path to jsstyle (default: jsstyle)
+#
+# JSSTYLE_FLAGS Additional flags to pass through to jsstyle
+#
+
+#
+# Defaults for the various tools we use.
+#
+BASH ?= bash
+BASHSTYLE ?= tools/bashstyle
+CP ?= cp
+CSCOPE ?= cscope
+CSCOPE_DIRS ?= .
+JSL ?= jsl
+JSSTYLE ?= jsstyle
+MKDIR ?= mkdir -p
+MV ?= mv
+RESTDOWN_FLAGS ?=
+RMTREE ?= rm -rf
+JSL_FLAGS ?= --nologo --nosummary
+
+ifeq ($(shell uname -s),SunOS)
+ TAR ?= gtar
+else
+ TAR ?= tar
+endif
+
+
+#
+# Defaults for other fixed values.
+#
+BUILD = build
+DISTCLEAN_FILES += $(BUILD)
+DOC_BUILD = $(BUILD)/docs/public
+
+#
+# Configure JSL_FLAGS_{NODE,WEB} based on JSL_CONF_{NODE,WEB}.
+#
+ifneq ($(origin JSL_CONF_NODE), undefined)
+ JSL_FLAGS_NODE += --conf=$(JSL_CONF_NODE)
+endif
+
+ifneq ($(origin JSL_CONF_WEB), undefined)
+ JSL_FLAGS_WEB += --conf=$(JSL_CONF_WEB)
+endif
+
+#
+# Targets. For descriptions on what these are supposed to do, see the
+# Joyent Engineering Guide.
+#
+
+#
+# Instruct make to keep around temporary files. We have rules below that
+# automatically update git submodules as needed, but they employ a deps/*/.git
+# temporary file. Without this directive, make tries to remove these .git
+# directories after the build has completed.
+#
+.SECONDARY: $($(wildcard deps/*):%=%/.git)
+
+#
+# This rule enables other rules that use files from a git submodule to have
+# those files depend on deps/module/.git and have "make" automatically check
+# out the submodule as needed.
+#
+deps/%/.git:
+ git submodule update --init deps/$*
+
+#
+# These recipes make heavy use of dynamically-created phony targets. The parent
+# Makefile defines a list of input files like BASH_FILES. We then say that each
+# of these files depends on a fake target called filename.bashchk, and then we
+# define a pattern rule for those targets that runs bash in check-syntax-only
+# mode. This mechanism has the nice properties that if you specify zero files,
+# the rule becomes a noop (unlike a single rule to check all bash files, which
+# would invoke bash with zero files), and you can check individual files from
+# the command line with "make filename.bashchk".
+#
+.PHONY: check-bash
+check-bash: $(BASH_FILES:%=%.bashchk) $(BASH_FILES:%=%.bashstyle)
+
+%.bashchk: %
+ $(BASH) -n $^
+
+%.bashstyle: %
+ $(BASHSTYLE) $^
+
+.PHONY: check-jsl check-jsl-node check-jsl-web
+check-jsl: check-jsl-node check-jsl-web
+
+check-jsl-node: $(JSL_FILES_NODE:%=%.jslnodechk)
+
+check-jsl-web: $(JSL_FILES_WEB:%=%.jslwebchk)
+
+%.jslnodechk: % $(JSL_EXEC)
+ $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_NODE) $<
+
+%.jslwebchk: % $(JSL_EXEC)
+ $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_WEB) $<
+
+.PHONY: check-jsstyle
+check-jsstyle: $(JSSTYLE_FILES:%=%.jsstylechk)
+
+%.jsstylechk: % $(JSSTYLE_EXEC)
+ $(JSSTYLE) $(JSSTYLE_FLAGS) $<
+
+.PHONY: check
+check: check-jsl check-jsstyle check-bash
+ @echo check ok
+
+.PHONY: clean
+clean::
+ -$(RMTREE) $(CLEAN_FILES)
+
+.PHONY: distclean
+distclean:: clean
+ -$(RMTREE) $(DISTCLEAN_FILES)
+
+CSCOPE_FILES = cscope.in.out cscope.out cscope.po.out
+CLEAN_FILES += $(CSCOPE_FILES)
+
+.PHONY: xref
+xref: cscope.files
+ $(CSCOPE) -bqR
+
+.PHONY: cscope.files
+cscope.files:
+ find $(CSCOPE_DIRS) -name '*.c' -o -name '*.h' -o -name '*.cc' \
+ -o -name '*.js' -o -name '*.s' -o -name '*.cpp' > $@
+
+#
+# The "docs" target is complicated because we do several things here:
+#
+# (1) Use restdown to build HTML and JSON files from each of DOC_FILES.
+#
+# (2) Copy these files into $(DOC_BUILD) (build/docs/public), which
+# functions as a complete copy of the documentation that could be
+# mirrored or served over HTTP.
+#
+# (3) Then copy any directories and media from docs/media into
+# $(DOC_BUILD)/media. This allows projects to include their own media,
+# including files that will override same-named files provided by
+# restdown.
+#
+# Step (3) is the surprisingly complex part: in order to do this, we need to
+# identify the subdirectories in docs/media, recreate them in
+# $(DOC_BUILD)/media, then do the same with the files.
+#
+DOC_MEDIA_DIRS := $(shell find docs/media -type d 2>/dev/null | grep -v "^docs/media$$")
+DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%)
+DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%)
+
+DOC_MEDIA_FILES := $(shell find docs/media -type f 2>/dev/null)
+DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%)
+DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%)
+
+#
+# Like the other targets, "docs" just depends on the final files we want to
+# create in $(DOC_BUILD), leveraging other targets and recipes to define how
+# to get there.
+#
+.PHONY: docs
+docs: \
+ $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.html) \
+ $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.json) \
+ $(DOC_MEDIA_FILES_BUILD)
+
+#
+# We keep the intermediate files so that the next build can see whether the
+# files in DOC_BUILD are up to date.
+#
+.PRECIOUS: \
+ $(DOC_FILES:%.restdown=docs/%.html) \
+ $(DOC_FILES:%.restdown=docs/%json)
+
+#
+# We do clean those intermediate files, as well as all of DOC_BUILD.
+#
+CLEAN_FILES += \
+ $(DOC_BUILD) \
+ $(DOC_FILES:%.restdown=docs/%.html) \
+ $(DOC_FILES:%.restdown=docs/%.json)
+
+#
+# Before installing the files, we must make sure the directories exist. The |
+# syntax tells make that the dependency need only exist, not be up to date.
+# Otherwise, it might try to rebuild spuriously because the directory itself
+# appears out of date.
+#
+$(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD)
+
+$(DOC_BUILD)/%: docs/% | $(DOC_BUILD)
+ $(CP) $< $@
+
+docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD) $(RESTDOWN_EXEC)
+ $(RESTDOWN) $(RESTDOWN_FLAGS) -m $(DOC_BUILD) $<
+
+$(DOC_BUILD):
+ $(MKDIR) $@
+
+$(DOC_MEDIA_DIRS_BUILD):
+ $(MKDIR) $@
+
+#
+# The default "test" target does nothing. This should usually be overridden by
+# the parent Makefile. It's included here so we can define "prepush" without
+# requiring the repo to define "test".
+#
+.PHONY: test
+test:
+
+.PHONY: prepush
+prepush: check test
diff --git a/source/node_modules/extsprintf/README.md b/source/node_modules/extsprintf/README.md
new file mode 100644
index 000000000..702e4e221
--- /dev/null
+++ b/source/node_modules/extsprintf/README.md
@@ -0,0 +1,39 @@
+# extsprintf: extended POSIX-style sprintf
+
+Stripped down version of s[n]printf(3c). We make a best effort to throw an
+exception when given a format string we don't understand, rather than ignoring
+it, so that we won't break existing programs if/when we go implement the rest
+of this.
+
+This implementation currently supports specifying
+
+* field alignment ('-' flag),
+* zero-pad ('0' flag)
+* always show numeric sign ('+' flag),
+* field width
+* conversions for strings, decimal integers, and floats (numbers).
+* argument size specifiers. These are all accepted but ignored, since
+ Javascript has no notion of the physical size of an argument.
+
+Everything else is currently unsupported, most notably: precision, unsigned
+numbers, non-decimal numbers, and characters.
+
+Besides the usual POSIX conversions, this implementation supports:
+
+* `%j`: pretty-print a JSON object (using node's "inspect")
+* `%r`: pretty-print an Error object
+
+# Example
+
+First, install it:
+
+ # npm install extsprintf
+
+Now, use it:
+
+ var mod_extsprintf = require('extsprintf');
+ console.log(mod_extsprintf.sprintf('hello %25s', 'world'));
+
+outputs:
+
+ hello world
diff --git a/source/node_modules/extsprintf/examples/simple.js b/source/node_modules/extsprintf/examples/simple.js
new file mode 100644
index 000000000..9f342f5b1
--- /dev/null
+++ b/source/node_modules/extsprintf/examples/simple.js
@@ -0,0 +1,2 @@
+var mod_extsprintf = require('extsprintf');
+console.log(mod_extsprintf.sprintf('hello %25s', 'world'));
diff --git a/source/node_modules/extsprintf/jsl.node.conf b/source/node_modules/extsprintf/jsl.node.conf
new file mode 100644
index 000000000..03f787ffb
--- /dev/null
+++ b/source/node_modules/extsprintf/jsl.node.conf
@@ -0,0 +1,137 @@
+#
+# Configuration File for JavaScript Lint
+#
+# This configuration file can be used to lint a collection of scripts, or to enable
+# or disable warnings for scripts that are linted via the command line.
+#
+
+### Warnings
+# Enable or disable warnings based on requirements.
+# Use "+WarningName" to display or "-WarningName" to suppress.
+#
++ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent
++ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
++ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
++anon_no_return_value # anonymous function does not always return value
++assign_to_function_call # assignment to a function call
+-block_without_braces # block statement without curly braces
++comma_separated_stmts # multiple statements separated by commas (use semicolons?)
++comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
++default_not_at_end # the default case is not at the end of the switch statement
++dup_option_explicit # duplicate "option explicit" control comment
++duplicate_case_in_switch # duplicate case in switch statement
++duplicate_formal # duplicate formal argument {name}
++empty_statement # empty statement or extra semicolon
++identifier_hides_another # identifer {name} hides an identifier in a parent scope
+-inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
++incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version.
++invalid_fallthru # unexpected "fallthru" control comment
++invalid_pass # unexpected "pass" control comment
++jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
++leading_decimal_point # leading decimal point may indicate a number or an object member
++legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
++meaningless_block # meaningless block; curly braces have no impact
++mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence
++misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
++missing_break # missing break statement
++missing_break_for_last_case # missing break statement for last case in switch
++missing_default_case # missing default case in switch statement
++missing_option_explicit # the "option explicit" control comment is missing
++missing_semicolon # missing semicolon
++missing_semicolon_for_lambda # missing semicolon for lambda assignment
++multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
++nested_comment # nested comment
++no_return_value # function {name} does not always return a value
++octal_number # leading zeros make an octal number
++parseint_missing_radix # parseInt missing radix parameter
++partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
++redeclared_var # redeclaration of {name}
++trailing_comma_in_array # extra comma is not recommended in array initializers
++trailing_decimal_point # trailing decimal point may indicate a number or an object member
++undeclared_identifier # undeclared identifier: {name}
++unreachable_code # unreachable code
+-unreferenced_argument # argument declared but never referenced: {name}
+-unreferenced_function # function is declared but never referenced: {name}
++unreferenced_variable # variable is declared but never referenced: {name}
++unsupported_version # JavaScript {version} is not supported
++use_of_label # use of label
++useless_assign # useless assignment
++useless_comparison # useless comparison; comparing identical expressions
+-useless_quotes # the quotation marks are unnecessary
++useless_void # use of the void type may be unnecessary (void is always undefined)
++var_hides_arg # variable {name} hides argument
++want_assign_or_call # expected an assignment or function call
++with_statement # with statement hides undeclared variables; use temporary variable instead
+
+
+### Output format
+# Customize the format of the error message.
+# __FILE__ indicates current file path
+# __FILENAME__ indicates current file name
+# __LINE__ indicates current line
+# __COL__ indicates current column
+# __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__)
+# __ERROR_NAME__ indicates error name (used in configuration file)
+# __ERROR_PREFIX__ indicates error prefix
+# __ERROR_MSG__ indicates error message
+#
+# For machine-friendly output, the output format can be prefixed with
+# "encode:". If specified, all items will be encoded with C-slashes.
+#
+# Visual Studio syntax (default):
++output-format __FILE__(__LINE__): __ERROR__
+# Alternative syntax:
+#+output-format __FILE__:__LINE__: __ERROR__
+
+
+### Context
+# Show the in-line position of the error.
+# Use "+context" to display or "-context" to suppress.
+#
++context
+
+
+### Control Comments
+# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
+# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
+# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
+# although legacy control comments are enabled by default for backward compatibility.
+#
+-legacy_control_comments
+
+
+### Defining identifiers
+# By default, "option explicit" is enabled on a per-file basis.
+# To enable this for all files, use "+always_use_option_explicit"
+-always_use_option_explicit
+
+# Define certain identifiers of which the lint is not aware.
+# (Use this in conjunction with the "undeclared identifier" warning.)
+#
+# Common uses for webpages might be:
++define __dirname
++define clearInterval
++define clearTimeout
++define console
++define exports
++define global
++define process
++define require
++define setInterval
++define setTimeout
++define Buffer
++define JSON
++define Math
+
+### JavaScript Version
+# To change the default JavaScript version:
+#+default-type text/javascript;version=1.5
+#+default-type text/javascript;e4x=1
+
+### Files
+# Specify which files to lint
+# Use "+recurse" to enable recursion (disabled by default).
+# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
+# or "+process Folder\Path\*.htm".
+#
+
diff --git a/source/node_modules/extsprintf/lib/extsprintf.js b/source/node_modules/extsprintf/lib/extsprintf.js
new file mode 100644
index 000000000..61ff891de
--- /dev/null
+++ b/source/node_modules/extsprintf/lib/extsprintf.js
@@ -0,0 +1,166 @@
+/*
+ * extsprintf.js: extended POSIX-style sprintf
+ */
+
+var mod_assert = require('assert');
+var mod_util = require('util');
+
+/*
+ * Public interface
+ */
+exports.sprintf = jsSprintf;
+
+/*
+ * Stripped down version of s[n]printf(3c). We make a best effort to throw an
+ * exception when given a format string we don't understand, rather than
+ * ignoring it, so that we won't break existing programs if/when we go implement
+ * the rest of this.
+ *
+ * This implementation currently supports specifying
+ * - field alignment ('-' flag),
+ * - zero-pad ('0' flag)
+ * - always show numeric sign ('+' flag),
+ * - field width
+ * - conversions for strings, decimal integers, and floats (numbers).
+ * - argument size specifiers. These are all accepted but ignored, since
+ * Javascript has no notion of the physical size of an argument.
+ *
+ * Everything else is currently unsupported, most notably precision, unsigned
+ * numbers, non-decimal numbers, and characters.
+ */
+function jsSprintf(fmt)
+{
+ var regex = [
+ '([^%]*)', /* normal text */
+ '%', /* start of format */
+ '([\'\\-+ #0]*?)', /* flags (optional) */
+ '([1-9]\\d*)?', /* width (optional) */
+ '(\\.([1-9]\\d*))?', /* precision (optional) */
+ '[lhjztL]*?', /* length mods (ignored) */
+ '([diouxXfFeEgGaAcCsSp%jr])' /* conversion */
+ ].join('');
+
+ var re = new RegExp(regex);
+ var args = Array.prototype.slice.call(arguments, 1);
+ var flags, width, precision, conversion;
+ var left, pad, sign, arg, match;
+ var ret = '';
+ var argn = 1;
+
+ mod_assert.equal('string', typeof (fmt));
+
+ while ((match = re.exec(fmt)) !== null) {
+ ret += match[1];
+ fmt = fmt.substring(match[0].length);
+
+ flags = match[2] || '';
+ width = match[3] || 0;
+ precision = match[4] || '';
+ conversion = match[6];
+ left = false;
+ sign = false;
+ pad = ' ';
+
+ if (conversion == '%') {
+ ret += '%';
+ continue;
+ }
+
+ if (args.length === 0)
+ throw (new Error('too few args to sprintf'));
+
+ arg = args.shift();
+ argn++;
+
+ if (flags.match(/[\' #]/))
+ throw (new Error(
+ 'unsupported flags: ' + flags));
+
+ if (precision.length > 0)
+ throw (new Error(
+ 'non-zero precision not supported'));
+
+ if (flags.match(/-/))
+ left = true;
+
+ if (flags.match(/0/))
+ pad = '0';
+
+ if (flags.match(/\+/))
+ sign = true;
+
+ switch (conversion) {
+ case 's':
+ if (arg === undefined || arg === null)
+ throw (new Error('argument ' + argn +
+ ': attempted to print undefined or null ' +
+ 'as a string'));
+ ret += doPad(pad, width, left, arg.toString());
+ break;
+
+ case 'd':
+ arg = Math.floor(arg);
+ /*jsl:fallthru*/
+ case 'f':
+ sign = sign && arg > 0 ? '+' : '';
+ ret += sign + doPad(pad, width, left,
+ arg.toString());
+ break;
+
+ case 'j': /* non-standard */
+ if (width === 0)
+ width = 10;
+ ret += mod_util.inspect(arg, false, width);
+ break;
+
+ case 'r': /* non-standard */
+ ret += dumpException(arg);
+ break;
+
+ default:
+ throw (new Error('unsupported conversion: ' +
+ conversion));
+ }
+ }
+
+ ret += fmt;
+ return (ret);
+}
+
+function doPad(chr, width, left, str)
+{
+ var ret = str;
+
+ while (ret.length < width) {
+ if (left)
+ ret += chr;
+ else
+ ret = chr + ret;
+ }
+
+ return (ret);
+}
+
+/*
+ * This function dumps long stack traces for exceptions having a cause() method.
+ * See node-verror for an example.
+ */
+function dumpException(ex)
+{
+ var ret;
+
+ if (!(ex instanceof Error))
+ throw (new Error(jsSprintf('invalid type for %%r: %j', ex)));
+
+ /* Note that V8 prepends "ex.stack" with ex.toString(). */
+ ret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack;
+
+ if (ex.cause && typeof (ex.cause) === 'function') {
+ var cex = ex.cause();
+ if (cex) {
+ ret += '\nCaused by: ' + dumpException(cex);
+ }
+ }
+
+ return (ret);
+}
diff --git a/source/node_modules/extsprintf/package.json b/source/node_modules/extsprintf/package.json
new file mode 100644
index 000000000..29dbd836b
--- /dev/null
+++ b/source/node_modules/extsprintf/package.json
@@ -0,0 +1,66 @@
+{
+ "_args": [
+ [
+ "extsprintf@1.0.2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/jsprim"
+ ]
+ ],
+ "_from": "extsprintf@1.0.2",
+ "_id": "extsprintf@1.0.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/extsprintf",
+ "_npmUser": {
+ "email": "dap@cs.brown.edu",
+ "name": "dap"
+ },
+ "_npmVersion": "1.1.65",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "extsprintf",
+ "raw": "extsprintf@1.0.2",
+ "rawSpec": "1.0.2",
+ "scope": null,
+ "spec": "1.0.2",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/jsprim",
+ "/verror"
+ ],
+ "_resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
+ "_shasum": "e1080e0658e300b06294990cc70e1502235fd550",
+ "_shrinkwrap": null,
+ "_spec": "extsprintf@1.0.2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/jsprim",
+ "bugs": {
+ "url": "https://github.com/davepacheco/node-extsprintf/issues"
+ },
+ "dependencies": {},
+ "description": "extended POSIX-style sprintf",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "e1080e0658e300b06294990cc70e1502235fd550",
+ "tarball": "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
+ },
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "homepage": "https://github.com/davepacheco/node-extsprintf#readme",
+ "main": "./lib/extsprintf.js",
+ "maintainers": [
+ {
+ "name": "dap",
+ "email": "dap@cs.brown.edu"
+ }
+ ],
+ "name": "extsprintf",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/davepacheco/node-extsprintf.git"
+ },
+ "version": "1.0.2"
+}
diff --git a/source/node_modules/fancy-log/LICENSE b/source/node_modules/fancy-log/LICENSE
new file mode 100644
index 000000000..0dd44fbde
--- /dev/null
+++ b/source/node_modules/fancy-log/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Blaine Bublitz
+Based on gulp-util, copyright 2014 Fractal
+
+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.
+
diff --git a/source/node_modules/fancy-log/README.md b/source/node_modules/fancy-log/README.md
new file mode 100644
index 000000000..f3d227d05
--- /dev/null
+++ b/source/node_modules/fancy-log/README.md
@@ -0,0 +1,35 @@
+# fancy-log
+
+[](https://travis-ci.org/js-cli/fancy-log)
+
+Log things, prefixed with a timestamp
+
+__This module was pulled out of gulp-util for use inside the CLI__
+
+## Usage
+
+```js
+var log = require('fancy-log');
+
+log('a message');
+// [16:27:02] a message
+
+log.error('oh no!');
+// [16:27:02] oh no!
+```
+
+## API
+
+### `log(msg...)`
+
+Logs the message as if you called `console.log` but prefixes the output with the
+current time in HH:MM:ss format.
+
+### `log.error(msg...)`
+
+Logs ths message as if you called `console.error` but prefixes the output with the
+current time in HH:MM:ss format.
+
+## License
+
+MIT
diff --git a/source/node_modules/fancy-log/index.js b/source/node_modules/fancy-log/index.js
new file mode 100644
index 000000000..a9d972267
--- /dev/null
+++ b/source/node_modules/fancy-log/index.js
@@ -0,0 +1,27 @@
+'use strict';
+/*
+ Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js
+ */
+var chalk = require('chalk');
+var timestamp = require('time-stamp');
+
+function getTimestamp(){
+ return '['+chalk.grey(timestamp('HH:mm:ss'))+']';
+}
+
+function log(){
+ var time = getTimestamp();
+ process.stdout.write(time + ' ');
+ console.log.apply(console, arguments);
+ return this;
+}
+
+function error(){
+ var time = getTimestamp();
+ process.stderr.write(time + ' ');
+ console.error.apply(console, arguments);
+ return this;
+}
+
+module.exports = log;
+module.exports.error = error;
diff --git a/source/node_modules/fancy-log/package.json b/source/node_modules/fancy-log/package.json
new file mode 100644
index 000000000..94954b635
--- /dev/null
+++ b/source/node_modules/fancy-log/package.json
@@ -0,0 +1,103 @@
+{
+ "_args": [
+ [
+ "fancy-log@^1.1.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "fancy-log@>=1.1.0 <2.0.0",
+ "_id": "fancy-log@1.2.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/fancy-log",
+ "_nodeVersion": "0.10.41",
+ "_npmOperationalInternal": {
+ "host": "packages-5-east.internal.npmjs.com",
+ "tmp": "tmp/fancy-log-1.2.0.tgz_1455044959547_0.6881773378700018"
+ },
+ "_npmUser": {
+ "email": "blaine@iceddev.com",
+ "name": "phated"
+ },
+ "_npmVersion": "2.14.14",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "fancy-log",
+ "raw": "fancy-log@^1.1.0",
+ "rawSpec": "^1.1.0",
+ "scope": null,
+ "spec": ">=1.1.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz",
+ "_shasum": "d5a51b53e9ab22ca07d558f2b67ae55fdb5fcbd8",
+ "_shrinkwrap": null,
+ "_spec": "fancy-log@^1.1.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util",
+ "author": {
+ "email": "blaine@iceddev.com",
+ "name": "Blaine Bublitz",
+ "url": "http://iceddev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/phated/fancy-log/issues"
+ },
+ "contributors": [],
+ "dependencies": {
+ "chalk": "^1.1.1",
+ "time-stamp": "^1.0.0"
+ },
+ "description": "Log things, prefixed with a timestamp",
+ "devDependencies": {
+ "@phated/eslint-config-iceddev": "^0.2.1",
+ "code": "^1.5.0",
+ "eslint": "^1.3.1",
+ "eslint-plugin-mocha": "^0.5.1",
+ "eslint-plugin-react": "^3.3.1",
+ "lab": "^5.16.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d5a51b53e9ab22ca07d558f2b67ae55fdb5fcbd8",
+ "tarball": "http://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "gitHead": "349e046ea78834c5659beafd9a7c364ebd0ed221",
+ "homepage": "https://github.com/phated/fancy-log#readme",
+ "keywords": [
+ "console.log",
+ "log",
+ "logger",
+ "logging",
+ "pretty",
+ "timestamp"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "name": "fancy-log",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/phated/fancy-log.git"
+ },
+ "scripts": {
+ "test": "lab -cvL test.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/source/node_modules/find-index/README.md b/source/node_modules/find-index/README.md
new file mode 100644
index 000000000..034832e03
--- /dev/null
+++ b/source/node_modules/find-index/README.md
@@ -0,0 +1,33 @@
+
+# find-index
+
+finds an item in an array matching a predicate function,
+and returns its index
+
+fast both when `thisArg` is used and also when it isn't: [jsPerf](http://jsperf.com/array-prototype-findindex-shims)
+
+### usage
+```bash
+npm install find-index
+```
+```js
+findIndex = require('find-index')
+findLastIndex = require('find-index/last')
+```
+ findIndex(array, callback[, thisArg])
+ findLastIndex(array, callback[, thisArg])
+ Parameters:
+ array
+ The array to operate on.
+ callback
+ Function to execute on each value in the array, taking three arguments:
+ element
+ The current element being processed in the array.
+ index
+ The index of the current element being processed in the array.
+ array
+ The array findIndex was called upon.
+ thisArg
+ Object to use as this when executing callback.
+
+based on [array-findindex](https://www.npmjs.org/package/array-findindex)
diff --git a/source/node_modules/find-index/index.js b/source/node_modules/find-index/index.js
new file mode 100644
index 000000000..61bff61af
--- /dev/null
+++ b/source/node_modules/find-index/index.js
@@ -0,0 +1,26 @@
+function findIndex(array, predicate, self) {
+ var len = array.length;
+ var i;
+ if (len === 0) return -1;
+ if (typeof predicate !== 'function') {
+ throw new TypeError(predicate + ' must be a function');
+ }
+
+ if (self) {
+ for (i = 0; i < len; i++) {
+ if (predicate.call(self, array[i], i, array)) {
+ return i;
+ }
+ }
+ } else {
+ for (i = 0; i < len; i++) {
+ if (predicate(array[i], i, array)) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+}
+
+module.exports = findIndex
diff --git a/source/node_modules/find-index/last.js b/source/node_modules/find-index/last.js
new file mode 100644
index 000000000..186739a68
--- /dev/null
+++ b/source/node_modules/find-index/last.js
@@ -0,0 +1,26 @@
+function findLastIndex(array, predicate, self) {
+ var len = array.length;
+ var i;
+ if (len === 0) return -1;
+ if (typeof predicate !== 'function') {
+ throw new TypeError(predicate + ' must be a function');
+ }
+
+ if (self) {
+ for (i = len - 1; i >= 0; i--) {
+ if (predicate.call(self, array[i], i, array)) {
+ return i;
+ }
+ }
+ } else {
+ for (i = len - 1; i >= 0; i--) {
+ if (predicate(array[i], i, array)) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+}
+
+module.exports = findLastIndex
diff --git a/source/node_modules/find-index/package.json b/source/node_modules/find-index/package.json
new file mode 100644
index 000000000..3f848417b
--- /dev/null
+++ b/source/node_modules/find-index/package.json
@@ -0,0 +1,79 @@
+{
+ "_args": [
+ [
+ "find-index@^0.1.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob2base"
+ ]
+ ],
+ "_from": "find-index@>=0.1.1 <0.2.0",
+ "_id": "find-index@0.1.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/find-index",
+ "_npmUser": {
+ "email": "james@jsdf.co",
+ "name": "jsdf"
+ },
+ "_npmVersion": "1.4.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "find-index",
+ "raw": "find-index@^0.1.1",
+ "rawSpec": "^0.1.1",
+ "scope": null,
+ "spec": ">=0.1.1 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob2base"
+ ],
+ "_resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
+ "_shasum": "675d358b2ca3892d795a1ab47232f8b6e2e0dde4",
+ "_shrinkwrap": null,
+ "_spec": "find-index@^0.1.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob2base",
+ "author": {
+ "email": "james@jsdf.co",
+ "name": "James Friend",
+ "url": "http://jsdf.co/"
+ },
+ "bugs": {
+ "url": "https://github.com/jsdf/find-index/issues"
+ },
+ "dependencies": {},
+ "description": "finds an item in an array matching a predicate function, and returns its index",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "675d358b2ca3892d795a1ab47232f8b6e2e0dde4",
+ "tarball": "http://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz"
+ },
+ "files": [
+ "index.js",
+ "last.js"
+ ],
+ "homepage": "https://github.com/jsdf/find-index",
+ "keywords": [
+ "array",
+ "findindex"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "jsdf",
+ "email": "james@jsdf.co"
+ }
+ ],
+ "name": "find-index",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jsdf/find-index.git"
+ },
+ "scripts": {
+ "test": "node test/test"
+ },
+ "version": "0.1.1"
+}
diff --git a/source/node_modules/find-up/index.js b/source/node_modules/find-up/index.js
new file mode 100644
index 000000000..affddf138
--- /dev/null
+++ b/source/node_modules/find-up/index.js
@@ -0,0 +1,53 @@
+'use strict';
+var path = require('path');
+var pathExists = require('path-exists');
+var Promise = require('pinkie-promise');
+
+function splitPath(x) {
+ return path.resolve(x || '').split(path.sep);
+}
+
+function join(parts, filename) {
+ return parts.join(path.sep) + path.sep + filename;
+}
+
+module.exports = function (filename, opts) {
+ opts = opts || {};
+
+ var parts = splitPath(opts.cwd);
+
+ return new Promise(function (resolve) {
+ (function find() {
+ var fp = join(parts, filename);
+
+ pathExists(fp).then(function (exists) {
+ if (exists) {
+ resolve(fp);
+ } else if (!parts.pop()) {
+ resolve(null);
+ } else {
+ find();
+ }
+ });
+ })();
+ });
+};
+
+module.exports.sync = function (filename, opts) {
+ opts = opts || {};
+
+ var parts = splitPath(opts.cwd);
+ var len = parts.length;
+
+ while (len--) {
+ var fp = join(parts, filename);
+
+ if (pathExists.sync(fp)) {
+ return fp;
+ }
+
+ parts.pop();
+ }
+
+ return null;
+};
diff --git a/source/node_modules/find-up/license b/source/node_modules/find-up/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/source/node_modules/find-up/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/find-up/package.json b/source/node_modules/find-up/package.json
new file mode 100644
index 000000000..804b143c2
--- /dev/null
+++ b/source/node_modules/find-up/package.json
@@ -0,0 +1,105 @@
+{
+ "_args": [
+ [
+ "find-up@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/read-pkg-up"
+ ]
+ ],
+ "_from": "find-up@>=1.0.0 <2.0.0",
+ "_id": "find-up@1.1.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/find-up",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "find-up",
+ "raw": "find-up@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/read-pkg-up"
+ ],
+ "_resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.0.tgz",
+ "_shasum": "a63b0eec4625a2902534898a5f9eec8aaed046e9",
+ "_shrinkwrap": null,
+ "_spec": "find-up@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/read-pkg-up",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/find-up/issues"
+ },
+ "dependencies": {
+ "path-exists": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "description": "Find a file by walking up parent directories",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "a63b0eec4625a2902534898a5f9eec8aaed046e9",
+ "tarball": "http://registry.npmjs.org/find-up/-/find-up-1.1.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "06e9dae73659ddf2421440ca4695161c38d7d2fb",
+ "homepage": "https://github.com/sindresorhus/find-up",
+ "keywords": [
+ "dir",
+ "directory",
+ "file",
+ "find",
+ "find-up",
+ "findup",
+ "folder",
+ "look",
+ "look-up",
+ "match",
+ "package",
+ "parent",
+ "parents",
+ "path",
+ "resolve",
+ "search",
+ "up",
+ "walk",
+ "walking"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "find-up",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/find-up.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.1.0"
+}
diff --git a/source/node_modules/find-up/readme.md b/source/node_modules/find-up/readme.md
new file mode 100644
index 000000000..35778a33b
--- /dev/null
+++ b/source/node_modules/find-up/readme.md
@@ -0,0 +1,72 @@
+# find-up [](https://travis-ci.org/sindresorhus/find-up)
+
+> Find a file by walking up parent directories
+
+
+## Install
+
+```
+$ npm install --save find-up
+```
+
+
+## Usage
+
+```
+/
+└── Users
+ └── sindresorhus
+ ├── unicorn.png
+ └── foo
+ └── bar
+ ├── baz
+ └── example.js
+```
+
+```js
+// example.js
+var findUp = require('find-up');
+
+findUp('unicorn.png').then(function (filepath) {
+ console.log(filepath);
+ //=> '/Users/sindresorhus/unicorn.png'
+});
+```
+
+
+## API
+
+### findUp(filename, [options])
+
+Returns a promise that resolves to a filepath or `null`.
+
+### findUp.sync(filename, [options])
+
+Returns a filepath or `null`.
+
+#### filename
+
+Type: `string`
+
+Filename of the file to find.
+
+#### options
+
+##### cwd
+
+Type: `string`
+Default: `process.cwd()`
+
+Directory to start from.
+
+
+## Related
+
+- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
+- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
+- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of a npm package
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/findup-sync/.npmignore b/source/node_modules/findup-sync/.npmignore
new file mode 100644
index 000000000..84561e0c9
--- /dev/null
+++ b/source/node_modules/findup-sync/.npmignore
@@ -0,0 +1,4 @@
+test
+.travis.yml
+.jshintrc
+Gruntfile.js
diff --git a/source/node_modules/findup-sync/LICENSE-MIT b/source/node_modules/findup-sync/LICENSE-MIT
new file mode 100644
index 000000000..bb2aad6dc
--- /dev/null
+++ b/source/node_modules/findup-sync/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 "Cowboy" Ben Alman
+
+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.
diff --git a/source/node_modules/findup-sync/README.md b/source/node_modules/findup-sync/README.md
new file mode 100644
index 000000000..e396df51a
--- /dev/null
+++ b/source/node_modules/findup-sync/README.md
@@ -0,0 +1,48 @@
+# findup-sync [](http://travis-ci.org/cowboy/node-findup-sync)
+
+Find the first file matching a given pattern in the current directory or the nearest ancestor directory.
+
+## Getting Started
+Install the module with: `npm install findup-sync`
+
+```js
+var findup = require('findup-sync');
+
+// Start looking in the CWD.
+var filepath1 = findup('{a,b}*.txt');
+
+// Start looking somewhere else, and ignore case (probably a good idea).
+var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true});
+```
+
+## Usage
+
+```js
+findup(patternOrPatterns [, minimatchOptions])
+```
+
+### patternOrPatterns
+Type: `String` or `Array`
+Default: none
+
+One or more wildcard glob patterns. Or just filenames.
+
+### minimatchOptions
+Type: `Object`
+Default: `{}`
+
+Options to be passed to [minimatch](https://github.com/isaacs/minimatch).
+
+Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here.
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
+
+## Release History
+2015-09-14 0 v0.3.0 - updated glob to ~5.0.
+2014-12-17 - v0.2.1 - updated to glob ~4.3.
+2014-12-16 - v0.2.0 - Removed lodash, updated to glob 4.x.
+2014-03-14 - v0.1.3 - Updated dependencies.
+2013-03-08 - v0.1.2 - Updated dependencies. Fixed a Node 0.9.x bug. Updated unit tests to work cross-platform.
+2012-11-15 - v0.1.1 - Now works without an options object.
+2012-11-01 - v0.1.0 - Initial release.
diff --git a/source/node_modules/findup-sync/lib/findup-sync.js b/source/node_modules/findup-sync/lib/findup-sync.js
new file mode 100644
index 000000000..871a7256c
--- /dev/null
+++ b/source/node_modules/findup-sync/lib/findup-sync.js
@@ -0,0 +1,49 @@
+/*
+ * findup-sync
+ * https://github.com/cowboy/node-findup-sync
+ *
+ * Copyright (c) 2013 "Cowboy" Ben Alman
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+// Nodejs libs.
+var path = require('path');
+
+// External libs.
+var glob = require('glob');
+
+// Search for a filename in the given directory or all parent directories.
+module.exports = function(patterns, options) {
+ // Normalize patterns to an array.
+ if (!Array.isArray(patterns)) { patterns = [patterns]; }
+ // Create globOptions so that it can be modified without mutating the
+ // original object.
+ var globOptions = Object.create(options || {});
+ globOptions.maxDepth = 1;
+ globOptions.cwd = path.resolve(globOptions.cwd || '.');
+
+ var files, lastpath;
+ do {
+ // Search for files matching patterns.
+ files = patterns.map(function(pattern) {
+ return glob.sync(pattern, globOptions);
+ }).reduce(function(a, b) {
+ return a.concat(b);
+ }).filter(function(entry, index, arr) {
+ return index === arr.indexOf(entry);
+ });
+ // Return file if found.
+ if (files.length > 0) {
+ return path.resolve(path.join(globOptions.cwd, files[0]));
+ }
+ // Go up a directory.
+ lastpath = globOptions.cwd;
+ globOptions.cwd = path.resolve(globOptions.cwd, '..');
+ // If parentpath is the same as basedir, we can't go any higher.
+ } while (globOptions.cwd !== lastpath);
+
+ // No files were found!
+ return null;
+};
diff --git a/source/node_modules/findup-sync/package.json b/source/node_modules/findup-sync/package.json
new file mode 100644
index 000000000..af8781143
--- /dev/null
+++ b/source/node_modules/findup-sync/package.json
@@ -0,0 +1,95 @@
+{
+ "_args": [
+ [
+ "findup-sync@^0.3.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/liftoff"
+ ]
+ ],
+ "_from": "findup-sync@>=0.3.0 <0.4.0",
+ "_id": "findup-sync@0.3.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/findup-sync",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "tyler@sleekcode.net",
+ "name": "tkellen"
+ },
+ "_npmVersion": "2.14.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "findup-sync",
+ "raw": "findup-sync@^0.3.0",
+ "rawSpec": "^0.3.0",
+ "scope": null,
+ "spec": ">=0.3.0 <0.4.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/liftoff"
+ ],
+ "_resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
+ "_shasum": "37930aa5d816b777c03445e1966cc6790a4c0b16",
+ "_shrinkwrap": null,
+ "_spec": "findup-sync@^0.3.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/liftoff",
+ "author": {
+ "name": "\"Cowboy\" Ben Alman",
+ "url": "http://benalman.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/cowboy/node-findup-sync/issues"
+ },
+ "dependencies": {
+ "glob": "~5.0.0"
+ },
+ "description": "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.",
+ "devDependencies": {
+ "grunt": "~0.4.4",
+ "grunt-contrib-jshint": "~0.9.2",
+ "grunt-contrib-nodeunit": "~0.3.3"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "37930aa5d816b777c03445e1966cc6790a4c0b16",
+ "tarball": "http://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.6.0"
+ },
+ "gitHead": "24356dc9bc74bf2389080a29c80845a510eaf3ef",
+ "homepage": "https://github.com/cowboy/node-findup-sync",
+ "keywords": [
+ "file",
+ "find",
+ "glob"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/cowboy/node-findup-sync/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/findup-sync",
+ "maintainers": [
+ {
+ "name": "cowboy",
+ "email": "cowboy@rj3.net"
+ },
+ {
+ "name": "tkellen",
+ "email": "tyler@sleekcode.net"
+ }
+ ],
+ "name": "findup-sync",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/cowboy/node-findup-sync.git"
+ },
+ "scripts": {
+ "test": "grunt nodeunit"
+ },
+ "version": "0.3.0"
+}
diff --git a/source/node_modules/first-chunk-stream/index.js b/source/node_modules/first-chunk-stream/index.js
new file mode 100644
index 000000000..24815508a
--- /dev/null
+++ b/source/node_modules/first-chunk-stream/index.js
@@ -0,0 +1,93 @@
+'use strict';
+var util = require('util');
+var Transform = require('stream').Transform;
+
+function ctor(options, transform) {
+ util.inherits(FirstChunk, Transform);
+
+ if (typeof options === 'function') {
+ transform = options;
+ options = {};
+ }
+
+ if (typeof transform !== 'function') {
+ throw new Error('transform function required');
+ }
+
+ function FirstChunk(options2) {
+ if (!(this instanceof FirstChunk)) {
+ return new FirstChunk(options2);
+ }
+
+ Transform.call(this, options2);
+
+ this._firstChunk = true;
+ this._transformCalled = false;
+ this._minSize = options.minSize;
+ }
+
+ FirstChunk.prototype._transform = function (chunk, enc, cb) {
+ this._enc = enc;
+
+ if (this._firstChunk) {
+ this._firstChunk = false;
+
+ if (this._minSize == null) {
+ transform.call(this, chunk, enc, cb);
+ this._transformCalled = true;
+ return;
+ }
+
+ this._buffer = chunk;
+ cb();
+ return;
+ }
+
+ if (this._minSize == null) {
+ this.push(chunk);
+ cb();
+ return;
+ }
+
+ if (this._buffer.length < this._minSize) {
+ this._buffer = Buffer.concat([this._buffer, chunk]);
+ cb();
+ return;
+ }
+
+ if (this._buffer.length >= this._minSize) {
+ transform.call(this, this._buffer.slice(), enc, function () {
+ this.push(chunk);
+ cb();
+ }.bind(this));
+ this._transformCalled = true;
+ this._buffer = false;
+ return;
+ }
+
+ this.push(chunk);
+ cb();
+ };
+
+ FirstChunk.prototype._flush = function (cb) {
+ if (!this._buffer) {
+ cb();
+ return;
+ }
+
+ if (this._transformCalled) {
+ this.push(this._buffer);
+ cb();
+ } else {
+ transform.call(this, this._buffer.slice(), this._enc, cb);
+ }
+ };
+
+ return FirstChunk;
+}
+
+module.exports = function () {
+ return ctor.apply(ctor, arguments)();
+};
+
+module.exports.ctor = ctor;
diff --git a/source/node_modules/first-chunk-stream/package.json b/source/node_modules/first-chunk-stream/package.json
new file mode 100644
index 000000000..adaa55fab
--- /dev/null
+++ b/source/node_modules/first-chunk-stream/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ "first-chunk-stream@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs/node_modules/strip-bom"
+ ]
+ ],
+ "_from": "first-chunk-stream@>=1.0.0 <2.0.0",
+ "_id": "first-chunk-stream@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/first-chunk-stream",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "1.4.21",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "first-chunk-stream",
+ "raw": "first-chunk-stream@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/vinyl-fs/strip-bom"
+ ],
+ "_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
+ "_shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e",
+ "_shrinkwrap": null,
+ "_spec": "first-chunk-stream@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs/node_modules/strip-bom",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/first-chunk-stream/issues"
+ },
+ "dependencies": {},
+ "description": "Transform the first chunk in a stream",
+ "devDependencies": {
+ "concat-stream": "^1.4.5",
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e",
+ "tarball": "http://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "8b0b1750edcc30fa2b2071245198181e925be619",
+ "homepage": "https://github.com/sindresorhus/first-chunk-stream",
+ "keywords": [
+ "buffer",
+ "chunk",
+ "first",
+ "min",
+ "minimum",
+ "size",
+ "stream",
+ "streams",
+ "transform"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "first-chunk-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/first-chunk-stream.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/first-chunk-stream/readme.md b/source/node_modules/first-chunk-stream/readme.md
new file mode 100644
index 000000000..f8909c8f7
--- /dev/null
+++ b/source/node_modules/first-chunk-stream/readme.md
@@ -0,0 +1,62 @@
+# first-chunk-stream [](https://travis-ci.org/sindresorhus/first-chunk-stream)
+
+> Transform the first chunk in a stream
+
+Useful if you want to do something to the first chunk.
+
+You can also set the minimum size of that chunk.
+
+
+## Install
+
+```sh
+$ npm install --save first-chunk-stream
+```
+
+
+## Usage
+
+```js
+var fs = require('fs');
+var concat = require('concat-stream');
+var firstChunk = require('first-chunk-stream');
+
+// unicorn.txt => unicorn rainbow
+// `highWaterMark: 1` means it will only read 1 byte at the time
+fs.createReadStream('unicorn.txt', {highWaterMark: 1})
+ .pipe(firstChunk({minSize: 7}, function (chunk, enc, cb) {
+ this.push(chunk.toUpperCase());
+ cb();
+ }))
+ .pipe(concat(function (data) {
+ console.log(data);
+ //=> UNICORN rainbow
+ }));
+```
+
+
+## API
+
+### firstChunk([options], transform)
+
+#### options.minSize
+
+Type: `number`
+
+The minimum size of the first chunk.
+
+#### transform(chunk, encoding, callback)
+
+*Required*
+Type: `function`
+
+The [function](http://nodejs.org/docs/latest/api/stream.html#stream_transform_transform_chunk_encoding_callback) that gets the first chunk.
+
+### firstChunk.ctor()
+
+Instead of returning a [stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform_1) instance, `firstChunk.ctor()` returns a constructor for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/flagged-respawn/.npmignore b/source/node_modules/flagged-respawn/.npmignore
new file mode 100644
index 000000000..a1dca7a54
--- /dev/null
+++ b/source/node_modules/flagged-respawn/.npmignore
@@ -0,0 +1 @@
+*.flags.json
diff --git a/source/node_modules/flagged-respawn/.travis.yml b/source/node_modules/flagged-respawn/.travis.yml
new file mode 100644
index 000000000..e37da77f8
--- /dev/null
+++ b/source/node_modules/flagged-respawn/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+matrix:
+ fast_finish: true
+ allow_failures:
+ - node_js: 0.11
diff --git a/source/node_modules/flagged-respawn/LICENSE b/source/node_modules/flagged-respawn/LICENSE
new file mode 100644
index 000000000..a55f5b74b
--- /dev/null
+++ b/source/node_modules/flagged-respawn/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2014 Tyler Kellen
+
+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.
diff --git a/source/node_modules/flagged-respawn/README.md b/source/node_modules/flagged-respawn/README.md
new file mode 100644
index 000000000..6752b106e
--- /dev/null
+++ b/source/node_modules/flagged-respawn/README.md
@@ -0,0 +1,57 @@
+# flagged-respawn [](http://travis-ci.org/tkellen/node-flagged-respawn)
+> A tool for respawning node binaries when special flags are present.
+
+[](https://nodei.co/npm/flagged-respawn/)
+
+## What is it?
+
+Say you wrote a command line tool that runs arbitrary javascript (e.g. task runner, test framework, etc). For the sake of discussion, let's pretend it's a testing harness you've named `testify`.
+
+Everything is going splendidly until one day you decide to test some code that relies on a feature behind a v8 flag in node (`--harmony`, for example). Without much thought, you run `testify --harmony spec tests.js`.
+
+It doesn't work. After digging around for a bit, you realize this produces a [`process.argv`](http://nodejs.org/docs/latest/api/process.html#process_process_argv) of:
+
+`['node', '/usr/local/bin/test', '--harmony', 'spec', 'tests.js']`
+
+Crap. The `--harmony` flag is in the wrong place! It should be applied to the **node** command, not our binary. What we actually wanted was this:
+
+`['node', '--harmony', '/usr/local/bin/test', 'spec', 'tests.js']`
+
+Flagged-respawn fixes this problem and handles all the edge cases respawning creates, such as:
+- Providing a method to determine if a respawn is needed.
+- Piping stderr/stdout from the child into the parent.
+- Making the parent process exit with the same code as the child.
+- If the child is killed, making the parent exit with the same signal.
+
+To see it in action, clone this repository and run `npm install` / `npm run respawn` / `npm run nospawn`.
+
+## Sample Usage
+
+```js
+#!/usr/bin/env node
+
+const flaggedRespawn = require('flagged-respawn');
+
+// get a list of all possible v8 flags for the running version of node
+const v8flags = require('v8flags').fetch();
+
+flaggedRespawn(v8flags, process.argv, function (ready, child) {
+ if (ready) {
+ console.log('Running!');
+ // your cli code here
+ } else {
+ console.log('Special flags found, respawning.');
+ }
+ if (process.pid !== child.pid) {
+ console.log('Respawned to PID:', child.pid);
+ }
+});
+
+```
+
+## Release History
+
+* 2014-09-12 - v0.3.1 - use `{ stdio: 'inherit' }` for spawn to maintain colors
+* 2014-09-11 - v0.3.0 - for real this time
+* 2014-09-11 - v0.2.0 - cleanup
+* 2014-09-04 - v0.1.1 - initial release
diff --git a/source/node_modules/flagged-respawn/index.js b/source/node_modules/flagged-respawn/index.js
new file mode 100644
index 000000000..b1234003e
--- /dev/null
+++ b/source/node_modules/flagged-respawn/index.js
@@ -0,0 +1,18 @@
+const reorder = require('./lib/reorder');
+const respawn = require('./lib/respawn');
+
+module.exports = function (flags, argv, execute) {
+ if (!flags) {
+ throw new Error('You must specify flags to respawn with.');
+ }
+ if (!argv) {
+ throw new Error('You must specify an argv array.');
+ }
+ var proc = process;
+ var reordered = reorder(flags, argv);
+ var ready = JSON.stringify(argv) === JSON.stringify(reordered);
+ if (!ready) {
+ proc = respawn(reordered);
+ }
+ execute(ready, proc);
+};
diff --git a/source/node_modules/flagged-respawn/lib/reorder.js b/source/node_modules/flagged-respawn/lib/reorder.js
new file mode 100644
index 000000000..cf9f3b74a
--- /dev/null
+++ b/source/node_modules/flagged-respawn/lib/reorder.js
@@ -0,0 +1,16 @@
+module.exports = function (flags, argv) {
+ if (!argv) {
+ argv = process.argv;
+ }
+ var args = [argv[1]];
+ argv.slice(2).forEach(function (arg) {
+ var flag = arg.split('=')[0];
+ if (flags.indexOf(flag) !== -1) {
+ args.unshift(flag);
+ } else {
+ args.push(arg);
+ }
+ });
+ args.unshift(argv[0]);
+ return args;
+};
diff --git a/source/node_modules/flagged-respawn/lib/respawn.js b/source/node_modules/flagged-respawn/lib/respawn.js
new file mode 100644
index 000000000..086585300
--- /dev/null
+++ b/source/node_modules/flagged-respawn/lib/respawn.js
@@ -0,0 +1,15 @@
+const spawn = require('child_process').spawn;
+
+module.exports = function (argv) {
+ var child = spawn(argv[0], argv.slice(1), { stdio: 'inherit' });
+ child.on('exit', function (code, signal) {
+ process.on('exit', function () {
+ if (signal) {
+ process.kill(process.pid, signal);
+ } else {
+ process.exit(code);
+ }
+ });
+ });
+ return child;
+};
diff --git a/source/node_modules/flagged-respawn/package.json b/source/node_modules/flagged-respawn/package.json
new file mode 100644
index 000000000..5b7422723
--- /dev/null
+++ b/source/node_modules/flagged-respawn/package.json
@@ -0,0 +1,88 @@
+{
+ "_args": [
+ [
+ "flagged-respawn@^0.3.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/liftoff"
+ ]
+ ],
+ "_from": "flagged-respawn@>=0.3.1 <0.4.0",
+ "_id": "flagged-respawn@0.3.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/flagged-respawn",
+ "_npmUser": {
+ "email": "tyler@sleekcode.net",
+ "name": "tkellen"
+ },
+ "_npmVersion": "1.4.26",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "flagged-respawn",
+ "raw": "flagged-respawn@^0.3.1",
+ "rawSpec": "^0.3.1",
+ "scope": null,
+ "spec": ">=0.3.1 <0.4.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/liftoff"
+ ],
+ "_resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.1.tgz",
+ "_shasum": "397700925df6e12452202a71e89d89545fbbbe9d",
+ "_shrinkwrap": null,
+ "_spec": "flagged-respawn@^0.3.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/liftoff",
+ "author": {
+ "name": "Tyler Kellen",
+ "url": "http://goingslowly.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/tkellen/node-flagged-respawn/issues"
+ },
+ "dependencies": {},
+ "description": "A tool for respawning node binaries when special flags are present.",
+ "devDependencies": {
+ "chai": "~1.9.1",
+ "mocha": "~1.21.4",
+ "v8flags": "~1.0.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "397700925df6e12452202a71e89d89545fbbbe9d",
+ "tarball": "http://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.1.tgz"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "gitHead": "67f84fdd7b5f236f24ab9beee9ed1f5bf7ca8778",
+ "homepage": "https://github.com/tkellen/node-flagged-respawn",
+ "keywords": [
+ "respawn flags"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/tkellen/node-flagged-respawn/blob/master/LICENSE"
+ }
+ ],
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "tkellen",
+ "email": "tyler@sleekcode.net"
+ }
+ ],
+ "name": "flagged-respawn",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/tkellen/node-flagged-respawn.git"
+ },
+ "scripts": {
+ "nospawn": "node test/bin/respawner test",
+ "respawn": "node test/bin/respawner --harmony test",
+ "test": "mocha -R spec test"
+ },
+ "version": "0.3.1"
+}
diff --git a/source/node_modules/flagged-respawn/test/bin/exit_code.js b/source/node_modules/flagged-respawn/test/bin/exit_code.js
new file mode 100644
index 000000000..f2fff2d52
--- /dev/null
+++ b/source/node_modules/flagged-respawn/test/bin/exit_code.js
@@ -0,0 +1,13 @@
+#!/usr/bin/env node
+
+const flaggedRespawn = require('../../');
+
+flaggedRespawn(['--harmony'], process.argv, function (ready) {
+
+ if (ready) {
+ setTimeout(function () {
+ process.exit(100);
+ }, 100);
+ }
+
+});
diff --git a/source/node_modules/flagged-respawn/test/bin/respawner.js b/source/node_modules/flagged-respawn/test/bin/respawner.js
new file mode 100644
index 000000000..71348ba67
--- /dev/null
+++ b/source/node_modules/flagged-respawn/test/bin/respawner.js
@@ -0,0 +1,17 @@
+#!/usr/bin/env node
+
+const flaggedRespawn = require('../../');
+
+// get a list of all possible v8 flags for the running version of node
+const v8flags = require('v8flags').fetch();
+
+flaggedRespawn(v8flags, process.argv, function (ready, child) {
+ if (ready) {
+ console.log('Running!');
+ } else {
+ console.log('Special flags found, respawning.');
+ }
+ if (child.pid !== process.pid) {
+ console.log('Respawned to PID:', child.pid);
+ }
+});
diff --git a/source/node_modules/flagged-respawn/test/bin/signal.js b/source/node_modules/flagged-respawn/test/bin/signal.js
new file mode 100644
index 000000000..f4a1edf1a
--- /dev/null
+++ b/source/node_modules/flagged-respawn/test/bin/signal.js
@@ -0,0 +1,16 @@
+#!/usr/bin/env node
+
+const flaggedRespawn = require('../../');
+
+flaggedRespawn(['--harmony'], process.argv, function (ready, child) {
+
+ if (ready) {
+ setTimeout(function() {
+ process.exit();
+ }, 100);
+ } else {
+ console.log('got child!');
+ child.kill('SIGHUP');
+ }
+
+});
diff --git a/source/node_modules/flagged-respawn/test/index.js b/source/node_modules/flagged-respawn/test/index.js
new file mode 100644
index 000000000..ad5a0a179
--- /dev/null
+++ b/source/node_modules/flagged-respawn/test/index.js
@@ -0,0 +1,93 @@
+const expect = require('chai').expect;
+const exec = require('child_process').exec;
+
+const reorder = require('../lib/reorder');
+const flaggedRespawn = require('../');
+
+describe('flaggedRespawn', function () {
+ var flags = ['--harmony', '--use_strict']
+
+ describe('reorder', function () {
+
+ it('should re-order args, placing special flags first', function () {
+ var needsRespawn = ['node', 'file.js', '--flag', '--harmony', 'command'];
+ var noRespawnNeeded = ['node', 'bin/flagged-respawn', 'thing'];
+ expect(reorder(flags, needsRespawn))
+ .to.deep.equal(['node', '--harmony', 'file.js', '--flag', 'command']);
+ expect(reorder(flags, noRespawnNeeded))
+ .to.deep.equal(noRespawnNeeded);
+ });
+
+ it('should ignore special flags when they are in the correct position', function () {
+ var args = ['node', '--harmony', 'file.js', '--flag'];
+ expect(reorder(flags, reorder(flags, args))).to.deep.equal(args);
+ });
+
+ });
+
+ describe('execute', function () {
+
+ it('should throw if no flags are specified', function () {
+ expect(function () { flaggedRespawn.execute(); }).to.throw;
+ });
+
+ it('should throw if no argv is specified', function () {
+ expect(function () { flaggedRespawn.execute(flags); }).to.throw;
+ });
+
+ it('should respawn and pipe stderr/stdout to parent', function (done) {
+ exec('node ./test/bin/respawner.js --harmony', function (err, stdout, stderr) {
+ expect(stdout.replace(/[0-9]/g, '')).to.equal('Special flags found, respawning.\nRespawned to PID: \nRunning!\n');
+ done();
+ });
+ });
+
+ it('should respawn and pass exit code from child to parent', function (done) {
+ exec('node ./test/bin/exit_code.js --harmony', function (err, stdout, stderr) {
+ expect(err.code).to.equal(100);
+ done();
+ });
+ });
+
+ it.skip('should respawn; if child is killed, parent should exit with same signal', function (done) {
+ // TODO: figure out why travis hates this
+ exec('node ./test/bin/signal.js --harmony', function (err, stdout, stderr) {
+ console.log('err', err);
+ console.log('stdout', stdout);
+ console.log('stderr', stderr);
+ expect(err.signal).to.equal('SIGHUP');
+ done();
+ });
+ });
+
+ it('should call back with ready as true when respawn is not needed', function () {
+ var argv = ['node', './test/bin/respawner'];
+ flaggedRespawn(flags, argv, function (ready) {
+ expect(ready).to.be.true;
+ });
+ });
+
+ it('should call back with ready as false when respawn is needed', function () {
+ var argv = ['node', './test/bin/respawner', '--harmony'];
+ flaggedRespawn(flags, argv, function (ready) {
+ expect(ready).to.be.false;
+ });
+ });
+
+ it('should call back with the child process when ready', function () {
+ var argv = ['node', './test/bin/respawner', '--harmony'];
+ flaggedRespawn(flags, argv, function (ready, child) {
+ expect(child.pid).to.not.equal(process.pid);
+ });
+ });
+
+ it('should call back with own process when respawn not needed', function () {
+ var argv = ['node', './test/bin/respawner'];
+ flaggedRespawn(flags, argv, function (ready, child) {
+ expect(child.pid).to.equal(process.pid);
+ });
+ });
+
+ });
+
+});
diff --git a/source/node_modules/forever-agent/LICENSE b/source/node_modules/forever-agent/LICENSE
new file mode 100644
index 000000000..a4a9aee0c
--- /dev/null
+++ b/source/node_modules/forever-agent/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/source/node_modules/forever-agent/README.md b/source/node_modules/forever-agent/README.md
new file mode 100644
index 000000000..9d5b66343
--- /dev/null
+++ b/source/node_modules/forever-agent/README.md
@@ -0,0 +1,4 @@
+forever-agent
+=============
+
+HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.
diff --git a/source/node_modules/forever-agent/index.js b/source/node_modules/forever-agent/index.js
new file mode 100644
index 000000000..416c7abd7
--- /dev/null
+++ b/source/node_modules/forever-agent/index.js
@@ -0,0 +1,138 @@
+module.exports = ForeverAgent
+ForeverAgent.SSL = ForeverAgentSSL
+
+var util = require('util')
+ , Agent = require('http').Agent
+ , net = require('net')
+ , tls = require('tls')
+ , AgentSSL = require('https').Agent
+
+function getConnectionName(host, port) {
+ var name = ''
+ if (typeof host === 'string') {
+ name = host + ':' + port
+ } else {
+ // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name.
+ name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':')
+ }
+ return name
+}
+
+function ForeverAgent(options) {
+ var self = this
+ self.options = options || {}
+ self.requests = {}
+ self.sockets = {}
+ self.freeSockets = {}
+ self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
+ self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
+ self.on('free', function(socket, host, port) {
+ var name = getConnectionName(host, port)
+
+ if (self.requests[name] && self.requests[name].length) {
+ self.requests[name].shift().onSocket(socket)
+ } else if (self.sockets[name].length < self.minSockets) {
+ if (!self.freeSockets[name]) self.freeSockets[name] = []
+ self.freeSockets[name].push(socket)
+
+ // if an error happens while we don't use the socket anyway, meh, throw the socket away
+ var onIdleError = function() {
+ socket.destroy()
+ }
+ socket._onIdleError = onIdleError
+ socket.on('error', onIdleError)
+ } else {
+ // If there are no pending requests just destroy the
+ // socket and it will get removed from the pool. This
+ // gets us out of timeout issues and allows us to
+ // default to Connection:keep-alive.
+ socket.destroy()
+ }
+ })
+
+}
+util.inherits(ForeverAgent, Agent)
+
+ForeverAgent.defaultMinSockets = 5
+
+
+ForeverAgent.prototype.createConnection = net.createConnection
+ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
+ForeverAgent.prototype.addRequest = function(req, host, port) {
+ var name = getConnectionName(host, port)
+
+ if (typeof host !== 'string') {
+ var options = host
+ port = options.port
+ host = options.host
+ }
+
+ if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
+ var idleSocket = this.freeSockets[name].pop()
+ idleSocket.removeListener('error', idleSocket._onIdleError)
+ delete idleSocket._onIdleError
+ req._reusedSocket = true
+ req.onSocket(idleSocket)
+ } else {
+ this.addRequestNoreuse(req, host, port)
+ }
+}
+
+ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
+ if (this.sockets[name]) {
+ var index = this.sockets[name].indexOf(s)
+ if (index !== -1) {
+ this.sockets[name].splice(index, 1)
+ }
+ } else if (this.sockets[name] && this.sockets[name].length === 0) {
+ // don't leak
+ delete this.sockets[name]
+ delete this.requests[name]
+ }
+
+ if (this.freeSockets[name]) {
+ var index = this.freeSockets[name].indexOf(s)
+ if (index !== -1) {
+ this.freeSockets[name].splice(index, 1)
+ if (this.freeSockets[name].length === 0) {
+ delete this.freeSockets[name]
+ }
+ }
+ }
+
+ if (this.requests[name] && this.requests[name].length) {
+ // If we have pending requests and a socket gets closed a new one
+ // needs to be created to take over in the pool for the one that closed.
+ this.createSocket(name, host, port).emit('free')
+ }
+}
+
+function ForeverAgentSSL (options) {
+ ForeverAgent.call(this, options)
+}
+util.inherits(ForeverAgentSSL, ForeverAgent)
+
+ForeverAgentSSL.prototype.createConnection = createConnectionSSL
+ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
+
+function createConnectionSSL (port, host, options) {
+ if (typeof port === 'object') {
+ options = port;
+ } else if (typeof host === 'object') {
+ options = host;
+ } else if (typeof options === 'object') {
+ options = options;
+ } else {
+ options = {};
+ }
+
+ if (typeof port === 'number') {
+ options.port = port;
+ }
+
+ if (typeof host === 'string') {
+ options.host = host;
+ }
+
+ return tls.connect(options);
+}
diff --git a/source/node_modules/forever-agent/package.json b/source/node_modules/forever-agent/package.json
new file mode 100644
index 000000000..8a0c72ce7
--- /dev/null
+++ b/source/node_modules/forever-agent/package.json
@@ -0,0 +1,80 @@
+{
+ "_args": [
+ [
+ "forever-agent@~0.6.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request"
+ ]
+ ],
+ "_from": "forever-agent@>=0.6.1 <0.7.0",
+ "_id": "forever-agent@0.6.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/forever-agent",
+ "_npmUser": {
+ "email": "simeonvelichkov@gmail.com",
+ "name": "simov"
+ },
+ "_npmVersion": "1.4.28",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "forever-agent",
+ "raw": "forever-agent@~0.6.1",
+ "rawSpec": "~0.6.1",
+ "scope": null,
+ "spec": ">=0.6.1 <0.7.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "_shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91",
+ "_shrinkwrap": null,
+ "_spec": "forever-agent@~0.6.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request",
+ "author": {
+ "email": "mikeal.rogers@gmail.com",
+ "name": "Mikeal Rogers",
+ "url": "http://www.futurealoof.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mikeal/forever-agent/issues"
+ },
+ "dependencies": {},
+ "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91",
+ "tarball": "http://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "gitHead": "1b3b6163f2b3c2c4122bbfa288c1325c0df9871d",
+ "homepage": "https://github.com/mikeal/forever-agent",
+ "license": "Apache-2.0",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "mikeal",
+ "email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
+ },
+ {
+ "name": "simov",
+ "email": "simeonvelichkov@gmail.com"
+ }
+ ],
+ "name": "forever-agent",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "url": "git+https://github.com/mikeal/forever-agent.git"
+ },
+ "scripts": {},
+ "version": "0.6.1"
+}
diff --git a/source/node_modules/form-data/License b/source/node_modules/form-data/License
new file mode 100644
index 000000000..c7ff12a2f
--- /dev/null
+++ b/source/node_modules/form-data/License
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/source/node_modules/form-data/Readme.md b/source/node_modules/form-data/Readme.md
new file mode 100644
index 000000000..492773231
--- /dev/null
+++ b/source/node_modules/form-data/Readme.md
@@ -0,0 +1,210 @@
+# Form-Data [](https://gitter.im/form-data/form-data) [](https://travis-ci.org/form-data/form-data) [](https://david-dm.org/form-data/form-data)
+
+A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
+
+The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
+
+[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
+[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions
+
+## Install
+
+```
+npm install form-data
+```
+
+## Usage
+
+In this example we are constructing a form with 3 fields that contain a string,
+a buffer and a file stream.
+
+``` javascript
+var FormData = require('form-data');
+var fs = require('fs');
+
+var form = new FormData();
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
+```
+
+Also you can use http-response stream:
+
+``` javascript
+var FormData = require('form-data');
+var http = require('http');
+
+var form = new FormData();
+
+http.request('http://nodejs.org/images/logo.png', function(response) {
+ form.append('my_field', 'my value');
+ form.append('my_buffer', new Buffer(10));
+ form.append('my_logo', response);
+});
+```
+
+Or @mikeal's [request](https://github.com/request/request) stream:
+
+``` javascript
+var FormData = require('form-data');
+var request = require('request');
+
+var form = new FormData();
+
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_logo', request('http://nodejs.org/images/logo.png'));
+```
+
+In order to submit this form to a web application, call ```submit(url, [callback])``` method:
+
+``` javascript
+form.submit('http://example.org/', function(err, res) {
+ // res – response object (http.IncomingMessage) //
+ res.resume();
+});
+
+```
+
+For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
+
+### Alternative submission methods
+
+You can use node's http client interface:
+
+``` javascript
+var http = require('http');
+
+var request = http.request({
+ method: 'post',
+ host: 'example.org',
+ path: '/upload',
+ headers: form.getHeaders()
+});
+
+form.pipe(request);
+
+request.on('response', function(res) {
+ console.log(res.statusCode);
+});
+```
+
+Or if you would prefer the `'Content-Length'` header to be set for you:
+
+``` javascript
+form.submit('example.org/upload', function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+To use custom headers and pre-known length in parts:
+
+``` javascript
+var CRLF = '\r\n';
+var form = new FormData();
+
+var options = {
+ header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
+ knownLength: 1
+};
+
+form.append('my_buffer', buffer, options);
+
+form.submit('http://example.com/', function(err, res) {
+ if (err) throw err;
+ console.log('Done');
+});
+```
+
+Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
+
+``` javascript
+someModule.stream(function(err, stdout, stderr) {
+ if (err) throw err;
+
+ var form = new FormData();
+
+ form.append('file', stdout, {
+ filename: 'unicycle.jpg',
+ contentType: 'image/jpg',
+ knownLength: 19806
+ });
+
+ form.submit('http://example.com/', function(err, res) {
+ if (err) throw err;
+ console.log('Done');
+ });
+});
+```
+
+For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
+
+``` javascript
+form.submit({
+ host: 'example.com',
+ path: '/probably.php?extra=params',
+ auth: 'username:password'
+}, function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
+
+``` javascript
+form.submit({
+ host: 'example.com',
+ path: '/surelynot.php',
+ headers: {'x-test-header': 'test-header-value'}
+}, function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+### Integration with other libraries
+
+#### Request
+
+Form submission using [request](https://github.com/request/request):
+
+```javascript
+var formData = {
+ my_field: 'my_value',
+ my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
+};
+
+request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {
+ if (err) {
+ return console.error('upload failed:', err);
+ }
+ console.log('Upload successful! Server responded with:', body);
+});
+```
+
+For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).
+
+#### node-fetch
+
+You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):
+
+```javascript
+var form = new FormData();
+
+form.append('a', 1);
+
+fetch('http://example.com', { method: 'POST', body: form })
+ .then(function(res) {
+ return res.json();
+ }).then(function(json) {
+ console.log(json);
+ });
+```
+
+## Notes
+
+- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
+- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]
+
+## License
+
+Form-Data is licensed under the MIT license.
diff --git a/source/node_modules/form-data/lib/browser.js b/source/node_modules/form-data/lib/browser.js
new file mode 100644
index 000000000..1e7717d56
--- /dev/null
+++ b/source/node_modules/form-data/lib/browser.js
@@ -0,0 +1 @@
+module.exports = FormData;
\ No newline at end of file
diff --git a/source/node_modules/form-data/lib/form_data.js b/source/node_modules/form-data/lib/form_data.js
new file mode 100644
index 000000000..524f392b4
--- /dev/null
+++ b/source/node_modules/form-data/lib/form_data.js
@@ -0,0 +1,374 @@
+var CombinedStream = require('combined-stream');
+var util = require('util');
+var path = require('path');
+var http = require('http');
+var https = require('https');
+var parseUrl = require('url').parse;
+var fs = require('fs');
+var mime = require('mime-types');
+var async = require('async');
+
+module.exports = FormData;
+function FormData() {
+ this._overheadLength = 0;
+ this._valueLength = 0;
+ this._lengthRetrievers = [];
+
+ CombinedStream.call(this);
+}
+util.inherits(FormData, CombinedStream);
+
+FormData.LINE_BREAK = '\r\n';
+FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
+
+FormData.prototype.append = function(field, value, options) {
+ options = (typeof options === 'string')
+ ? { filename: options }
+ : options || {};
+
+ var append = CombinedStream.prototype.append.bind(this);
+
+ // all that streamy business can't handle numbers
+ if (typeof value == 'number') value = ''+value;
+
+ // https://github.com/felixge/node-form-data/issues/38
+ if (util.isArray(value)) {
+ // Please convert your array into string
+ // the way web server expects it
+ this._error(new Error('Arrays are not supported.'));
+ return;
+ }
+
+ var header = this._multiPartHeader(field, value, options);
+ var footer = this._multiPartFooter(field, value, options);
+
+ append(header);
+ append(value);
+ append(footer);
+
+ // pass along options.knownLength
+ this._trackLength(header, value, options);
+};
+
+FormData.prototype._trackLength = function(header, value, options) {
+ var valueLength = 0;
+
+ // used w/ getLengthSync(), when length is known.
+ // e.g. for streaming directly from a remote server,
+ // w/ a known file a size, and not wanting to wait for
+ // incoming file to finish to get its size.
+ if (options.knownLength != null) {
+ valueLength += +options.knownLength;
+ } else if (Buffer.isBuffer(value)) {
+ valueLength = value.length;
+ } else if (typeof value === 'string') {
+ valueLength = Buffer.byteLength(value);
+ }
+
+ this._valueLength += valueLength;
+
+ // @check why add CRLF? does this account for custom/multiple CRLFs?
+ this._overheadLength +=
+ Buffer.byteLength(header) +
+ FormData.LINE_BREAK.length;
+
+ // empty or either doesn't have path or not an http response
+ if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
+ return;
+ }
+
+ // no need to bother with the length
+ if (!options.knownLength)
+ this._lengthRetrievers.push(function(next) {
+
+ if (value.hasOwnProperty('fd')) {
+
+ // take read range into a account
+ // `end` = Infinity –> read file till the end
+ //
+ // TODO: Looks like there is bug in Node fs.createReadStream
+ // it doesn't respect `end` options without `start` options
+ // Fix it when node fixes it.
+ // https://github.com/joyent/node/issues/7819
+ if (value.end != undefined && value.end != Infinity && value.start != undefined) {
+
+ // when end specified
+ // no need to calculate range
+ // inclusive, starts with 0
+ next(null, value.end+1 - (value.start ? value.start : 0));
+
+ // not that fast snoopy
+ } else {
+ // still need to fetch file size from fs
+ fs.stat(value.path, function(err, stat) {
+
+ var fileSize;
+
+ if (err) {
+ next(err);
+ return;
+ }
+
+ // update final size based on the range options
+ fileSize = stat.size - (value.start ? value.start : 0);
+ next(null, fileSize);
+ });
+ }
+
+ // or http response
+ } else if (value.hasOwnProperty('httpVersion')) {
+ next(null, +value.headers['content-length']);
+
+ // or request stream http://github.com/mikeal/request
+ } else if (value.hasOwnProperty('httpModule')) {
+ // wait till response come back
+ value.on('response', function(response) {
+ value.pause();
+ next(null, +response.headers['content-length']);
+ });
+ value.resume();
+
+ // something else
+ } else {
+ next('Unknown stream');
+ }
+ });
+};
+
+FormData.prototype._multiPartHeader = function(field, value, options) {
+ // custom header specified (as string)?
+ // it becomes responsible for boundary
+ // (e.g. to handle extra CRLFs on .NET servers)
+ if (options.header != null) {
+ return options.header;
+ }
+
+ var contents = '';
+ var headers = {
+ 'Content-Disposition': ['form-data', 'name="' + field + '"'],
+ 'Content-Type': []
+ };
+
+ // fs- and request- streams have path property
+ // or use custom filename and/or contentType
+ // TODO: Use request's response mime-type
+ if (options.filename || value.path) {
+ headers['Content-Disposition'].push(
+ 'filename="' + path.basename(options.filename || value.path) + '"'
+ );
+ headers['Content-Type'].push(
+ options.contentType ||
+ mime.lookup(options.filename || value.path) ||
+ FormData.DEFAULT_CONTENT_TYPE
+ );
+ // http response has not
+ } else if (value.readable && value.hasOwnProperty('httpVersion')) {
+ headers['Content-Disposition'].push(
+ 'filename="' + path.basename(value.client._httpMessage.path) + '"'
+ );
+ headers['Content-Type'].push(
+ options.contentType ||
+ value.headers['content-type'] ||
+ FormData.DEFAULT_CONTENT_TYPE
+ );
+ } else if (Buffer.isBuffer(value)) {
+ headers['Content-Type'].push(
+ options.contentType ||
+ FormData.DEFAULT_CONTENT_TYPE
+ );
+ } else if (options.contentType) {
+ headers['Content-Type'].push(options.contentType);
+ }
+
+ for (var prop in headers) {
+ if (headers[prop].length) {
+ contents += prop + ': ' + headers[prop].join('; ') + FormData.LINE_BREAK;
+ }
+ }
+
+ return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
+};
+
+FormData.prototype._multiPartFooter = function(field, value, options) {
+ return function(next) {
+ var footer = FormData.LINE_BREAK;
+
+ var lastPart = (this._streams.length === 0);
+ if (lastPart) {
+ footer += this._lastBoundary();
+ }
+
+ next(footer);
+ }.bind(this);
+};
+
+FormData.prototype._lastBoundary = function() {
+ return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
+};
+
+FormData.prototype.getHeaders = function(userHeaders) {
+ var formHeaders = {
+ 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
+ };
+
+ for (var header in userHeaders) {
+ formHeaders[header.toLowerCase()] = userHeaders[header];
+ }
+
+ return formHeaders;
+}
+
+FormData.prototype.getCustomHeaders = function(contentType) {
+ contentType = contentType ? contentType : 'multipart/form-data';
+
+ var formHeaders = {
+ 'content-type': contentType + '; boundary=' + this.getBoundary(),
+ 'content-length': this.getLengthSync()
+ };
+
+ return formHeaders;
+}
+
+FormData.prototype.getBoundary = function() {
+ if (!this._boundary) {
+ this._generateBoundary();
+ }
+
+ return this._boundary;
+};
+
+FormData.prototype._generateBoundary = function() {
+ // This generates a 50 character boundary similar to those used by Firefox.
+ // They are optimized for boyer-moore parsing.
+ var boundary = '--------------------------';
+ for (var i = 0; i < 24; i++) {
+ boundary += Math.floor(Math.random() * 10).toString(16);
+ }
+
+ this._boundary = boundary;
+};
+
+// Note: getLengthSync DOESN'T calculate streams length
+// As workaround one can calculate file size manually
+// and add it as knownLength option
+FormData.prototype.getLengthSync = function(debug) {
+ var knownLength = this._overheadLength + this._valueLength;
+
+ // Don't get confused, there are 3 "internal" streams for each keyval pair
+ // so it basically checks if there is any value added to the form
+ if (this._streams.length) {
+ knownLength += this._lastBoundary().length;
+ }
+
+ // https://github.com/felixge/node-form-data/issues/40
+ if (this._lengthRetrievers.length) {
+ // Some async length retrivers are present
+ // therefore synchronous length calculation is false.
+ // Please use getLength(callback) to get proper length
+ this._error(new Error('Cannot calculate proper length in synchronous way.'));
+ }
+
+ return knownLength;
+};
+
+FormData.prototype.getLength = function(cb) {
+ var knownLength = this._overheadLength + this._valueLength;
+
+ if (this._streams.length) {
+ knownLength += this._lastBoundary().length;
+ }
+
+ if (!this._lengthRetrievers.length) {
+ process.nextTick(cb.bind(this, null, knownLength));
+ return;
+ }
+
+ async.parallel(this._lengthRetrievers, function(err, values) {
+ if (err) {
+ cb(err);
+ return;
+ }
+
+ values.forEach(function(length) {
+ knownLength += length;
+ });
+
+ cb(null, knownLength);
+ });
+};
+
+FormData.prototype.submit = function(params, cb) {
+
+ var request
+ , options
+ , defaults = {
+ method : 'post'
+ };
+
+ // parse provided url if it's string
+ // or treat it as options object
+ if (typeof params == 'string') {
+ params = parseUrl(params);
+
+ options = populate({
+ port: params.port,
+ path: params.pathname,
+ host: params.hostname
+ }, defaults);
+ }
+ else // use custom params
+ {
+ options = populate(params, defaults);
+ // if no port provided use default one
+ if (!options.port) {
+ options.port = options.protocol == 'https:' ? 443 : 80;
+ }
+ }
+
+ // put that good code in getHeaders to some use
+ options.headers = this.getHeaders(params.headers);
+
+ // https if specified, fallback to http in any other case
+ if (options.protocol == 'https:') {
+ request = https.request(options);
+ } else {
+ request = http.request(options);
+ }
+
+ // get content length and fire away
+ this.getLength(function(err, length) {
+
+ // TODO: Add chunked encoding when no length (if err)
+
+ // add content length
+ request.setHeader('Content-Length', length);
+
+ this.pipe(request);
+ if (cb) {
+ request.on('error', cb);
+ request.on('response', cb.bind(this, null));
+ }
+ }.bind(this));
+
+ return request;
+};
+
+FormData.prototype._error = function(err) {
+ if (this.error) return;
+
+ this.error = err;
+ this.pause();
+ this.emit('error', err);
+};
+
+/*
+ * Santa's little helpers
+ */
+
+// populates missing values
+function populate(dst, src) {
+ for (var prop in src) {
+ if (!dst[prop]) dst[prop] = src[prop];
+ }
+ return dst;
+}
diff --git a/source/node_modules/form-data/package.json b/source/node_modules/form-data/package.json
new file mode 100644
index 000000000..2ff4e6d28
--- /dev/null
+++ b/source/node_modules/form-data/package.json
@@ -0,0 +1,110 @@
+{
+ "_args": [
+ [
+ "form-data@~1.0.0-rc3",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request"
+ ]
+ ],
+ "_from": "form-data@>=1.0.0-rc3 <1.1.0",
+ "_id": "form-data@1.0.0-rc3",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/form-data",
+ "_nodeVersion": "2.2.1",
+ "_npmUser": {
+ "email": "pierceydylan@gmail.com",
+ "name": "dylanpiercey"
+ },
+ "_npmVersion": "2.11.0",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "form-data",
+ "raw": "form-data@~1.0.0-rc3",
+ "rawSpec": "~1.0.0-rc3",
+ "scope": null,
+ "spec": ">=1.0.0-rc3 <1.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz",
+ "_shasum": "d35bc62e7fbc2937ae78f948aaa0d38d90607577",
+ "_shrinkwrap": null,
+ "_spec": "form-data@~1.0.0-rc3",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request",
+ "author": {
+ "email": "felix@debuggable.com",
+ "name": "Felix Geisendörfer",
+ "url": "http://debuggable.com/"
+ },
+ "browser": "./lib/browser",
+ "bugs": {
+ "url": "https://github.com/form-data/form-data/issues"
+ },
+ "dependencies": {
+ "async": "^1.4.0",
+ "combined-stream": "^1.0.5",
+ "mime-types": "^2.1.3"
+ },
+ "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
+ "devDependencies": {
+ "fake": "^0.2.2",
+ "far": "^0.0.7",
+ "formidable": "^1.0.17",
+ "pre-commit": "^1.0.10",
+ "request": "^2.60.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d35bc62e7fbc2937ae78f948aaa0d38d90607577",
+ "tarball": "http://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "gitHead": "c174f1b7f3a78a00ec5af0360469280445e37804",
+ "homepage": "https://github.com/form-data/form-data#readme",
+ "license": "MIT",
+ "main": "./lib/form_data",
+ "maintainers": [
+ {
+ "name": "felixge",
+ "email": "felix@debuggable.com"
+ },
+ {
+ "name": "idralyuk",
+ "email": "igor@buran.us"
+ },
+ {
+ "name": "alexindigo",
+ "email": "iam@alexindigo.com"
+ },
+ {
+ "name": "mikeal",
+ "email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "celer",
+ "email": "dtyree77@gmail.com"
+ },
+ {
+ "name": "dylanpiercey",
+ "email": "pierceydylan@gmail.com"
+ }
+ ],
+ "name": "form-data",
+ "optionalDependencies": {},
+ "pre-commit": [
+ "test"
+ ],
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/form-data/form-data.git"
+ },
+ "scripts": {
+ "test": "./test/run.js"
+ },
+ "version": "1.0.0-rc3"
+}
diff --git a/source/node_modules/fstream/.npmignore b/source/node_modules/fstream/.npmignore
new file mode 100644
index 000000000..494272a81
--- /dev/null
+++ b/source/node_modules/fstream/.npmignore
@@ -0,0 +1,5 @@
+.*.swp
+node_modules/
+examples/deep-copy/
+examples/path/
+examples/filter-copy/
diff --git a/source/node_modules/fstream/.travis.yml b/source/node_modules/fstream/.travis.yml
new file mode 100644
index 000000000..a092c82b2
--- /dev/null
+++ b/source/node_modules/fstream/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - iojs
+ - 0.12
+ - 0.10
+ - 0.8
+before_install:
+ - "npm config set spin false"
+ - "npm install -g npm/npm"
diff --git a/source/node_modules/fstream/LICENSE b/source/node_modules/fstream/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/source/node_modules/fstream/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/fstream/README.md b/source/node_modules/fstream/README.md
new file mode 100644
index 000000000..9d8cb77e5
--- /dev/null
+++ b/source/node_modules/fstream/README.md
@@ -0,0 +1,76 @@
+Like FS streams, but with stat on them, and supporting directories and
+symbolic links, as well as normal files. Also, you can use this to set
+the stats on a file, even if you don't change its contents, or to create
+a symlink, etc.
+
+So, for example, you can "write" a directory, and it'll call `mkdir`. You
+can specify a uid and gid, and it'll call `chown`. You can specify a
+`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink
+and provide a `linkpath` and it'll call `symlink`.
+
+Note that it won't automatically resolve symbolic links. So, if you
+call `fstream.Reader('/some/symlink')` then you'll get an object
+that stats and then ends immediately (since it has no data). To follow
+symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:
+true })`.
+
+There are various checks to make sure that the bytes emitted are the
+same as the intended size, if the size is set.
+
+## Examples
+
+```javascript
+fstream
+ .Writer({ path: "path/to/file"
+ , mode: 0755
+ , size: 6
+ })
+ .write("hello\n")
+ .end()
+```
+
+This will create the directories if they're missing, and then write
+`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have
+been written when it's done.
+
+```javascript
+fstream
+ .Writer({ path: "path/to/file"
+ , mode: 0755
+ , size: 6
+ , flags: "a"
+ })
+ .write("hello\n")
+ .end()
+```
+
+You can pass flags in, if you want to append to a file.
+
+```javascript
+fstream
+ .Writer({ path: "path/to/symlink"
+ , linkpath: "./file"
+ , SymbolicLink: true
+ , mode: "0755" // octal strings supported
+ })
+ .end()
+```
+
+If isSymbolicLink is a function, it'll be called, and if it returns
+true, then it'll treat it as a symlink. If it's not a function, then
+any truish value will make a symlink, or you can set `type:
+'SymbolicLink'`, which does the same thing.
+
+Note that the linkpath is relative to the symbolic link location, not
+the parent dir or cwd.
+
+```javascript
+fstream
+ .Reader("path/to/dir")
+ .pipe(fstream.Writer("path/to/other/dir"))
+```
+
+This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other
+dir exists and isn't a directory, then it'll emit an error. It'll also
+set the uid, gid, mode, etc. to be identical. In this way, it's more
+like `rsync -a` than simply a copy.
diff --git a/source/node_modules/fstream/examples/filter-pipe.js b/source/node_modules/fstream/examples/filter-pipe.js
new file mode 100644
index 000000000..83dadef8a
--- /dev/null
+++ b/source/node_modules/fstream/examples/filter-pipe.js
@@ -0,0 +1,134 @@
+var fstream = require('../fstream.js')
+var path = require('path')
+
+var r = fstream.Reader({
+ path: path.dirname(__dirname),
+ filter: function () {
+ return !this.basename.match(/^\./) &&
+ !this.basename.match(/^node_modules$/) &&
+ !this.basename.match(/^deep-copy$/) &&
+ !this.basename.match(/^filter-copy$/)
+ }
+})
+
+// this writer will only write directories
+var w = fstream.Writer({
+ path: path.resolve(__dirname, 'filter-copy'),
+ type: 'Directory',
+ filter: function () {
+ return this.type === 'Directory'
+ }
+})
+
+var indent = ''
+
+r.on('entry', appears)
+r.on('ready', function () {
+ console.error('ready to begin!', r.path)
+})
+
+function appears (entry) {
+ console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename)
+ if (foggy) {
+ console.error('FOGGY!')
+ var p = entry
+ do {
+ console.error(p.depth, p.path, p._paused)
+ p = p.parent
+ } while (p)
+
+ throw new Error('\u001b[mshould not have entries while foggy')
+ }
+ indent += '\t'
+ entry.on('data', missile(entry))
+ entry.on('end', runaway(entry))
+ entry.on('entry', appears)
+}
+
+var foggy
+function missile (entry) {
+ function liftFog (who) {
+ if (!foggy) return
+ if (who) {
+ console.error('%s breaks the spell!', who && who.path)
+ } else {
+ console.error('the spell expires!')
+ }
+ console.error('\u001b[mthe fog lifts!\n')
+ clearTimeout(foggy)
+ foggy = null
+ if (entry._paused) entry.resume()
+ }
+
+ if (entry.type === 'Directory') {
+ var ended = false
+ entry.once('end', function () { ended = true })
+ return function (c) {
+ // throw in some pathological pause()/resume() behavior
+ // just for extra fun.
+ process.nextTick(function () {
+ if (!foggy && !ended) { // && Math.random() < 0.3) {
+ console.error(indent + '%s casts a spell', entry.basename)
+ console.error('\na slowing fog comes over the battlefield...\n\u001b[32m')
+ entry.pause()
+ entry.once('resume', liftFog)
+ foggy = setTimeout(liftFog, 1000)
+ }
+ })
+ }
+ }
+
+ return function (c) {
+ var e = Math.random() < 0.5
+ console.error(indent + '%s %s for %d damage!',
+ entry.basename,
+ e ? 'is struck' : 'fires a chunk',
+ c.length)
+ }
+}
+
+function runaway (entry) {
+ return function () {
+ var e = Math.random() < 0.5
+ console.error(indent + '%s %s',
+ entry.basename,
+ e ? 'turns to flee' : 'is vanquished!')
+ indent = indent.slice(0, -1)
+ }
+}
+
+w.on('entry', attacks)
+// w.on('ready', function () { attacks(w) })
+function attacks (entry) {
+ console.error(indent + '%s %s!', entry.basename,
+ entry.type === 'Directory' ? 'calls for backup' : 'attacks')
+ entry.on('entry', attacks)
+}
+
+var ended = false
+var i = 1
+r.on('end', function () {
+ if (foggy) clearTimeout(foggy)
+ console.error("\u001b[mIT'S OVER!!")
+ console.error('A WINNAR IS YOU!')
+
+ console.log('ok ' + (i++) + ' A WINNAR IS YOU')
+ ended = true
+ // now go through and verify that everything in there is a dir.
+ var p = path.resolve(__dirname, 'filter-copy')
+ var checker = fstream.Reader({ path: p })
+ checker.checker = true
+ checker.on('child', function (e) {
+ var ok = e.type === 'Directory'
+ console.log((ok ? '' : 'not ') + 'ok ' + (i++) +
+ ' should be a dir: ' +
+ e.path.substr(checker.path.length + 1))
+ })
+})
+
+process.on('exit', function () {
+ console.log((ended ? '' : 'not ') + 'ok ' + (i) + ' ended')
+ console.log('1..' + i)
+})
+
+r.pipe(w)
diff --git a/source/node_modules/fstream/examples/pipe.js b/source/node_modules/fstream/examples/pipe.js
new file mode 100644
index 000000000..3de42ef32
--- /dev/null
+++ b/source/node_modules/fstream/examples/pipe.js
@@ -0,0 +1,118 @@
+var fstream = require('../fstream.js')
+var path = require('path')
+
+var r = fstream.Reader({
+ path: path.dirname(__dirname),
+ filter: function () {
+ return !this.basename.match(/^\./) &&
+ !this.basename.match(/^node_modules$/) &&
+ !this.basename.match(/^deep-copy$/)
+ }
+})
+
+var w = fstream.Writer({
+ path: path.resolve(__dirname, 'deep-copy'),
+ type: 'Directory'
+})
+
+var indent = ''
+
+r.on('entry', appears)
+r.on('ready', function () {
+ console.error('ready to begin!', r.path)
+})
+
+function appears (entry) {
+ console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename, entry)
+ if (foggy) {
+ console.error('FOGGY!')
+ var p = entry
+ do {
+ console.error(p.depth, p.path, p._paused)
+ p = p.parent
+ } while (p)
+
+ throw new Error('\u001b[mshould not have entries while foggy')
+ }
+ indent += '\t'
+ entry.on('data', missile(entry))
+ entry.on('end', runaway(entry))
+ entry.on('entry', appears)
+}
+
+var foggy
+function missile (entry) {
+ function liftFog (who) {
+ if (!foggy) return
+ if (who) {
+ console.error('%s breaks the spell!', who && who.path)
+ } else {
+ console.error('the spell expires!')
+ }
+ console.error('\u001b[mthe fog lifts!\n')
+ clearTimeout(foggy)
+ foggy = null
+ if (entry._paused) entry.resume()
+ }
+
+ if (entry.type === 'Directory') {
+ var ended = false
+ entry.once('end', function () { ended = true })
+ return function (c) {
+ // throw in some pathological pause()/resume() behavior
+ // just for extra fun.
+ process.nextTick(function () {
+ if (!foggy && !ended) { // && Math.random() < 0.3) {
+ console.error(indent + '%s casts a spell', entry.basename)
+ console.error('\na slowing fog comes over the battlefield...\n\u001b[32m')
+ entry.pause()
+ entry.once('resume', liftFog)
+ foggy = setTimeout(liftFog, 10)
+ }
+ })
+ }
+ }
+
+ return function (c) {
+ var e = Math.random() < 0.5
+ console.error(indent + '%s %s for %d damage!',
+ entry.basename,
+ e ? 'is struck' : 'fires a chunk',
+ c.length)
+ }
+}
+
+function runaway (entry) {
+ return function () {
+ var e = Math.random() < 0.5
+ console.error(indent + '%s %s',
+ entry.basename,
+ e ? 'turns to flee' : 'is vanquished!')
+ indent = indent.slice(0, -1)
+ }
+}
+
+w.on('entry', attacks)
+// w.on('ready', function () { attacks(w) })
+function attacks (entry) {
+ console.error(indent + '%s %s!', entry.basename,
+ entry.type === 'Directory' ? 'calls for backup' : 'attacks')
+ entry.on('entry', attacks)
+}
+
+var ended = false
+r.on('end', function () {
+ if (foggy) clearTimeout(foggy)
+ console.error("\u001b[mIT'S OVER!!")
+ console.error('A WINNAR IS YOU!')
+
+ console.log('ok 1 A WINNAR IS YOU')
+ ended = true
+})
+
+process.on('exit', function () {
+ console.log((ended ? '' : 'not ') + 'ok 2 ended')
+ console.log('1..2')
+})
+
+r.pipe(w)
diff --git a/source/node_modules/fstream/examples/reader.js b/source/node_modules/fstream/examples/reader.js
new file mode 100644
index 000000000..19affbe7e
--- /dev/null
+++ b/source/node_modules/fstream/examples/reader.js
@@ -0,0 +1,68 @@
+var fstream = require('../fstream.js')
+var tap = require('tap')
+var fs = require('fs')
+var path = require('path')
+var dir = path.dirname(__dirname)
+
+tap.test('reader test', function (t) {
+ var children = -1
+ var gotReady = false
+ var ended = false
+
+ var r = fstream.Reader({
+ path: dir,
+ filter: function () {
+ // return this.parent === r
+ return this.parent === r || this === r
+ }
+ })
+
+ r.on('ready', function () {
+ gotReady = true
+ children = fs.readdirSync(dir).length
+ console.error('Setting expected children to ' + children)
+ t.equal(r.type, 'Directory', 'should be a directory')
+ })
+
+ r.on('entry', function (entry) {
+ children--
+ if (!gotReady) {
+ t.fail('children before ready!')
+ }
+ t.equal(entry.dirname, r.path, 'basename is parent dir')
+ })
+
+ r.on('error', function (er) {
+ t.fail(er)
+ t.end()
+ process.exit(1)
+ })
+
+ r.on('end', function () {
+ t.equal(children, 0, 'should have seen all children')
+ ended = true
+ })
+
+ var closed = false
+ r.on('close', function () {
+ t.ok(ended, 'saw end before close')
+ t.notOk(closed, 'close should only happen once')
+ closed = true
+ t.end()
+ })
+})
+
+tap.test('reader error test', function (t) {
+ // assumes non-root on a *nix system
+ var r = fstream.Reader({ path: '/etc/shadow' })
+
+ r.once('error', function (er) {
+ t.ok(true)
+ t.end()
+ })
+
+ r.on('end', function () {
+ t.fail('reader ended without error')
+ t.end()
+ })
+})
diff --git a/source/node_modules/fstream/examples/symlink-write.js b/source/node_modules/fstream/examples/symlink-write.js
new file mode 100644
index 000000000..19e81eea9
--- /dev/null
+++ b/source/node_modules/fstream/examples/symlink-write.js
@@ -0,0 +1,27 @@
+var fstream = require('../fstream.js')
+var notOpen = false
+process.chdir(__dirname)
+
+fstream
+ .Writer({
+ path: 'path/to/symlink',
+ linkpath: './file',
+ isSymbolicLink: true,
+ mode: '0755' // octal strings supported
+ })
+ .on('close', function () {
+ notOpen = true
+ var fs = require('fs')
+ var s = fs.lstatSync('path/to/symlink')
+ var isSym = s.isSymbolicLink()
+ console.log((isSym ? '' : 'not ') + 'ok 1 should be symlink')
+ var t = fs.readlinkSync('path/to/symlink')
+ var isTarget = t === './file'
+ console.log((isTarget ? '' : 'not ') + 'ok 2 should link to ./file')
+ })
+ .end()
+
+process.on('exit', function () {
+ console.log((notOpen ? '' : 'not ') + 'ok 3 should be closed')
+ console.log('1..3')
+})
diff --git a/source/node_modules/fstream/fstream.js b/source/node_modules/fstream/fstream.js
new file mode 100644
index 000000000..c0eb3bea7
--- /dev/null
+++ b/source/node_modules/fstream/fstream.js
@@ -0,0 +1,35 @@
+exports.Abstract = require('./lib/abstract.js')
+exports.Reader = require('./lib/reader.js')
+exports.Writer = require('./lib/writer.js')
+
+exports.File = {
+ Reader: require('./lib/file-reader.js'),
+ Writer: require('./lib/file-writer.js')
+}
+
+exports.Dir = {
+ Reader: require('./lib/dir-reader.js'),
+ Writer: require('./lib/dir-writer.js')
+}
+
+exports.Link = {
+ Reader: require('./lib/link-reader.js'),
+ Writer: require('./lib/link-writer.js')
+}
+
+exports.Proxy = {
+ Reader: require('./lib/proxy-reader.js'),
+ Writer: require('./lib/proxy-writer.js')
+}
+
+exports.Reader.Dir = exports.DirReader = exports.Dir.Reader
+exports.Reader.File = exports.FileReader = exports.File.Reader
+exports.Reader.Link = exports.LinkReader = exports.Link.Reader
+exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader
+
+exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer
+exports.Writer.File = exports.FileWriter = exports.File.Writer
+exports.Writer.Link = exports.LinkWriter = exports.Link.Writer
+exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer
+
+exports.collect = require('./lib/collect.js')
diff --git a/source/node_modules/fstream/lib/abstract.js b/source/node_modules/fstream/lib/abstract.js
new file mode 100644
index 000000000..97c120e1d
--- /dev/null
+++ b/source/node_modules/fstream/lib/abstract.js
@@ -0,0 +1,85 @@
+// the parent class for all fstreams.
+
+module.exports = Abstract
+
+var Stream = require('stream').Stream
+var inherits = require('inherits')
+
+function Abstract () {
+ Stream.call(this)
+}
+
+inherits(Abstract, Stream)
+
+Abstract.prototype.on = function (ev, fn) {
+ if (ev === 'ready' && this.ready) {
+ process.nextTick(fn.bind(this))
+ } else {
+ Stream.prototype.on.call(this, ev, fn)
+ }
+ return this
+}
+
+Abstract.prototype.abort = function () {
+ this._aborted = true
+ this.emit('abort')
+}
+
+Abstract.prototype.destroy = function () {}
+
+Abstract.prototype.warn = function (msg, code) {
+ var self = this
+ var er = decorate(msg, code, self)
+ if (!self.listeners('warn')) {
+ console.error('%s %s\n' +
+ 'path = %s\n' +
+ 'syscall = %s\n' +
+ 'fstream_type = %s\n' +
+ 'fstream_path = %s\n' +
+ 'fstream_unc_path = %s\n' +
+ 'fstream_class = %s\n' +
+ 'fstream_stack =\n%s\n',
+ code || 'UNKNOWN',
+ er.stack,
+ er.path,
+ er.syscall,
+ er.fstream_type,
+ er.fstream_path,
+ er.fstream_unc_path,
+ er.fstream_class,
+ er.fstream_stack.join('\n'))
+ } else {
+ self.emit('warn', er)
+ }
+}
+
+Abstract.prototype.info = function (msg, code) {
+ this.emit('info', msg, code)
+}
+
+Abstract.prototype.error = function (msg, code, th) {
+ var er = decorate(msg, code, this)
+ if (th) throw er
+ else this.emit('error', er)
+}
+
+function decorate (er, code, self) {
+ if (!(er instanceof Error)) er = new Error(er)
+ er.code = er.code || code
+ er.path = er.path || self.path
+ er.fstream_type = er.fstream_type || self.type
+ er.fstream_path = er.fstream_path || self.path
+ if (self._path !== self.path) {
+ er.fstream_unc_path = er.fstream_unc_path || self._path
+ }
+ if (self.linkpath) {
+ er.fstream_linkpath = er.fstream_linkpath || self.linkpath
+ }
+ er.fstream_class = er.fstream_class || self.constructor.name
+ er.fstream_stack = er.fstream_stack ||
+ new Error().stack.split(/\n/).slice(3).map(function (s) {
+ return s.replace(/^ {4}at /, '')
+ })
+
+ return er
+}
diff --git a/source/node_modules/fstream/lib/collect.js b/source/node_modules/fstream/lib/collect.js
new file mode 100644
index 000000000..6245e6ce4
--- /dev/null
+++ b/source/node_modules/fstream/lib/collect.js
@@ -0,0 +1,68 @@
+module.exports = collect
+
+function collect (stream) {
+ if (stream._collected) return
+
+ stream._collected = true
+ stream.pause()
+
+ stream.on('data', save)
+ stream.on('end', save)
+ var buf = []
+ function save (b) {
+ if (typeof b === 'string') b = new Buffer(b)
+ if (Buffer.isBuffer(b) && !b.length) return
+ buf.push(b)
+ }
+
+ stream.on('entry', saveEntry)
+ var entryBuffer = []
+ function saveEntry (e) {
+ collect(e)
+ entryBuffer.push(e)
+ }
+
+ stream.on('proxy', proxyPause)
+ function proxyPause (p) {
+ p.pause()
+ }
+
+ // replace the pipe method with a new version that will
+ // unlock the buffered stuff. if you just call .pipe()
+ // without a destination, then it'll re-play the events.
+ stream.pipe = (function (orig) {
+ return function (dest) {
+ // console.error(' === open the pipes', dest && dest.path)
+
+ // let the entries flow through one at a time.
+ // Once they're all done, then we can resume completely.
+ var e = 0
+ ;(function unblockEntry () {
+ var entry = entryBuffer[e++]
+ // console.error(" ==== unblock entry", entry && entry.path)
+ if (!entry) return resume()
+ entry.on('end', unblockEntry)
+ if (dest) dest.add(entry)
+ else stream.emit('entry', entry)
+ })()
+
+ function resume () {
+ stream.removeListener('entry', saveEntry)
+ stream.removeListener('data', save)
+ stream.removeListener('end', save)
+
+ stream.pipe = orig
+ if (dest) stream.pipe(dest)
+
+ buf.forEach(function (b) {
+ if (b) stream.emit('data', b)
+ else stream.emit('end')
+ })
+
+ stream.resume()
+ }
+
+ return dest
+ }
+ })(stream.pipe)
+}
diff --git a/source/node_modules/fstream/lib/dir-reader.js b/source/node_modules/fstream/lib/dir-reader.js
new file mode 100644
index 000000000..820cdc85a
--- /dev/null
+++ b/source/node_modules/fstream/lib/dir-reader.js
@@ -0,0 +1,252 @@
+// A thing that emits "entry" events with Reader objects
+// Pausing it causes it to stop emitting entry events, and also
+// pauses the current entry if there is one.
+
+module.exports = DirReader
+
+var fs = require('graceful-fs')
+var inherits = require('inherits')
+var path = require('path')
+var Reader = require('./reader.js')
+var assert = require('assert').ok
+
+inherits(DirReader, Reader)
+
+function DirReader (props) {
+ var self = this
+ if (!(self instanceof DirReader)) {
+ throw new Error('DirReader must be called as constructor.')
+ }
+
+ // should already be established as a Directory type
+ if (props.type !== 'Directory' || !props.Directory) {
+ throw new Error('Non-directory type ' + props.type)
+ }
+
+ self.entries = null
+ self._index = -1
+ self._paused = false
+ self._length = -1
+
+ if (props.sort) {
+ this.sort = props.sort
+ }
+
+ Reader.call(this, props)
+}
+
+DirReader.prototype._getEntries = function () {
+ var self = this
+
+ // race condition. might pause() before calling _getEntries,
+ // and then resume, and try to get them a second time.
+ if (self._gotEntries) return
+ self._gotEntries = true
+
+ fs.readdir(self._path, function (er, entries) {
+ if (er) return self.error(er)
+
+ self.entries = entries
+
+ self.emit('entries', entries)
+ if (self._paused) self.once('resume', processEntries)
+ else processEntries()
+
+ function processEntries () {
+ self._length = self.entries.length
+ if (typeof self.sort === 'function') {
+ self.entries = self.entries.sort(self.sort.bind(self))
+ }
+ self._read()
+ }
+ })
+}
+
+// start walking the dir, and emit an "entry" event for each one.
+DirReader.prototype._read = function () {
+ var self = this
+
+ if (!self.entries) return self._getEntries()
+
+ if (self._paused || self._currentEntry || self._aborted) {
+ // console.error('DR paused=%j, current=%j, aborted=%j', self._paused, !!self._currentEntry, self._aborted)
+ return
+ }
+
+ self._index++
+ if (self._index >= self.entries.length) {
+ if (!self._ended) {
+ self._ended = true
+ self.emit('end')
+ self.emit('close')
+ }
+ return
+ }
+
+ // ok, handle this one, then.
+
+ // save creating a proxy, by stat'ing the thing now.
+ var p = path.resolve(self._path, self.entries[self._index])
+ assert(p !== self._path)
+ assert(self.entries[self._index])
+
+ // set this to prevent trying to _read() again in the stat time.
+ self._currentEntry = p
+ fs[ self.props.follow ? 'stat' : 'lstat' ](p, function (er, stat) {
+ if (er) return self.error(er)
+
+ var who = self._proxy || self
+
+ stat.path = p
+ stat.basename = path.basename(p)
+ stat.dirname = path.dirname(p)
+ var childProps = self.getChildProps.call(who, stat)
+ childProps.path = p
+ childProps.basename = path.basename(p)
+ childProps.dirname = path.dirname(p)
+
+ var entry = Reader(childProps, stat)
+
+ // console.error("DR Entry", p, stat.size)
+
+ self._currentEntry = entry
+
+ // "entry" events are for direct entries in a specific dir.
+ // "child" events are for any and all children at all levels.
+ // This nomenclature is not completely final.
+
+ entry.on('pause', function (who) {
+ if (!self._paused && !entry._disowned) {
+ self.pause(who)
+ }
+ })
+
+ entry.on('resume', function (who) {
+ if (self._paused && !entry._disowned) {
+ self.resume(who)
+ }
+ })
+
+ entry.on('stat', function (props) {
+ self.emit('_entryStat', entry, props)
+ if (entry._aborted) return
+ if (entry._paused) {
+ entry.once('resume', function () {
+ self.emit('entryStat', entry, props)
+ })
+ } else self.emit('entryStat', entry, props)
+ })
+
+ entry.on('ready', function EMITCHILD () {
+ // console.error("DR emit child", entry._path)
+ if (self._paused) {
+ // console.error(" DR emit child - try again later")
+ // pause the child, and emit the "entry" event once we drain.
+ // console.error("DR pausing child entry")
+ entry.pause(self)
+ return self.once('resume', EMITCHILD)
+ }
+
+ // skip over sockets. they can't be piped around properly,
+ // so there's really no sense even acknowledging them.
+ // if someone really wants to see them, they can listen to
+ // the "socket" events.
+ if (entry.type === 'Socket') {
+ self.emit('socket', entry)
+ } else {
+ self.emitEntry(entry)
+ }
+ })
+
+ var ended = false
+ entry.on('close', onend)
+ entry.on('disown', onend)
+ function onend () {
+ if (ended) return
+ ended = true
+ self.emit('childEnd', entry)
+ self.emit('entryEnd', entry)
+ self._currentEntry = null
+ if (!self._paused) {
+ self._read()
+ }
+ }
+
+ // XXX Remove this. Works in node as of 0.6.2 or so.
+ // Long filenames should not break stuff.
+ entry.on('error', function (er) {
+ if (entry._swallowErrors) {
+ self.warn(er)
+ entry.emit('end')
+ entry.emit('close')
+ } else {
+ self.emit('error', er)
+ }
+ })
+
+ // proxy up some events.
+ ;[
+ 'child',
+ 'childEnd',
+ 'warn'
+ ].forEach(function (ev) {
+ entry.on(ev, self.emit.bind(self, ev))
+ })
+ })
+}
+
+DirReader.prototype.disown = function (entry) {
+ entry.emit('beforeDisown')
+ entry._disowned = true
+ entry.parent = entry.root = null
+ if (entry === this._currentEntry) {
+ this._currentEntry = null
+ }
+ entry.emit('disown')
+}
+
+DirReader.prototype.getChildProps = function () {
+ return {
+ depth: this.depth + 1,
+ root: this.root || this,
+ parent: this,
+ follow: this.follow,
+ filter: this.filter,
+ sort: this.props.sort,
+ hardlinks: this.props.hardlinks
+ }
+}
+
+DirReader.prototype.pause = function (who) {
+ var self = this
+ if (self._paused) return
+ who = who || self
+ self._paused = true
+ if (self._currentEntry && self._currentEntry.pause) {
+ self._currentEntry.pause(who)
+ }
+ self.emit('pause', who)
+}
+
+DirReader.prototype.resume = function (who) {
+ var self = this
+ if (!self._paused) return
+ who = who || self
+
+ self._paused = false
+ // console.error('DR Emit Resume', self._path)
+ self.emit('resume', who)
+ if (self._paused) {
+ // console.error('DR Re-paused', self._path)
+ return
+ }
+
+ if (self._currentEntry) {
+ if (self._currentEntry.resume) self._currentEntry.resume(who)
+ } else self._read()
+}
+
+DirReader.prototype.emitEntry = function (entry) {
+ this.emit('entry', entry)
+ this.emit('child', entry)
+}
diff --git a/source/node_modules/fstream/lib/dir-writer.js b/source/node_modules/fstream/lib/dir-writer.js
new file mode 100644
index 000000000..ec50dca90
--- /dev/null
+++ b/source/node_modules/fstream/lib/dir-writer.js
@@ -0,0 +1,174 @@
+// It is expected that, when .add() returns false, the consumer
+// of the DirWriter will pause until a "drain" event occurs. Note
+// that this is *almost always going to be the case*, unless the
+// thing being written is some sort of unsupported type, and thus
+// skipped over.
+
+module.exports = DirWriter
+
+var Writer = require('./writer.js')
+var inherits = require('inherits')
+var mkdir = require('mkdirp')
+var path = require('path')
+var collect = require('./collect.js')
+
+inherits(DirWriter, Writer)
+
+function DirWriter (props) {
+ var self = this
+ if (!(self instanceof DirWriter)) {
+ self.error('DirWriter must be called as constructor.', null, true)
+ }
+
+ // should already be established as a Directory type
+ if (props.type !== 'Directory' || !props.Directory) {
+ self.error('Non-directory type ' + props.type + ' ' +
+ JSON.stringify(props), null, true)
+ }
+
+ Writer.call(this, props)
+}
+
+DirWriter.prototype._create = function () {
+ var self = this
+ mkdir(self._path, Writer.dirmode, function (er) {
+ if (er) return self.error(er)
+ // ready to start getting entries!
+ self.ready = true
+ self.emit('ready')
+ self._process()
+ })
+}
+
+// a DirWriter has an add(entry) method, but its .write() doesn't
+// do anything. Why a no-op rather than a throw? Because this
+// leaves open the door for writing directory metadata for
+// gnu/solaris style dumpdirs.
+DirWriter.prototype.write = function () {
+ return true
+}
+
+DirWriter.prototype.end = function () {
+ this._ended = true
+ this._process()
+}
+
+DirWriter.prototype.add = function (entry) {
+ var self = this
+
+ // console.error('\tadd', entry._path, '->', self._path)
+ collect(entry)
+ if (!self.ready || self._currentEntry) {
+ self._buffer.push(entry)
+ return false
+ }
+
+ // create a new writer, and pipe the incoming entry into it.
+ if (self._ended) {
+ return self.error('add after end')
+ }
+
+ self._buffer.push(entry)
+ self._process()
+
+ return this._buffer.length === 0
+}
+
+DirWriter.prototype._process = function () {
+ var self = this
+
+ // console.error('DW Process p=%j', self._processing, self.basename)
+
+ if (self._processing) return
+
+ var entry = self._buffer.shift()
+ if (!entry) {
+ // console.error("DW Drain")
+ self.emit('drain')
+ if (self._ended) self._finish()
+ return
+ }
+
+ self._processing = true
+ // console.error("DW Entry", entry._path)
+
+ self.emit('entry', entry)
+
+ // ok, add this entry
+ //
+ // don't allow recursive copying
+ var p = entry
+ var pp
+ do {
+ pp = p._path || p.path
+ if (pp === self.root._path || pp === self._path ||
+ (pp && pp.indexOf(self._path) === 0)) {
+ // console.error('DW Exit (recursive)', entry.basename, self._path)
+ self._processing = false
+ if (entry._collected) entry.pipe()
+ return self._process()
+ }
+ p = p.parent
+ } while (p)
+
+ // console.error("DW not recursive")
+
+ // chop off the entry's root dir, replace with ours
+ var props = {
+ parent: self,
+ root: self.root || self,
+ type: entry.type,
+ depth: self.depth + 1
+ }
+
+ pp = entry._path || entry.path || entry.props.path
+ if (entry.parent) {
+ pp = pp.substr(entry.parent._path.length + 1)
+ }
+ // get rid of any ../../ shenanigans
+ props.path = path.join(self.path, path.join('/', pp))
+
+ // if i have a filter, the child should inherit it.
+ props.filter = self.filter
+
+ // all the rest of the stuff, copy over from the source.
+ Object.keys(entry.props).forEach(function (k) {
+ if (!props.hasOwnProperty(k)) {
+ props[k] = entry.props[k]
+ }
+ })
+
+ // not sure at this point what kind of writer this is.
+ var child = self._currentChild = new Writer(props)
+ child.on('ready', function () {
+ // console.error("DW Child Ready", child.type, child._path)
+ // console.error(" resuming", entry._path)
+ entry.pipe(child)
+ entry.resume()
+ })
+
+ // XXX Make this work in node.
+ // Long filenames should not break stuff.
+ child.on('error', function (er) {
+ if (child._swallowErrors) {
+ self.warn(er)
+ child.emit('end')
+ child.emit('close')
+ } else {
+ self.emit('error', er)
+ }
+ })
+
+ // we fire _end internally *after* end, so that we don't move on
+ // until any "end" listeners have had their chance to do stuff.
+ child.on('close', onend)
+ var ended = false
+ function onend () {
+ if (ended) return
+ ended = true
+ // console.error("* DW Child end", child.basename)
+ self._currentChild = null
+ self._processing = false
+ self._process()
+ }
+}
diff --git a/source/node_modules/fstream/lib/file-reader.js b/source/node_modules/fstream/lib/file-reader.js
new file mode 100644
index 000000000..baa01f4b3
--- /dev/null
+++ b/source/node_modules/fstream/lib/file-reader.js
@@ -0,0 +1,150 @@
+// Basically just a wrapper around an fs.ReadStream
+
+module.exports = FileReader
+
+var fs = require('graceful-fs')
+var inherits = require('inherits')
+var Reader = require('./reader.js')
+var EOF = {EOF: true}
+var CLOSE = {CLOSE: true}
+
+inherits(FileReader, Reader)
+
+function FileReader (props) {
+ // console.error(" FR create", props.path, props.size, new Error().stack)
+ var self = this
+ if (!(self instanceof FileReader)) {
+ throw new Error('FileReader must be called as constructor.')
+ }
+
+ // should already be established as a File type
+ // XXX Todo: preserve hardlinks by tracking dev+inode+nlink,
+ // with a HardLinkReader class.
+ if (!((props.type === 'Link' && props.Link) ||
+ (props.type === 'File' && props.File))) {
+ throw new Error('Non-file type ' + props.type)
+ }
+
+ self._buffer = []
+ self._bytesEmitted = 0
+ Reader.call(self, props)
+}
+
+FileReader.prototype._getStream = function () {
+ var self = this
+ var stream = self._stream = fs.createReadStream(self._path, self.props)
+
+ if (self.props.blksize) {
+ stream.bufferSize = self.props.blksize
+ }
+
+ stream.on('open', self.emit.bind(self, 'open'))
+
+ stream.on('data', function (c) {
+ // console.error('\t\t%d %s', c.length, self.basename)
+ self._bytesEmitted += c.length
+ // no point saving empty chunks
+ if (!c.length) {
+ return
+ } else if (self._paused || self._buffer.length) {
+ self._buffer.push(c)
+ self._read()
+ } else self.emit('data', c)
+ })
+
+ stream.on('end', function () {
+ if (self._paused || self._buffer.length) {
+ // console.error('FR Buffering End', self._path)
+ self._buffer.push(EOF)
+ self._read()
+ } else {
+ self.emit('end')
+ }
+
+ if (self._bytesEmitted !== self.props.size) {
+ self.error("Didn't get expected byte count\n" +
+ 'expect: ' + self.props.size + '\n' +
+ 'actual: ' + self._bytesEmitted)
+ }
+ })
+
+ stream.on('close', function () {
+ if (self._paused || self._buffer.length) {
+ // console.error('FR Buffering Close', self._path)
+ self._buffer.push(CLOSE)
+ self._read()
+ } else {
+ // console.error('FR close 1', self._path)
+ self.emit('close')
+ }
+ })
+
+ stream.on('error', function (e) {
+ self.emit('error', e)
+ })
+
+ self._read()
+}
+
+FileReader.prototype._read = function () {
+ var self = this
+ // console.error('FR _read', self._path)
+ if (self._paused) {
+ // console.error('FR _read paused', self._path)
+ return
+ }
+
+ if (!self._stream) {
+ // console.error('FR _getStream calling', self._path)
+ return self._getStream()
+ }
+
+ // clear out the buffer, if there is one.
+ if (self._buffer.length) {
+ // console.error('FR _read has buffer', self._buffer.length, self._path)
+ var buf = self._buffer
+ for (var i = 0, l = buf.length; i < l; i++) {
+ var c = buf[i]
+ if (c === EOF) {
+ // console.error('FR Read emitting buffered end', self._path)
+ self.emit('end')
+ } else if (c === CLOSE) {
+ // console.error('FR Read emitting buffered close', self._path)
+ self.emit('close')
+ } else {
+ // console.error('FR Read emitting buffered data', self._path)
+ self.emit('data', c)
+ }
+
+ if (self._paused) {
+ // console.error('FR Read Re-pausing at '+i, self._path)
+ self._buffer = buf.slice(i)
+ return
+ }
+ }
+ self._buffer.length = 0
+ }
+// console.error("FR _read done")
+// that's about all there is to it.
+}
+
+FileReader.prototype.pause = function (who) {
+ var self = this
+ // console.error('FR Pause', self._path)
+ if (self._paused) return
+ who = who || self
+ self._paused = true
+ if (self._stream) self._stream.pause()
+ self.emit('pause', who)
+}
+
+FileReader.prototype.resume = function (who) {
+ var self = this
+ // console.error('FR Resume', self._path)
+ if (!self._paused) return
+ who = who || self
+ self.emit('resume', who)
+ self._paused = false
+ if (self._stream) self._stream.resume()
+ self._read()
+}
diff --git a/source/node_modules/fstream/lib/file-writer.js b/source/node_modules/fstream/lib/file-writer.js
new file mode 100644
index 000000000..4c803d8d6
--- /dev/null
+++ b/source/node_modules/fstream/lib/file-writer.js
@@ -0,0 +1,107 @@
+module.exports = FileWriter
+
+var fs = require('graceful-fs')
+var Writer = require('./writer.js')
+var inherits = require('inherits')
+var EOF = {}
+
+inherits(FileWriter, Writer)
+
+function FileWriter (props) {
+ var self = this
+ if (!(self instanceof FileWriter)) {
+ throw new Error('FileWriter must be called as constructor.')
+ }
+
+ // should already be established as a File type
+ if (props.type !== 'File' || !props.File) {
+ throw new Error('Non-file type ' + props.type)
+ }
+
+ self._buffer = []
+ self._bytesWritten = 0
+
+ Writer.call(this, props)
+}
+
+FileWriter.prototype._create = function () {
+ var self = this
+ if (self._stream) return
+
+ var so = {}
+ if (self.props.flags) so.flags = self.props.flags
+ so.mode = Writer.filemode
+ if (self._old && self._old.blksize) so.bufferSize = self._old.blksize
+
+ self._stream = fs.createWriteStream(self._path, so)
+
+ self._stream.on('open', function () {
+ // console.error("FW open", self._buffer, self._path)
+ self.ready = true
+ self._buffer.forEach(function (c) {
+ if (c === EOF) self._stream.end()
+ else self._stream.write(c)
+ })
+ self.emit('ready')
+ // give this a kick just in case it needs it.
+ self.emit('drain')
+ })
+
+ self._stream.on('error', function (er) { self.emit('error', er) })
+
+ self._stream.on('drain', function () { self.emit('drain') })
+
+ self._stream.on('close', function () {
+ // console.error('\n\nFW Stream Close', self._path, self.size)
+ self._finish()
+ })
+}
+
+FileWriter.prototype.write = function (c) {
+ var self = this
+
+ self._bytesWritten += c.length
+
+ if (!self.ready) {
+ if (!Buffer.isBuffer(c) && typeof c !== 'string') {
+ throw new Error('invalid write data')
+ }
+ self._buffer.push(c)
+ return false
+ }
+
+ var ret = self._stream.write(c)
+ // console.error('\t-- fw wrote, _stream says', ret, self._stream._queue.length)
+
+ // allow 2 buffered writes, because otherwise there's just too
+ // much stop and go bs.
+ if (ret === false && self._stream._queue) {
+ return self._stream._queue.length <= 2
+ } else {
+ return ret
+ }
+}
+
+FileWriter.prototype.end = function (c) {
+ var self = this
+
+ if (c) self.write(c)
+
+ if (!self.ready) {
+ self._buffer.push(EOF)
+ return false
+ }
+
+ return self._stream.end()
+}
+
+FileWriter.prototype._finish = function () {
+ var self = this
+ if (typeof self.size === 'number' && self._bytesWritten !== self.size) {
+ self.error(
+ 'Did not get expected byte count.\n' +
+ 'expect: ' + self.size + '\n' +
+ 'actual: ' + self._bytesWritten)
+ }
+ Writer.prototype._finish.call(self)
+}
diff --git a/source/node_modules/fstream/lib/get-type.js b/source/node_modules/fstream/lib/get-type.js
new file mode 100644
index 000000000..19f6a657d
--- /dev/null
+++ b/source/node_modules/fstream/lib/get-type.js
@@ -0,0 +1,33 @@
+module.exports = getType
+
+function getType (st) {
+ var types = [
+ 'Directory',
+ 'File',
+ 'SymbolicLink',
+ 'Link', // special for hardlinks from tarballs
+ 'BlockDevice',
+ 'CharacterDevice',
+ 'FIFO',
+ 'Socket'
+ ]
+ var type
+
+ if (st.type && types.indexOf(st.type) !== -1) {
+ st[st.type] = true
+ return st.type
+ }
+
+ for (var i = 0, l = types.length; i < l; i++) {
+ type = types[i]
+ var is = st[type] || st['is' + type]
+ if (typeof is === 'function') is = is.call(st)
+ if (is) {
+ st[type] = true
+ st.type = type
+ return type
+ }
+ }
+
+ return null
+}
diff --git a/source/node_modules/fstream/lib/link-reader.js b/source/node_modules/fstream/lib/link-reader.js
new file mode 100644
index 000000000..fb4cc67a9
--- /dev/null
+++ b/source/node_modules/fstream/lib/link-reader.js
@@ -0,0 +1,53 @@
+// Basically just a wrapper around an fs.readlink
+//
+// XXX: Enhance this to support the Link type, by keeping
+// a lookup table of {:}, so that hardlinks
+// can be preserved in tarballs.
+
+module.exports = LinkReader
+
+var fs = require('graceful-fs')
+var inherits = require('inherits')
+var Reader = require('./reader.js')
+
+inherits(LinkReader, Reader)
+
+function LinkReader (props) {
+ var self = this
+ if (!(self instanceof LinkReader)) {
+ throw new Error('LinkReader must be called as constructor.')
+ }
+
+ if (!((props.type === 'Link' && props.Link) ||
+ (props.type === 'SymbolicLink' && props.SymbolicLink))) {
+ throw new Error('Non-link type ' + props.type)
+ }
+
+ Reader.call(self, props)
+}
+
+// When piping a LinkReader into a LinkWriter, we have to
+// already have the linkpath property set, so that has to
+// happen *before* the "ready" event, which means we need to
+// override the _stat method.
+LinkReader.prototype._stat = function (currentStat) {
+ var self = this
+ fs.readlink(self._path, function (er, linkpath) {
+ if (er) return self.error(er)
+ self.linkpath = self.props.linkpath = linkpath
+ self.emit('linkpath', linkpath)
+ Reader.prototype._stat.call(self, currentStat)
+ })
+}
+
+LinkReader.prototype._read = function () {
+ var self = this
+ if (self._paused) return
+ // basically just a no-op, since we got all the info we need
+ // from the _stat method
+ if (!self._ended) {
+ self.emit('end')
+ self.emit('close')
+ self._ended = true
+ }
+}
diff --git a/source/node_modules/fstream/lib/link-writer.js b/source/node_modules/fstream/lib/link-writer.js
new file mode 100644
index 000000000..af5428400
--- /dev/null
+++ b/source/node_modules/fstream/lib/link-writer.js
@@ -0,0 +1,95 @@
+module.exports = LinkWriter
+
+var fs = require('graceful-fs')
+var Writer = require('./writer.js')
+var inherits = require('inherits')
+var path = require('path')
+var rimraf = require('rimraf')
+
+inherits(LinkWriter, Writer)
+
+function LinkWriter (props) {
+ var self = this
+ if (!(self instanceof LinkWriter)) {
+ throw new Error('LinkWriter must be called as constructor.')
+ }
+
+ // should already be established as a Link type
+ if (!((props.type === 'Link' && props.Link) ||
+ (props.type === 'SymbolicLink' && props.SymbolicLink))) {
+ throw new Error('Non-link type ' + props.type)
+ }
+
+ if (props.linkpath === '') props.linkpath = '.'
+ if (!props.linkpath) {
+ self.error('Need linkpath property to create ' + props.type)
+ }
+
+ Writer.call(this, props)
+}
+
+LinkWriter.prototype._create = function () {
+ // console.error(" LW _create")
+ var self = this
+ var hard = self.type === 'Link' || process.platform === 'win32'
+ var link = hard ? 'link' : 'symlink'
+ var lp = hard ? path.resolve(self.dirname, self.linkpath) : self.linkpath
+
+ // can only change the link path by clobbering
+ // For hard links, let's just assume that's always the case, since
+ // there's no good way to read them if we don't already know.
+ if (hard) return clobber(self, lp, link)
+
+ fs.readlink(self._path, function (er, p) {
+ // only skip creation if it's exactly the same link
+ if (p && p === lp) return finish(self)
+ clobber(self, lp, link)
+ })
+}
+
+function clobber (self, lp, link) {
+ rimraf(self._path, function (er) {
+ if (er) return self.error(er)
+ create(self, lp, link)
+ })
+}
+
+function create (self, lp, link) {
+ fs[link](lp, self._path, function (er) {
+ // if this is a hard link, and we're in the process of writing out a
+ // directory, it's very possible that the thing we're linking to
+ // doesn't exist yet (especially if it was intended as a symlink),
+ // so swallow ENOENT errors here and just soldier in.
+ // Additionally, an EPERM or EACCES can happen on win32 if it's trying
+ // to make a link to a directory. Again, just skip it.
+ // A better solution would be to have fs.symlink be supported on
+ // windows in some nice fashion.
+ if (er) {
+ if ((er.code === 'ENOENT' ||
+ er.code === 'EACCES' ||
+ er.code === 'EPERM') && process.platform === 'win32') {
+ self.ready = true
+ self.emit('ready')
+ self.emit('end')
+ self.emit('close')
+ self.end = self._finish = function () {}
+ } else return self.error(er)
+ }
+ finish(self)
+ })
+}
+
+function finish (self) {
+ self.ready = true
+ self.emit('ready')
+ if (self._ended && !self._finished) self._finish()
+}
+
+LinkWriter.prototype.end = function () {
+ // console.error("LW finish in end")
+ this._ended = true
+ if (this.ready) {
+ this._finished = true
+ this._finish()
+ }
+}
diff --git a/source/node_modules/fstream/lib/proxy-reader.js b/source/node_modules/fstream/lib/proxy-reader.js
new file mode 100644
index 000000000..4f431c9d9
--- /dev/null
+++ b/source/node_modules/fstream/lib/proxy-reader.js
@@ -0,0 +1,95 @@
+// A reader for when we don't yet know what kind of thing
+// the thing is.
+
+module.exports = ProxyReader
+
+var Reader = require('./reader.js')
+var getType = require('./get-type.js')
+var inherits = require('inherits')
+var fs = require('graceful-fs')
+
+inherits(ProxyReader, Reader)
+
+function ProxyReader (props) {
+ var self = this
+ if (!(self instanceof ProxyReader)) {
+ throw new Error('ProxyReader must be called as constructor.')
+ }
+
+ self.props = props
+ self._buffer = []
+ self.ready = false
+
+ Reader.call(self, props)
+}
+
+ProxyReader.prototype._stat = function () {
+ var self = this
+ var props = self.props
+ // stat the thing to see what the proxy should be.
+ var stat = props.follow ? 'stat' : 'lstat'
+
+ fs[stat](props.path, function (er, current) {
+ var type
+ if (er || !current) {
+ type = 'File'
+ } else {
+ type = getType(current)
+ }
+
+ props[type] = true
+ props.type = self.type = type
+
+ self._old = current
+ self._addProxy(Reader(props, current))
+ })
+}
+
+ProxyReader.prototype._addProxy = function (proxy) {
+ var self = this
+ if (self._proxyTarget) {
+ return self.error('proxy already set')
+ }
+
+ self._proxyTarget = proxy
+ proxy._proxy = self
+
+ ;[
+ 'error',
+ 'data',
+ 'end',
+ 'close',
+ 'linkpath',
+ 'entry',
+ 'entryEnd',
+ 'child',
+ 'childEnd',
+ 'warn',
+ 'stat'
+ ].forEach(function (ev) {
+ // console.error('~~ proxy event', ev, self.path)
+ proxy.on(ev, self.emit.bind(self, ev))
+ })
+
+ self.emit('proxy', proxy)
+
+ proxy.on('ready', function () {
+ // console.error("~~ proxy is ready!", self.path)
+ self.ready = true
+ self.emit('ready')
+ })
+
+ var calls = self._buffer
+ self._buffer.length = 0
+ calls.forEach(function (c) {
+ proxy[c[0]].apply(proxy, c[1])
+ })
+}
+
+ProxyReader.prototype.pause = function () {
+ return this._proxyTarget ? this._proxyTarget.pause() : false
+}
+
+ProxyReader.prototype.resume = function () {
+ return this._proxyTarget ? this._proxyTarget.resume() : false
+}
diff --git a/source/node_modules/fstream/lib/proxy-writer.js b/source/node_modules/fstream/lib/proxy-writer.js
new file mode 100644
index 000000000..a6544621b
--- /dev/null
+++ b/source/node_modules/fstream/lib/proxy-writer.js
@@ -0,0 +1,111 @@
+// A writer for when we don't know what kind of thing
+// the thing is. That is, it's not explicitly set,
+// so we're going to make it whatever the thing already
+// is, or "File"
+//
+// Until then, collect all events.
+
+module.exports = ProxyWriter
+
+var Writer = require('./writer.js')
+var getType = require('./get-type.js')
+var inherits = require('inherits')
+var collect = require('./collect.js')
+var fs = require('fs')
+
+inherits(ProxyWriter, Writer)
+
+function ProxyWriter (props) {
+ var self = this
+ if (!(self instanceof ProxyWriter)) {
+ throw new Error('ProxyWriter must be called as constructor.')
+ }
+
+ self.props = props
+ self._needDrain = false
+
+ Writer.call(self, props)
+}
+
+ProxyWriter.prototype._stat = function () {
+ var self = this
+ var props = self.props
+ // stat the thing to see what the proxy should be.
+ var stat = props.follow ? 'stat' : 'lstat'
+
+ fs[stat](props.path, function (er, current) {
+ var type
+ if (er || !current) {
+ type = 'File'
+ } else {
+ type = getType(current)
+ }
+
+ props[type] = true
+ props.type = self.type = type
+
+ self._old = current
+ self._addProxy(Writer(props, current))
+ })
+}
+
+ProxyWriter.prototype._addProxy = function (proxy) {
+ // console.error("~~ set proxy", this.path)
+ var self = this
+ if (self._proxy) {
+ return self.error('proxy already set')
+ }
+
+ self._proxy = proxy
+ ;[
+ 'ready',
+ 'error',
+ 'close',
+ 'pipe',
+ 'drain',
+ 'warn'
+ ].forEach(function (ev) {
+ proxy.on(ev, self.emit.bind(self, ev))
+ })
+
+ self.emit('proxy', proxy)
+
+ var calls = self._buffer
+ calls.forEach(function (c) {
+ // console.error("~~ ~~ proxy buffered call", c[0], c[1])
+ proxy[c[0]].apply(proxy, c[1])
+ })
+ self._buffer.length = 0
+ if (self._needsDrain) self.emit('drain')
+}
+
+ProxyWriter.prototype.add = function (entry) {
+ // console.error("~~ proxy add")
+ collect(entry)
+
+ if (!this._proxy) {
+ this._buffer.push(['add', [entry]])
+ this._needDrain = true
+ return false
+ }
+ return this._proxy.add(entry)
+}
+
+ProxyWriter.prototype.write = function (c) {
+ // console.error('~~ proxy write')
+ if (!this._proxy) {
+ this._buffer.push(['write', [c]])
+ this._needDrain = true
+ return false
+ }
+ return this._proxy.write(c)
+}
+
+ProxyWriter.prototype.end = function (c) {
+ // console.error('~~ proxy end')
+ if (!this._proxy) {
+ this._buffer.push(['end', [c]])
+ return false
+ }
+ return this._proxy.end(c)
+}
diff --git a/source/node_modules/fstream/lib/reader.js b/source/node_modules/fstream/lib/reader.js
new file mode 100644
index 000000000..876021f92
--- /dev/null
+++ b/source/node_modules/fstream/lib/reader.js
@@ -0,0 +1,255 @@
+module.exports = Reader
+
+var fs = require('graceful-fs')
+var Stream = require('stream').Stream
+var inherits = require('inherits')
+var path = require('path')
+var getType = require('./get-type.js')
+var hardLinks = Reader.hardLinks = {}
+var Abstract = require('./abstract.js')
+
+// Must do this *before* loading the child classes
+inherits(Reader, Abstract)
+
+var LinkReader = require('./link-reader.js')
+
+function Reader (props, currentStat) {
+ var self = this
+ if (!(self instanceof Reader)) return new Reader(props, currentStat)
+
+ if (typeof props === 'string') {
+ props = { path: props }
+ }
+
+ if (!props.path) {
+ self.error('Must provide a path', null, true)
+ }
+
+ // polymorphism.
+ // call fstream.Reader(dir) to get a DirReader object, etc.
+ // Note that, unlike in the Writer case, ProxyReader is going
+ // to be the *normal* state of affairs, since we rarely know
+ // the type of a file prior to reading it.
+
+ var type
+ var ClassType
+
+ if (props.type && typeof props.type === 'function') {
+ type = props.type
+ ClassType = type
+ } else {
+ type = getType(props)
+ ClassType = Reader
+ }
+
+ if (currentStat && !type) {
+ type = getType(currentStat)
+ props[type] = true
+ props.type = type
+ }
+
+ switch (type) {
+ case 'Directory':
+ ClassType = require('./dir-reader.js')
+ break
+
+ case 'Link':
+ // XXX hard links are just files.
+ // However, it would be good to keep track of files' dev+inode
+ // and nlink values, and create a HardLinkReader that emits
+ // a linkpath value of the original copy, so that the tar
+ // writer can preserve them.
+ // ClassType = HardLinkReader
+ // break
+
+ case 'File':
+ ClassType = require('./file-reader.js')
+ break
+
+ case 'SymbolicLink':
+ ClassType = LinkReader
+ break
+
+ case 'Socket':
+ ClassType = require('./socket-reader.js')
+ break
+
+ case null:
+ ClassType = require('./proxy-reader.js')
+ break
+ }
+
+ if (!(self instanceof ClassType)) {
+ return new ClassType(props)
+ }
+
+ Abstract.call(self)
+
+ self.readable = true
+ self.writable = false
+
+ self.type = type
+ self.props = props
+ self.depth = props.depth = props.depth || 0
+ self.parent = props.parent || null
+ self.root = props.root || (props.parent && props.parent.root) || self
+
+ self._path = self.path = path.resolve(props.path)
+ if (process.platform === 'win32') {
+ self.path = self._path = self.path.replace(/\?/g, '_')
+ if (self._path.length >= 260) {
+ // how DOES one create files on the moon?
+ // if the path has spaces in it, then UNC will fail.
+ self._swallowErrors = true
+ // if (self._path.indexOf(" ") === -1) {
+ self._path = '\\\\?\\' + self.path.replace(/\//g, '\\')
+ // }
+ }
+ }
+ self.basename = props.basename = path.basename(self.path)
+ self.dirname = props.dirname = path.dirname(self.path)
+
+ // these have served their purpose, and are now just noisy clutter
+ props.parent = props.root = null
+
+ // console.error("\n\n\n%s setting size to", props.path, props.size)
+ self.size = props.size
+ self.filter = typeof props.filter === 'function' ? props.filter : null
+ if (props.sort === 'alpha') props.sort = alphasort
+
+ // start the ball rolling.
+ // this will stat the thing, and then call self._read()
+ // to start reading whatever it is.
+ // console.error("calling stat", props.path, currentStat)
+ self._stat(currentStat)
+}
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
+
+Reader.prototype._stat = function (currentStat) {
+ var self = this
+ var props = self.props
+ var stat = props.follow ? 'stat' : 'lstat'
+ // console.error("Reader._stat", self._path, currentStat)
+ if (currentStat) process.nextTick(statCb.bind(null, null, currentStat))
+ else fs[stat](self._path, statCb)
+
+ function statCb (er, props_) {
+ // console.error("Reader._stat, statCb", self._path, props_, props_.nlink)
+ if (er) return self.error(er)
+
+ Object.keys(props_).forEach(function (k) {
+ props[k] = props_[k]
+ })
+
+ // if it's not the expected size, then abort here.
+ if (undefined !== self.size && props.size !== self.size) {
+ return self.error('incorrect size')
+ }
+ self.size = props.size
+
+ var type = getType(props)
+ var handleHardlinks = props.hardlinks !== false
+
+ // special little thing for handling hardlinks.
+ if (handleHardlinks && type !== 'Directory' && props.nlink && props.nlink > 1) {
+ var k = props.dev + ':' + props.ino
+ // console.error("Reader has nlink", self._path, k)
+ if (hardLinks[k] === self._path || !hardLinks[k]) {
+ hardLinks[k] = self._path
+ } else {
+ // switch into hardlink mode.
+ type = self.type = self.props.type = 'Link'
+ self.Link = self.props.Link = true
+ self.linkpath = self.props.linkpath = hardLinks[k]
+ // console.error("Hardlink detected, switching mode", self._path, self.linkpath)
+ // Setting __proto__ would arguably be the "correct"
+ // approach here, but that just seems too wrong.
+ self._stat = self._read = LinkReader.prototype._read
+ }
+ }
+
+ if (self.type && self.type !== type) {
+ self.error('Unexpected type: ' + type)
+ }
+
+ // if the filter doesn't pass, then just skip over this one.
+ // still have to emit end so that dir-walking can move on.
+ if (self.filter) {
+ var who = self._proxy || self
+ // special handling for ProxyReaders
+ if (!self.filter.call(who, who, props)) {
+ if (!self._disowned) {
+ self.abort()
+ self.emit('end')
+ self.emit('close')
+ }
+ return
+ }
+ }
+
+ // last chance to abort or disown before the flow starts!
+ var events = ['_stat', 'stat', 'ready']
+ var e = 0
+ ;(function go () {
+ if (self._aborted) {
+ self.emit('end')
+ self.emit('close')
+ return
+ }
+
+ if (self._paused && self.type !== 'Directory') {
+ self.once('resume', go)
+ return
+ }
+
+ var ev = events[e++]
+ if (!ev) {
+ return self._read()
+ }
+ self.emit(ev, props)
+ go()
+ })()
+ }
+}
+
+Reader.prototype.pipe = function (dest) {
+ var self = this
+ if (typeof dest.add === 'function') {
+ // piping to a multi-compatible, and we've got directory entries.
+ self.on('entry', function (entry) {
+ var ret = dest.add(entry)
+ if (ret === false) {
+ self.pause()
+ }
+ })
+ }
+
+ // console.error("R Pipe apply Stream Pipe")
+ return Stream.prototype.pipe.apply(this, arguments)
+}
+
+Reader.prototype.pause = function (who) {
+ this._paused = true
+ who = who || this
+ this.emit('pause', who)
+ if (this._stream) this._stream.pause(who)
+}
+
+Reader.prototype.resume = function (who) {
+ this._paused = false
+ who = who || this
+ this.emit('resume', who)
+ if (this._stream) this._stream.resume(who)
+ this._read()
+}
+
+Reader.prototype._read = function () {
+ this.error('Cannot read unknown type: ' + this.type)
+}
diff --git a/source/node_modules/fstream/lib/socket-reader.js b/source/node_modules/fstream/lib/socket-reader.js
new file mode 100644
index 000000000..e0456ba89
--- /dev/null
+++ b/source/node_modules/fstream/lib/socket-reader.js
@@ -0,0 +1,36 @@
+// Just get the stats, and then don't do anything.
+// You can't really "read" from a socket. You "connect" to it.
+// Mostly, this is here so that reading a dir with a socket in it
+// doesn't blow up.
+
+module.exports = SocketReader
+
+var inherits = require('inherits')
+var Reader = require('./reader.js')
+
+inherits(SocketReader, Reader)
+
+function SocketReader (props) {
+ var self = this
+ if (!(self instanceof SocketReader)) {
+ throw new Error('SocketReader must be called as constructor.')
+ }
+
+ if (!(props.type === 'Socket' && props.Socket)) {
+ throw new Error('Non-socket type ' + props.type)
+ }
+
+ Reader.call(self, props)
+}
+
+SocketReader.prototype._read = function () {
+ var self = this
+ if (self._paused) return
+ // basically just a no-op, since we got all the info we have
+ // from the _stat method
+ if (!self._ended) {
+ self.emit('end')
+ self.emit('close')
+ self._ended = true
+ }
+}
diff --git a/source/node_modules/fstream/lib/writer.js b/source/node_modules/fstream/lib/writer.js
new file mode 100644
index 000000000..ca3396b5d
--- /dev/null
+++ b/source/node_modules/fstream/lib/writer.js
@@ -0,0 +1,390 @@
+module.exports = Writer
+
+var fs = require('graceful-fs')
+var inherits = require('inherits')
+var rimraf = require('rimraf')
+var mkdir = require('mkdirp')
+var path = require('path')
+var umask = process.platform === 'win32' ? 0 : process.umask()
+var getType = require('./get-type.js')
+var Abstract = require('./abstract.js')
+
+// Must do this *before* loading the child classes
+inherits(Writer, Abstract)
+
+Writer.dirmode = parseInt('0777', 8) & (~umask)
+Writer.filemode = parseInt('0666', 8) & (~umask)
+
+var DirWriter = require('./dir-writer.js')
+var LinkWriter = require('./link-writer.js')
+var FileWriter = require('./file-writer.js')
+var ProxyWriter = require('./proxy-writer.js')
+
+// props is the desired state. current is optionally the current stat,
+// provided here so that subclasses can avoid statting the target
+// more than necessary.
+function Writer (props, current) {
+ var self = this
+
+ if (typeof props === 'string') {
+ props = { path: props }
+ }
+
+ if (!props.path) self.error('Must provide a path', null, true)
+
+ // polymorphism.
+ // call fstream.Writer(dir) to get a DirWriter object, etc.
+ var type = getType(props)
+ var ClassType = Writer
+
+ switch (type) {
+ case 'Directory':
+ ClassType = DirWriter
+ break
+ case 'File':
+ ClassType = FileWriter
+ break
+ case 'Link':
+ case 'SymbolicLink':
+ ClassType = LinkWriter
+ break
+ case null:
+ default:
+ // Don't know yet what type to create, so we wrap in a proxy.
+ ClassType = ProxyWriter
+ break
+ }
+
+ if (!(self instanceof ClassType)) return new ClassType(props)
+
+ // now get down to business.
+
+ Abstract.call(self)
+
+ // props is what we want to set.
+ // set some convenience properties as well.
+ self.type = props.type
+ self.props = props
+ self.depth = props.depth || 0
+ self.clobber = props.clobber === false ? props.clobber : true
+ self.parent = props.parent || null
+ self.root = props.root || (props.parent && props.parent.root) || self
+
+ self._path = self.path = path.resolve(props.path)
+ if (process.platform === 'win32') {
+ self.path = self._path = self.path.replace(/\?/g, '_')
+ if (self._path.length >= 260) {
+ self._swallowErrors = true
+ self._path = '\\\\?\\' + self.path.replace(/\//g, '\\')
+ }
+ }
+ self.basename = path.basename(props.path)
+ self.dirname = path.dirname(props.path)
+ self.linkpath = props.linkpath || null
+
+ props.parent = props.root = null
+
+ // console.error("\n\n\n%s setting size to", props.path, props.size)
+ self.size = props.size
+
+ if (typeof props.mode === 'string') {
+ props.mode = parseInt(props.mode, 8)
+ }
+
+ self.readable = false
+ self.writable = true
+
+ // buffer until ready, or while handling another entry
+ self._buffer = []
+ self.ready = false
+
+ self.filter = typeof props.filter === 'function' ? props.filter : null
+
+ // start the ball rolling.
+ // this checks what's there already, and then calls
+ // self._create() to call the impl-specific creation stuff.
+ self._stat(current)
+}
+
+// Calling this means that it's something we can't create.
+// Just assert that it's already there, otherwise raise a warning.
+Writer.prototype._create = function () {
+ var self = this
+ fs[self.props.follow ? 'stat' : 'lstat'](self._path, function (er) {
+ if (er) {
+ return self.warn('Cannot create ' + self._path + '\n' +
+ 'Unsupported type: ' + self.type, 'ENOTSUP')
+ }
+ self._finish()
+ })
+}
+
+Writer.prototype._stat = function (current) {
+ var self = this
+ var props = self.props
+ var stat = props.follow ? 'stat' : 'lstat'
+ var who = self._proxy || self
+
+ if (current) statCb(null, current)
+ else fs[stat](self._path, statCb)
+
+ function statCb (er, current) {
+ if (self.filter && !self.filter.call(who, who, current)) {
+ self._aborted = true
+ self.emit('end')
+ self.emit('close')
+ return
+ }
+
+ // if it's not there, great. We'll just create it.
+ // if it is there, then we'll need to change whatever differs
+ if (er || !current) {
+ return create(self)
+ }
+
+ self._old = current
+ var currentType = getType(current)
+
+ // if it's a type change, then we need to clobber or error.
+ // if it's not a type change, then let the impl take care of it.
+ if (currentType !== self.type) {
+ return rimraf(self._path, function (er) {
+ if (er) return self.error(er)
+ self._old = null
+ create(self)
+ })
+ }
+
+ // otherwise, just handle in the app-specific way
+ // this creates a fs.WriteStream, or mkdir's, or whatever
+ create(self)
+ }
+}
+
+function create (self) {
+ // console.error("W create", self._path, Writer.dirmode)
+
+ // XXX Need to clobber non-dirs that are in the way,
+ // unless { clobber: false } in the props.
+ mkdir(path.dirname(self._path), Writer.dirmode, function (er, made) {
+ // console.error("W created", path.dirname(self._path), er)
+ if (er) return self.error(er)
+
+ // later on, we have to set the mode and owner for these
+ self._madeDir = made
+ return self._create()
+ })
+}
+
+function endChmod (self, want, current, path, cb) {
+ var wantMode = want.mode
+ var chmod = want.follow || self.type !== 'SymbolicLink'
+ ? 'chmod' : 'lchmod'
+
+ if (!fs[chmod]) return cb()
+ if (typeof wantMode !== 'number') return cb()
+
+ var curMode = current.mode & parseInt('0777', 8)
+ wantMode = wantMode & parseInt('0777', 8)
+ if (wantMode === curMode) return cb()
+
+ fs[chmod](path, wantMode, cb)
+}
+
+function endChown (self, want, current, path, cb) {
+ // Don't even try it unless root. Too easy to EPERM.
+ if (process.platform === 'win32') return cb()
+ if (!process.getuid || process.getuid() !== 0) return cb()
+ if (typeof want.uid !== 'number' &&
+ typeof want.gid !== 'number') return cb()
+
+ if (current.uid === want.uid &&
+ current.gid === want.gid) return cb()
+
+ var chown = (self.props.follow || self.type !== 'SymbolicLink')
+ ? 'chown' : 'lchown'
+ if (!fs[chown]) return cb()
+
+ if (typeof want.uid !== 'number') want.uid = current.uid
+ if (typeof want.gid !== 'number') want.gid = current.gid
+
+ fs[chown](path, want.uid, want.gid, cb)
+}
+
+function endUtimes (self, want, current, path, cb) {
+ if (!fs.utimes || process.platform === 'win32') return cb()
+
+ var utimes = (want.follow || self.type !== 'SymbolicLink')
+ ? 'utimes' : 'lutimes'
+
+ if (utimes === 'lutimes' && !fs[utimes]) {
+ utimes = 'utimes'
+ }
+
+ if (!fs[utimes]) return cb()
+
+ var curA = current.atime
+ var curM = current.mtime
+ var meA = want.atime
+ var meM = want.mtime
+
+ if (meA === undefined) meA = curA
+ if (meM === undefined) meM = curM
+
+ if (!isDate(meA)) meA = new Date(meA)
+ if (!isDate(meM)) meA = new Date(meM)
+
+ if (meA.getTime() === curA.getTime() &&
+ meM.getTime() === curM.getTime()) return cb()
+
+ fs[utimes](path, meA, meM, cb)
+}
+
+// XXX This function is beastly. Break it up!
+Writer.prototype._finish = function () {
+ var self = this
+
+ if (self._finishing) return
+ self._finishing = true
+
+ // console.error(" W Finish", self._path, self.size)
+
+ // set up all the things.
+ // At this point, we're already done writing whatever we've gotta write,
+ // adding files to the dir, etc.
+ var todo = 0
+ var errState = null
+ var done = false
+
+ if (self._old) {
+ // the times will almost *certainly* have changed.
+ // adds the utimes syscall, but remove another stat.
+ self._old.atime = new Date(0)
+ self._old.mtime = new Date(0)
+ // console.error(" W Finish Stale Stat", self._path, self.size)
+ setProps(self._old)
+ } else {
+ var stat = self.props.follow ? 'stat' : 'lstat'
+ // console.error(" W Finish Stating", self._path, self.size)
+ fs[stat](self._path, function (er, current) {
+ // console.error(" W Finish Stated", self._path, self.size, current)
+ if (er) {
+ // if we're in the process of writing out a
+ // directory, it's very possible that the thing we're linking to
+ // doesn't exist yet (especially if it was intended as a symlink),
+ // so swallow ENOENT errors here and just soldier on.
+ if (er.code === 'ENOENT' &&
+ (self.type === 'Link' || self.type === 'SymbolicLink') &&
+ process.platform === 'win32') {
+ self.ready = true
+ self.emit('ready')
+ self.emit('end')
+ self.emit('close')
+ self.end = self._finish = function () {}
+ return
+ } else return self.error(er)
+ }
+ setProps(self._old = current)
+ })
+ }
+
+ return
+
+ function setProps (current) {
+ todo += 3
+ endChmod(self, self.props, current, self._path, next('chmod'))
+ endChown(self, self.props, current, self._path, next('chown'))
+ endUtimes(self, self.props, current, self._path, next('utimes'))
+ }
+
+ function next (what) {
+ return function (er) {
+ // console.error(" W Finish", what, todo)
+ if (errState) return
+ if (er) {
+ er.fstream_finish_call = what
+ return self.error(errState = er)
+ }
+ if (--todo > 0) return
+ if (done) return
+ done = true
+
+ // we may still need to set the mode/etc. on some parent dirs
+ // that were created previously. delay end/close until then.
+ if (!self._madeDir) return end()
+ else endMadeDir(self, self._path, end)
+
+ function end (er) {
+ if (er) {
+ er.fstream_finish_call = 'setupMadeDir'
+ return self.error(er)
+ }
+ // all the props have been set, so we're completely done.
+ self.emit('end')
+ self.emit('close')
+ }
+ }
+ }
+}
+
+function endMadeDir (self, p, cb) {
+ var made = self._madeDir
+ // everything *between* made and path.dirname(self._path)
+ // needs to be set up. Note that this may just be one dir.
+ var d = path.dirname(p)
+
+ endMadeDir_(self, d, function (er) {
+ if (er) return cb(er)
+ if (d === made) {
+ return cb()
+ }
+ endMadeDir(self, d, cb)
+ })
+}
+
+function endMadeDir_ (self, p, cb) {
+ var dirProps = {}
+ Object.keys(self.props).forEach(function (k) {
+ dirProps[k] = self.props[k]
+
+ // only make non-readable dirs if explicitly requested.
+ if (k === 'mode' && self.type !== 'Directory') {
+ dirProps[k] = dirProps[k] | parseInt('0111', 8)
+ }
+ })
+
+ var todo = 3
+ var errState = null
+ fs.stat(p, function (er, current) {
+ if (er) return cb(errState = er)
+ endChmod(self, dirProps, current, p, next)
+ endChown(self, dirProps, current, p, next)
+ endUtimes(self, dirProps, current, p, next)
+ })
+
+ function next (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--todo === 0) return cb()
+ }
+}
+
+Writer.prototype.pipe = function () {
+ this.error("Can't pipe from writable stream")
+}
+
+Writer.prototype.add = function () {
+ this.error("Can't add to non-Directory type")
+}
+
+Writer.prototype.write = function () {
+ return true
+}
+
+function objectToString (d) {
+ return Object.prototype.toString.call(d)
+}
+
+function isDate (d) {
+ return typeof d === 'object' && objectToString(d) === '[object Date]'
+}
diff --git a/source/node_modules/fstream/package.json b/source/node_modules/fstream/package.json
new file mode 100644
index 000000000..41cad6baa
--- /dev/null
+++ b/source/node_modules/fstream/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ "fstream@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-gyp"
+ ]
+ ],
+ "_from": "fstream@>=1.0.0 <2.0.0",
+ "_id": "fstream@1.0.8",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/fstream",
+ "_nodeVersion": "2.2.2",
+ "_npmUser": {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ },
+ "_npmVersion": "2.14.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "fstream",
+ "raw": "fstream@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/node-gyp",
+ "/tar"
+ ],
+ "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz",
+ "_shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038",
+ "_shrinkwrap": null,
+ "_spec": "fstream@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-gyp",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/fstream/issues"
+ },
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "inherits": "~2.0.0",
+ "mkdirp": ">=0.5 0",
+ "rimraf": "2"
+ },
+ "description": "Advanced file system stream things",
+ "devDependencies": {
+ "standard": "^4.0.0",
+ "tap": "^1.2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038",
+ "tarball": "http://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "gitHead": "d9f81146c50e687f1df04c1a0e7e4c173eb3dae2",
+ "homepage": "https://github.com/isaacs/fstream#readme",
+ "license": "ISC",
+ "main": "fstream.js",
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
+ }
+ ],
+ "name": "fstream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/fstream.git"
+ },
+ "scripts": {
+ "test": "standard && tap examples/*.js"
+ },
+ "version": "1.0.8"
+}
diff --git a/source/node_modules/gauge/.npmignore b/source/node_modules/gauge/.npmignore
new file mode 100644
index 000000000..df22a16c6
--- /dev/null
+++ b/source/node_modules/gauge/.npmignore
@@ -0,0 +1,32 @@
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# Commenting this out is preferred by some people, see
+# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
+node_modules
+
+# Users Environment Variables
+.lock-wscript
+
+# Editor cruft
+*~
+.#*
diff --git a/source/node_modules/gauge/LICENSE b/source/node_modules/gauge/LICENSE
new file mode 100644
index 000000000..e75605296
--- /dev/null
+++ b/source/node_modules/gauge/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2014, Rebecca Turner
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/gauge/README.md b/source/node_modules/gauge/README.md
new file mode 100644
index 000000000..ca0a8cd77
--- /dev/null
+++ b/source/node_modules/gauge/README.md
@@ -0,0 +1,166 @@
+gauge
+=====
+
+A nearly stateless terminal based horizontal guage / progress bar.
+
+```javascript
+var Gauge = require("gauge")
+
+var gauge = new Gauge()
+
+gauge.show("test", 0.20)
+
+gauge.pulse("this")
+
+gauge.hide()
+```
+
+
+
+
+### `var gauge = new Gauge([options], [ansiStream])`
+
+* **options** – *(optional)* An option object. (See [below] for details.)
+* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi]
+ module to include various commands for controlling the cursor in a terminal.
+
+[ansi]: https://www.npmjs.com/package/ansi
+[below]: #theme-objects
+
+Constructs a new gauge. Gauges are drawn on a single line, and are not drawn
+if the current terminal isn't a tty.
+
+If you resize your terminal in a way that can be detected then the gauge
+will be drawn at the new size. As a general rule, growing your terminal will
+be clean, but shrinking your terminal will result in cruft as we don't have
+enough information to know where what we wrote previously is now located.
+
+The **options** object can have the following properties, all of which are
+optional:
+
+* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more
+ than once in this period of time. This applies to `show` and `pulse`
+ calls, but if you `hide` and then `show` the gauge it will draw it
+ regardless of time since last draw.
+* theme: defaults to Gauge.unicode` if the terminal supports
+ unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`.
+ Details on the [theme object](#theme-objects) are documented elsewhere.
+* template: see [documentation elsewhere](#template-objects) for
+ defaults and details.
+
+[has-unicode]: https://www.npmjs.com/package/has-unicode
+
+If **ansiStream** isn't passed in, then one will be constructed from stderr
+with `ansi(process.stderr)`.
+
+### `gauge.show([name, [completed]])`
+
+* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or "".
+* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0.
+
+If `process.stdout.isTTY` is false then this does nothing. If completed is 0
+and `gauge.pulse` has never been called, then similarly nothing will be printed.
+
+If `maxUpdateFrequency` msec haven't passed since the last call to `show` or
+`pulse` then similarly, nothing will be printed. (Actually, the update is
+deferred until `maxUpdateFrequency` msec have passed and if nothing else has
+happened, the gauge update will happen.)
+
+### `gauge.hide()`
+
+Removes the gauge from the terminal.
+
+### `gauge.pulse([name])`
+
+* **name** – *(optional)* The specific thing that triggered this pulse
+
+Spins the spinner in the gauge to show output. If **name** is included then
+it will be combined with the last name passed to `gauge.show` using the
+subsection property of the theme (typically a right facing arrow).
+
+### `gauge.disable()`
+
+Hides the gauge and ignores further calls to `show` or `pulse`.
+
+### `gauge.enable()`
+
+Shows the gauge and resumes updating when `show` or `pulse` is called.
+
+### `gauge.setTheme(theme)`
+
+Change the active theme, will be displayed with the next show or pulse
+
+### `gauge.setTemplate(template)`
+
+Change the active template, will be displayed with the next show or pulse
+
+### Theme Objects
+
+There are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`.
+Theme objects have the follow properties:
+
+| Property | Unicode | ASCII |
+| ---------- | ------- | ----- |
+| startgroup | ╢ | \| |
+| endgroup | ╟ | \| |
+| complete | █ | # |
+| incomplete | ░ | - |
+| spinner | ▀▐▄▌ | -\\\|/ |
+| subsection | → | -> |
+
+*startgroup*, *endgroup* and *subsection* can be as many characters as you want.
+
+*complete* and *incomplete* should be a single character width each.
+
+*spinner* is a list of characters to use in turn when displaying an activity
+spinner. The Gauge will spin as many characters as you give here.
+
+### Template Objects
+
+A template is an array of objects and strings that, after being evaluated,
+will be turned into the gauge line. The default template is:
+
+```javascript
+[
+ {type: "name", separated: true, maxLength: 25, minLength: 25, align: "left"},
+ {type: "spinner", separated: true},
+ {type: "startgroup"},
+ {type: "completionbar"},
+ {type: "endgroup"}
+]
+```
+
+The various template elements can either be **plain strings**, in which case they will
+be be included verbatum in the output.
+
+If the template element is an object, it can have the following keys:
+
+* *type* can be:
+ * `name` – The most recent name passed to `show`; if this is in response to a
+ `pulse` then the name passed to `pulse` will be appended along with the
+ subsection property from the theme.
+ * `spinner` – If you've ever called `pulse` this will be one of the characters
+ from the spinner property of the theme.
+ * `startgroup` – The `startgroup` property from the theme.
+ * `completionbar` – This progress bar itself
+ * `endgroup` – The `endgroup` property from the theme.
+* *separated* – If true, the element will be separated with spaces from things on
+ either side (and margins count as space, so it won't be indented), but only
+ if its included.
+* *maxLength* – The maximum length for this element. If its value is longer it
+ will be truncated.
+* *minLength* – The minimum length for this element. If its value is shorter it
+ will be padded according to the *align* value.
+* *align* – (Default: left) Possible values "left", "right" and "center". Works
+ as you'd expect from word processors.
+* *length* – Provides a single value for both *minLength* and *maxLength*. If both
+ *length* and *minLength or *maxLength* are specifed then the latter take precedence.
+
+### Tracking Completion
+
+If you have more than one thing going on that you want to track completion
+of, you may find the related [are-we-there-yet] helpful. It's `change`
+event can be wired up to the `show` method to get a more traditional
+progress bar interface.
+
+[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet
diff --git a/source/node_modules/gauge/example.png b/source/node_modules/gauge/example.png
new file mode 100644
index 000000000..2667cac45
Binary files /dev/null and b/source/node_modules/gauge/example.png differ
diff --git a/source/node_modules/gauge/package.json b/source/node_modules/gauge/package.json
new file mode 100644
index 000000000..68eb37600
--- /dev/null
+++ b/source/node_modules/gauge/package.json
@@ -0,0 +1,85 @@
+{
+ "_args": [
+ [
+ "gauge@~1.2.5",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/npmlog"
+ ]
+ ],
+ "_from": "gauge@>=1.2.5 <1.3.0",
+ "_id": "gauge@1.2.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gauge",
+ "_nodeVersion": "5.4.0",
+ "_npmUser": {
+ "email": "me@re-becca.org",
+ "name": "iarna"
+ },
+ "_npmVersion": "3.6.0",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "gauge",
+ "raw": "gauge@~1.2.5",
+ "rawSpec": "~1.2.5",
+ "scope": null,
+ "spec": ">=1.2.5 <1.3.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/npmlog"
+ ],
+ "_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.5.tgz",
+ "_shasum": "b80f107dd1f7d3c5a85f5aa74f9e0124caac9da7",
+ "_shrinkwrap": null,
+ "_spec": "gauge@~1.2.5",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/npmlog",
+ "author": {
+ "email": "me@re-becca.org",
+ "name": "Rebecca Turner"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/gauge/issues"
+ },
+ "dependencies": {
+ "ansi": "^0.3.0",
+ "has-unicode": "^2.0.0",
+ "lodash.pad": "^3.0.0",
+ "lodash.padleft": "^3.0.0",
+ "lodash.padright": "^3.0.0"
+ },
+ "description": "A terminal based horizontal guage",
+ "devDependencies": {
+ "tap": "^0.4.13"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b80f107dd1f7d3c5a85f5aa74f9e0124caac9da7",
+ "tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.5.tgz"
+ },
+ "gitHead": "bd0bb377d121e17d343bba156dd92fe6a8b21581",
+ "homepage": "https://github.com/iarna/gauge",
+ "keywords": [
+ "gauge",
+ "progress",
+ "progressbar"
+ ],
+ "license": "ISC",
+ "main": "progress-bar.js",
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "name": "gauge",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/gauge.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "1.2.5"
+}
diff --git a/source/node_modules/gauge/progress-bar.js b/source/node_modules/gauge/progress-bar.js
new file mode 100644
index 000000000..00b3a77e1
--- /dev/null
+++ b/source/node_modules/gauge/progress-bar.js
@@ -0,0 +1,225 @@
+"use strict"
+var hasUnicode = require("has-unicode")
+var ansi = require("ansi")
+var align = {
+ center: require("lodash.pad"),
+ left: require("lodash.padright"),
+ right: require("lodash.padleft")
+}
+var defaultStream = process.stderr
+function isTTY() {
+ return process.stderr.isTTY
+}
+function getWritableTTYColumns() {
+ // Writing to the final column wraps the line
+ // We have to use stdout here, because Node's magic SIGWINCH handler only
+ // updates process.stdout, not process.stderr
+ return process.stdout.columns - 1
+}
+
+var ProgressBar = module.exports = function (options, cursor) {
+ if (! options) options = {}
+ if (! cursor && options.write) {
+ cursor = options
+ options = {}
+ }
+ if (! cursor) {
+ cursor = ansi(defaultStream)
+ }
+ this.cursor = cursor
+ this.showing = false
+ this.theme = options.theme || (hasUnicode() ? ProgressBar.unicode : ProgressBar.ascii)
+ this.template = options.template || [
+ {type: "name", separated: true, length: 25},
+ {type: "spinner", separated: true},
+ {type: "startgroup"},
+ {type: "completionbar"},
+ {type: "endgroup"}
+ ]
+ this.updatefreq = options.maxUpdateFrequency == null ? 50 : options.maxUpdateFrequency
+ this.lastName = ""
+ this.lastCompleted = 0
+ this.spun = 0
+ this.last = new Date(0)
+
+ var self = this
+ this._handleSizeChange = function () {
+ if (!self.showing) return
+ self.hide()
+ self.show()
+ }
+}
+ProgressBar.prototype = {}
+
+ProgressBar.unicode = {
+ startgroup: "╢",
+ endgroup: "╟",
+ complete: "█",
+ incomplete: "░",
+ spinner: "▀▐▄▌",
+ subsection: "→"
+}
+
+ProgressBar.ascii = {
+ startgroup: "|",
+ endgroup: "|",
+ complete: "#",
+ incomplete: "-",
+ spinner: "-\\|/",
+ subsection: "->"
+}
+
+ProgressBar.prototype.setTheme = function(theme) {
+ this.theme = theme
+}
+
+ProgressBar.prototype.setTemplate = function(template) {
+ this.template = template
+}
+
+ProgressBar.prototype._enableResizeEvents = function() {
+ process.stdout.on('resize', this._handleSizeChange)
+}
+
+ProgressBar.prototype._disableResizeEvents = function() {
+ process.stdout.removeListener('resize', this._handleSizeChange)
+}
+
+ProgressBar.prototype.disable = function() {
+ this.hide()
+ this.disabled = true
+}
+
+ProgressBar.prototype.enable = function() {
+ this.disabled = false
+ this.show()
+}
+
+ProgressBar.prototype.hide = function() {
+ if (!isTTY()) return
+ if (this.disabled) return
+ this.cursor.show()
+ if (this.showing) this.cursor.up(1)
+ this.cursor.horizontalAbsolute(0).eraseLine()
+ this.showing = false
+}
+
+var repeat = function (str, count) {
+ var out = ""
+ for (var ii=0; ii P | |----|\n' ],
+ [ 'show' ] ])
+})
+
+test("window resizing", function (t) {
+ t.plan(16)
+ process.stderr.isTTY = true
+ process.stdout.columns = 32
+ bar.show("NAME", 0.1)
+ cursor = []
+ bar.last = new Date(0)
+ bar.pulse()
+ isOutput(t, "32 columns",
+ [ [ 'up', 1 ],
+ [ 'hide' ],
+ [ 'horizontalAbsolute', 0 ],
+ [ 'write', 'NAME / |##------------------|\n' ],
+ [ 'show' ] ])
+
+ process.stdout.columns = 16
+ bar.show("NAME", 0.5)
+ cursor = []
+ bar.last = new Date(0)
+ bar.pulse()
+ isOutput(t, "16 columns",
+ [ [ 'up', 1 ],
+ [ 'hide' ],
+ [ 'horizontalAbsolute', 0 ],
+ [ 'write', 'NAME - |##--|\n' ],
+ [ 'show' ] ]);
+});
diff --git a/source/node_modules/gaze/LICENSE-MIT b/source/node_modules/gaze/LICENSE-MIT
new file mode 100644
index 000000000..8c1a83323
--- /dev/null
+++ b/source/node_modules/gaze/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Kyle Robinson Young
+
+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.
diff --git a/source/node_modules/gaze/README.md b/source/node_modules/gaze/README.md
new file mode 100644
index 000000000..f7d6c3bad
--- /dev/null
+++ b/source/node_modules/gaze/README.md
@@ -0,0 +1,181 @@
+# gaze [](https://travis-ci.org/shama/gaze)
+
+A globbing fs.watch wrapper built from the best parts of other fine watch libs.
+Compatible with Node.js 0.10/0.8, Windows, OSX and Linux.
+
+
+
+## Usage
+Install the module with: `npm install gaze` or place into your `package.json`
+and run `npm install`.
+
+```javascript
+var gaze = require('gaze');
+
+// Watch all .js files/dirs in process.cwd()
+gaze('**/*.js', function(err, watcher) {
+ // Files have all started watching
+ // watcher === this
+
+ // Get all watched files
+ console.log(this.watched());
+
+ // On file changed
+ this.on('changed', function(filepath) {
+ console.log(filepath + ' was changed');
+ });
+
+ // On file added
+ this.on('added', function(filepath) {
+ console.log(filepath + ' was added');
+ });
+
+ // On file deleted
+ this.on('deleted', function(filepath) {
+ console.log(filepath + ' was deleted');
+ });
+
+ // On changed/added/deleted
+ this.on('all', function(event, filepath) {
+ console.log(filepath + ' was ' + event);
+ });
+
+ // Get watched files with relative paths
+ console.log(this.relative());
+});
+
+// Also accepts an array of patterns
+gaze(['stylesheets/*.css', 'images/**/*.png'], function() {
+ // Add more patterns later to be watched
+ this.add(['js/*.js']);
+});
+```
+
+### Alternate Interface
+
+```javascript
+var Gaze = require('gaze').Gaze;
+
+var gaze = new Gaze('**/*');
+
+// Files have all started watching
+gaze.on('ready', function(watcher) { });
+
+// A file has been added/changed/deleted has occurred
+gaze.on('all', function(event, filepath) { });
+```
+
+### Errors
+
+```javascript
+gaze('**/*', function() {
+ this.on('error', function(err) {
+ // Handle error here
+ });
+});
+```
+
+### Minimatch / Glob
+
+See [isaacs's minimatch](https://github.com/isaacs/minimatch) for more
+information on glob patterns.
+
+## Documentation
+
+### gaze(patterns, [options], callback)
+
+* `patterns` {String|Array} File patterns to be matched
+* `options` {Object}
+* `callback` {Function}
+ * `err` {Error | null}
+ * `watcher` {Object} Instance of the Gaze watcher
+
+### Class: gaze.Gaze
+
+Create a Gaze object by instanting the `gaze.Gaze` class.
+
+```javascript
+var Gaze = require('gaze').Gaze;
+var gaze = new Gaze(pattern, options, callback);
+```
+
+#### Properties
+
+* `options` The options object passed in.
+ * `interval` {integer} Interval to pass to fs.watchFile
+ * `debounceDelay` {integer} Delay for events called in succession for the same
+ file/event
+
+#### Events
+
+* `ready(watcher)` When files have been globbed and watching has begun.
+* `all(event, filepath)` When an `added`, `changed` or `deleted` event occurs.
+* `added(filepath)` When a file has been added to a watch directory.
+* `changed(filepath)` When a file has been changed.
+* `deleted(filepath)` When a file has been deleted.
+* `renamed(newPath, oldPath)` When a file has been renamed.
+* `end()` When the watcher is closed and watches have been removed.
+* `error(err)` When an error occurs.
+* `nomatch` When no files have been matched.
+
+#### Methods
+
+* `emit(event, [...])` Wrapper for the EventEmitter.emit.
+ `added`|`changed`|`deleted` events will also trigger the `all` event.
+* `close()` Unwatch all files and reset the watch instance.
+* `add(patterns, callback)` Adds file(s) patterns to be watched.
+* `remove(filepath)` removes a file or directory from being watched. Does not
+ recurse directories.
+* `watched()` Returns the currently watched files.
+* `relative([dir, unixify])` Returns the currently watched files with relative paths.
+ * `dir` {string} Only return relative files for this directory.
+ * `unixify` {boolean} Return paths with `/` instead of `\\` if on Windows.
+
+## FAQs
+
+### Why Another `fs.watch` Wrapper?
+I liked parts of other `fs.watch` wrappers but none had all the features I
+needed. This lib combines the features I needed from other fine watch libs:
+Speedy data behavior from
+[paulmillr's chokidar](https://github.com/paulmillr/chokidar), API interface
+from [mikeal's watch](https://github.com/mikeal/watch) and file globbing using
+[isaacs's glob](https://github.com/isaacs/node-glob) which is also used by
+[cowboy's Grunt](https://github.com/gruntjs/grunt).
+
+### How do I fix the error `EMFILE: Too many opened files.`?
+This is because of your system's max opened file limit. For OSX the default is
+very low (256). Increase your limit temporarily with `ulimit -n 10480`, the
+number being the new max limit.
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style.
+Add unit tests for any new or changed functionality. Lint and test your code
+using [grunt](http://gruntjs.com/).
+
+## Release History
+* 0.5.2 - Fix for ENOENT error with non-existent symlinks.
+* 0.5.1 - Use setImmediate (process.nextTick for node v0.8) to defer ready/nomatch events (@amasad).
+* 0.5.0 - Process is now kept alive while watching files. Emits a nomatch event when no files are matching.
+* 0.4.3 - Track file additions in newly created folders (@brett-shwom).
+* 0.4.2 - Fix .remove() method to remove a single file in a directory (@kaelzhang). Fixing Cannot call method 'call' of undefined (@krasimir). Track new file additions within folders (@brett-shwom).
+* 0.4.1 - Fix watchDir not respecting close in race condition (@chrisirhc).
+* 0.4.0 - Drop support for node v0.6. Use globule for file matching. Avoid node v0.10 path.resolve/join errors. Register new files when added to non-existent folder. Multiple instances can now poll the same files (@jpommerening).
+* 0.3.4 - Code clean up. Fix path must be strings errors (@groner). Fix incorrect added events (@groner).
+* 0.3.3 - Fix for multiple patterns with negate.
+* 0.3.2 - Emit `end` before removeAllListeners.
+* 0.3.1 - Fix added events within subfolder patterns.
+* 0.3.0 - Handle safewrite events, `forceWatchMethod` option removed, bug fixes and watch optimizations (@rgaskill).
+* 0.2.2 - Fix issue where subsequent add calls dont get watched (@samcday). removeAllListeners on close.
+* 0.2.1 - Fix issue with invalid `added` events in current working dir.
+* 0.2.0 - Support and mark folders with `path.sep`. Add `forceWatchMethod` option. Support `renamed` events.
+* 0.1.6 - Recognize the `cwd` option properly
+* 0.1.5 - Catch too many open file errors
+* 0.1.4 - Really fix the race condition with 2 watches
+* 0.1.3 - Fix race condition with 2 watches
+* 0.1.2 - Read triggering changed event fix
+* 0.1.1 - Minor fixes
+* 0.1.0 - Initial release
+
+## License
+Copyright (c) 2013 Kyle Robinson Young
+Licensed under the MIT license.
diff --git a/source/node_modules/gaze/lib/gaze.js b/source/node_modules/gaze/lib/gaze.js
new file mode 100644
index 000000000..28c26533b
--- /dev/null
+++ b/source/node_modules/gaze/lib/gaze.js
@@ -0,0 +1,439 @@
+/*
+ * gaze
+ * https://github.com/shama/gaze
+ *
+ * Copyright (c) 2013 Kyle Robinson Young
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+// libs
+var util = require('util');
+var EE = require('events').EventEmitter;
+var fs = require('fs');
+var path = require('path');
+var globule = require('globule');
+var helper = require('./helper');
+
+// shim setImmediate for node v0.8
+var setImmediate = require('timers').setImmediate;
+if (typeof setImmediate !== 'function') {
+ setImmediate = process.nextTick;
+}
+
+// globals
+var delay = 10;
+
+// `Gaze` EventEmitter object to return in the callback
+function Gaze(patterns, opts, done) {
+ var self = this;
+ EE.call(self);
+
+ // If second arg is the callback
+ if (typeof opts === 'function') {
+ done = opts;
+ opts = {};
+ }
+
+ // Default options
+ opts = opts || {};
+ opts.mark = true;
+ opts.interval = opts.interval || 100;
+ opts.debounceDelay = opts.debounceDelay || 500;
+ opts.cwd = opts.cwd || process.cwd();
+ this.options = opts;
+
+ // Default done callback
+ done = done || function() {};
+
+ // Remember our watched dir:files
+ this._watched = Object.create(null);
+
+ // Store watchers
+ this._watchers = Object.create(null);
+
+ // Store watchFile listeners
+ this._pollers = Object.create(null);
+
+ // Store patterns
+ this._patterns = [];
+
+ // Cached events for debouncing
+ this._cached = Object.create(null);
+
+ // Set maxListeners
+ if (this.options.maxListeners) {
+ this.setMaxListeners(this.options.maxListeners);
+ Gaze.super_.prototype.setMaxListeners(this.options.maxListeners);
+ delete this.options.maxListeners;
+ }
+
+ // Initialize the watch on files
+ if (patterns) {
+ this.add(patterns, done);
+ }
+
+ // keep the process alive
+ this._keepalive = setInterval(function() {}, 200);
+
+ return this;
+}
+util.inherits(Gaze, EE);
+
+// Main entry point. Start watching and call done when setup
+module.exports = function gaze(patterns, opts, done) {
+ return new Gaze(patterns, opts, done);
+};
+module.exports.Gaze = Gaze;
+
+// Override the emit function to emit `all` events
+// and debounce on duplicate events per file
+Gaze.prototype.emit = function() {
+ var self = this;
+ var args = arguments;
+
+ var e = args[0];
+ var filepath = args[1];
+ var timeoutId;
+
+ // If not added/deleted/changed/renamed then just emit the event
+ if (e.slice(-2) !== 'ed') {
+ Gaze.super_.prototype.emit.apply(self, args);
+ return this;
+ }
+
+ // Detect rename event, if added and previous deleted is in the cache
+ if (e === 'added') {
+ Object.keys(this._cached).forEach(function(oldFile) {
+ if (self._cached[oldFile].indexOf('deleted') !== -1) {
+ args[0] = e = 'renamed';
+ [].push.call(args, oldFile);
+ delete self._cached[oldFile];
+ return false;
+ }
+ });
+ }
+
+ // If cached doesnt exist, create a delay before running the next
+ // then emit the event
+ var cache = this._cached[filepath] || [];
+ if (cache.indexOf(e) === -1) {
+ helper.objectPush(self._cached, filepath, e);
+ clearTimeout(timeoutId);
+ timeoutId = setTimeout(function() {
+ delete self._cached[filepath];
+ }, this.options.debounceDelay);
+ // Emit the event and `all` event
+ Gaze.super_.prototype.emit.apply(self, args);
+ Gaze.super_.prototype.emit.apply(self, ['all', e].concat([].slice.call(args, 1)));
+ }
+
+ // Detect if new folder added to trigger for matching files within folder
+ if (e === 'added') {
+ if (helper.isDir(filepath)) {
+ fs.readdirSync(filepath).map(function(file) {
+ return path.join(filepath, file);
+ }).filter(function(file) {
+ return globule.isMatch(self._patterns, file, self.options);
+ }).forEach(function(file) {
+ self.emit('added', file);
+ });
+ }
+ }
+
+ return this;
+};
+
+// Close watchers
+Gaze.prototype.close = function(_reset) {
+ var self = this;
+ _reset = _reset === false ? false : true;
+ Object.keys(self._watchers).forEach(function(file) {
+ self._watchers[file].close();
+ });
+ self._watchers = Object.create(null);
+ Object.keys(this._watched).forEach(function(dir) {
+ self._unpollDir(dir);
+ });
+ if (_reset) {
+ self._watched = Object.create(null);
+ setTimeout(function() {
+ self.emit('end');
+ self.removeAllListeners();
+ clearInterval(self._keepalive);
+ }, delay + 100);
+ }
+ return self;
+};
+
+// Add file patterns to be watched
+Gaze.prototype.add = function(files, done) {
+ if (typeof files === 'string') { files = [files]; }
+ this._patterns = helper.unique.apply(null, [this._patterns, files]);
+ files = globule.find(this._patterns, this.options);
+ this._addToWatched(files);
+ this.close(false);
+ this._initWatched(done);
+};
+
+// Dont increment patterns and dont call done if nothing added
+Gaze.prototype._internalAdd = function(file, done) {
+ var files = [];
+ if (helper.isDir(file)) {
+ files = [helper.markDir(file)].concat(globule.find(this._patterns, this.options));
+ } else {
+ if (globule.isMatch(this._patterns, file, this.options)) {
+ files = [file];
+ }
+ }
+ if (files.length > 0) {
+ this._addToWatched(files);
+ this.close(false);
+ this._initWatched(done);
+ }
+};
+
+// Remove file/dir from `watched`
+Gaze.prototype.remove = function(file) {
+ var self = this;
+ if (this._watched[file]) {
+ // is dir, remove all files
+ this._unpollDir(file);
+ delete this._watched[file];
+ } else {
+ // is a file, find and remove
+ Object.keys(this._watched).forEach(function(dir) {
+ var index = self._watched[dir].indexOf(file);
+ if (index !== -1) {
+ self._unpollFile(file);
+ self._watched[dir].splice(index, 1);
+ return false;
+ }
+ });
+ }
+ if (this._watchers[file]) {
+ this._watchers[file].close();
+ }
+ return this;
+};
+
+// Return watched files
+Gaze.prototype.watched = function() {
+ return this._watched;
+};
+
+// Returns `watched` files with relative paths to process.cwd()
+Gaze.prototype.relative = function(dir, unixify) {
+ var self = this;
+ var relative = Object.create(null);
+ var relDir, relFile, unixRelDir;
+ var cwd = this.options.cwd || process.cwd();
+ if (dir === '') { dir = '.'; }
+ dir = helper.markDir(dir);
+ unixify = unixify || false;
+ Object.keys(this._watched).forEach(function(dir) {
+ relDir = path.relative(cwd, dir) + path.sep;
+ if (relDir === path.sep) { relDir = '.'; }
+ unixRelDir = unixify ? helper.unixifyPathSep(relDir) : relDir;
+ relative[unixRelDir] = self._watched[dir].map(function(file) {
+ relFile = path.relative(path.join(cwd, relDir) || '', file || '');
+ if (helper.isDir(file)) {
+ relFile = helper.markDir(relFile);
+ }
+ if (unixify) {
+ relFile = helper.unixifyPathSep(relFile);
+ }
+ return relFile;
+ });
+ });
+ if (dir && unixify) {
+ dir = helper.unixifyPathSep(dir);
+ }
+ return dir ? relative[dir] || [] : relative;
+};
+
+// Adds files and dirs to watched
+Gaze.prototype._addToWatched = function(files) {
+ for (var i = 0; i < files.length; i++) {
+ var file = files[i];
+ var filepath = path.resolve(this.options.cwd, file);
+
+ var dirname = (helper.isDir(file)) ? filepath : path.dirname(filepath);
+ dirname = helper.markDir(dirname);
+
+ // If a new dir is added
+ if (helper.isDir(file) && !(filepath in this._watched)) {
+ helper.objectPush(this._watched, filepath, []);
+ }
+
+ if (file.slice(-1) === '/') { filepath += path.sep; }
+ helper.objectPush(this._watched, path.dirname(filepath) + path.sep, filepath);
+
+ // add folders into the mix
+ var readdir = fs.readdirSync(dirname);
+ for (var j = 0; j < readdir.length; j++) {
+ var dirfile = path.join(dirname, readdir[j]);
+ if (fs.lstatSync(dirfile).isDirectory()) {
+ helper.objectPush(this._watched, dirname, dirfile + path.sep);
+ }
+ }
+ }
+ return this;
+};
+
+Gaze.prototype._watchDir = function(dir, done) {
+ var self = this;
+ var timeoutId;
+ try {
+ this._watchers[dir] = fs.watch(dir, function(event) {
+ // race condition. Let's give the fs a little time to settle down. so we
+ // don't fire events on non existent files.
+ clearTimeout(timeoutId);
+ timeoutId = setTimeout(function() {
+ // race condition. Ensure that this directory is still being watched
+ // before continuing.
+ if ((dir in self._watchers) && fs.existsSync(dir)) {
+ done(null, dir);
+ }
+ }, delay + 100);
+ });
+ } catch (err) {
+ return this._handleError(err);
+ }
+ return this;
+};
+
+Gaze.prototype._unpollFile = function(file) {
+ if (this._pollers[file]) {
+ fs.unwatchFile(file, this._pollers[file] );
+ delete this._pollers[file];
+ }
+ return this;
+};
+
+Gaze.prototype._unpollDir = function(dir) {
+ this._unpollFile(dir);
+ for (var i = 0; i < this._watched[dir].length; i++) {
+ this._unpollFile(this._watched[dir][i]);
+ }
+};
+
+Gaze.prototype._pollFile = function(file, done) {
+ var opts = { persistent: true, interval: this.options.interval };
+ if (!this._pollers[file]) {
+ this._pollers[file] = function(curr, prev) {
+ done(null, file);
+ };
+ try {
+ fs.watchFile(file, opts, this._pollers[file]);
+ } catch (err) {
+ return this._handleError(err);
+ }
+ }
+ return this;
+};
+
+// Initialize the actual watch on `watched` files
+Gaze.prototype._initWatched = function(done) {
+ var self = this;
+ var cwd = this.options.cwd || process.cwd();
+ var curWatched = Object.keys(self._watched);
+
+ // if no matching files
+ if (curWatched.length < 1) {
+ // Defer to emitting to give a chance to attach event handlers.
+ setImmediate(function () {
+ self.emit('ready', self);
+ if (done) { done.call(self, null, self); }
+ self.emit('nomatch');
+ });
+ return;
+ }
+
+ helper.forEachSeries(curWatched, function(dir, next) {
+ dir = dir || '';
+ var files = self._watched[dir];
+ // Triggered when a watched dir has an event
+ self._watchDir(dir, function(event, dirpath) {
+ var relDir = cwd === dir ? '.' : path.relative(cwd, dir);
+ relDir = relDir || '';
+
+ fs.readdir(dirpath, function(err, current) {
+ if (err) { return self.emit('error', err); }
+ if (!current) { return; }
+
+ try {
+ // append path.sep to directories so they match previous.
+ current = current.map(function(curPath) {
+ if (fs.existsSync(path.join(dir, curPath)) && fs.lstatSync(path.join(dir, curPath)).isDirectory()) {
+ return curPath + path.sep;
+ } else {
+ return curPath;
+ }
+ });
+ } catch (err) {
+ // race condition-- sometimes the file no longer exists
+ }
+
+ // Get watched files for this dir
+ var previous = self.relative(relDir);
+
+ // If file was deleted
+ previous.filter(function(file) {
+ return current.indexOf(file) < 0;
+ }).forEach(function(file) {
+ if (!helper.isDir(file)) {
+ var filepath = path.join(dir, file);
+ self.remove(filepath);
+ self.emit('deleted', filepath);
+ }
+ });
+
+ // If file was added
+ current.filter(function(file) {
+ return previous.indexOf(file) < 0;
+ }).forEach(function(file) {
+ // Is it a matching pattern?
+ var relFile = path.join(relDir, file);
+ // Add to watch then emit event
+ self._internalAdd(relFile, function() {
+ self.emit('added', path.join(dir, file));
+ });
+ });
+
+ });
+ });
+
+ // Watch for change/rename events on files
+ files.forEach(function(file) {
+ if (helper.isDir(file)) { return; }
+ self._pollFile(file, function(err, filepath) {
+ // Only emit changed if the file still exists
+ // Prevents changed/deleted duplicate events
+ if (fs.existsSync(filepath)) {
+ self.emit('changed', filepath);
+ }
+ });
+ });
+
+ next();
+ }, function() {
+
+ // Return this instance of Gaze
+ // delay before ready solves a lot of issues
+ setTimeout(function() {
+ self.emit('ready', self);
+ if (done) { done.call(self, null, self); }
+ }, delay + 100);
+
+ });
+};
+
+// If an error, handle it here
+Gaze.prototype._handleError = function(err) {
+ if (err.code === 'EMFILE') {
+ return this.emit('error', new Error('EMFILE: Too many opened files.'));
+ }
+ return this.emit('error', err);
+};
diff --git a/source/node_modules/gaze/lib/helper.js b/source/node_modules/gaze/lib/helper.js
new file mode 100644
index 000000000..e1ccc80ed
--- /dev/null
+++ b/source/node_modules/gaze/lib/helper.js
@@ -0,0 +1,67 @@
+'use strict';
+
+var path = require('path');
+var helper = module.exports = {};
+
+// Returns boolean whether filepath is dir terminated
+helper.isDir = function isDir(dir) {
+ if (typeof dir !== 'string') { return false; }
+ return (dir.slice(-(path.sep.length)) === path.sep);
+};
+
+// Create a `key:[]` if doesnt exist on `obj` then push or concat the `val`
+helper.objectPush = function objectPush(obj, key, val) {
+ if (obj[key] == null) { obj[key] = []; }
+ if (Array.isArray(val)) { obj[key] = obj[key].concat(val); }
+ else if (val) { obj[key].push(val); }
+ return obj[key] = helper.unique(obj[key]);
+};
+
+// Ensures the dir is marked with path.sep
+helper.markDir = function markDir(dir) {
+ if (typeof dir === 'string' &&
+ dir.slice(-(path.sep.length)) !== path.sep &&
+ dir !== '.') {
+ dir += path.sep;
+ }
+ return dir;
+};
+
+// Changes path.sep to unix ones for testing
+helper.unixifyPathSep = function unixifyPathSep(filepath) {
+ return (process.platform === 'win32') ? String(filepath).replace(/\\/g, '/') : filepath;
+};
+
+/**
+ * Lo-Dash 1.0.1
+ * Copyright 2012-2013 The Dojo Foundation
+ * Based on Underscore.js 1.4.4
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
+ * Available under MIT license
+ */
+helper.unique = function unique() { var array = Array.prototype.concat.apply(Array.prototype, arguments); var result = []; for (var i = 0; i < array.length; i++) { if (result.indexOf(array[i]) === -1) { result.push(array[i]); } } return result; };
+
+/**
+ * Copyright (c) 2010 Caolan McMahon
+ * Available under MIT license
+ */
+helper.forEachSeries = function forEachSeries(arr, iterator, callback) {
+ if (!arr.length) { return callback(); }
+ var completed = 0;
+ var iterate = function() {
+ iterator(arr[completed], function (err) {
+ if (err) {
+ callback(err);
+ callback = function() {};
+ } else {
+ completed += 1;
+ if (completed === arr.length) {
+ callback(null);
+ } else {
+ iterate();
+ }
+ }
+ });
+ };
+ iterate();
+};
diff --git a/source/node_modules/gaze/package.json b/source/node_modules/gaze/package.json
new file mode 100644
index 000000000..e4166738e
--- /dev/null
+++ b/source/node_modules/gaze/package.json
@@ -0,0 +1,143 @@
+{
+ "_args": [
+ [
+ "gaze@^0.5.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass"
+ ]
+ ],
+ "_from": "gaze@>=0.5.1 <0.6.0",
+ "_id": "gaze@0.5.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gaze",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "kyle@dontkry.com",
+ "name": "shama"
+ },
+ "_npmVersion": "3.3.4",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "gaze",
+ "raw": "gaze@^0.5.1",
+ "rawSpec": "^0.5.1",
+ "scope": null,
+ "spec": ">=0.5.1 <0.6.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/node-sass"
+ ],
+ "_resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
+ "_shasum": "40b709537d24d1d45767db5a908689dfe69ac44f",
+ "_shrinkwrap": null,
+ "_spec": "gaze@^0.5.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass",
+ "author": {
+ "email": "kyle@dontkry.com",
+ "name": "Kyle Robinson Young"
+ },
+ "bugs": {
+ "url": "https://github.com/shama/gaze/issues"
+ },
+ "contributors": [
+ {
+ "name": "Kyle Robinson Young",
+ "url": "http://dontkry.com"
+ },
+ {
+ "name": "Sam Day",
+ "url": "http://sam.is-super-awesome.com"
+ },
+ {
+ "name": "Roarke Gaskill",
+ "url": "http://starkinvestments.com"
+ },
+ {
+ "name": "Lance Pollard",
+ "url": "http://lancepollard.com/"
+ },
+ {
+ "name": "Daniel Fagnan",
+ "url": "http://hydrocodedesign.com/"
+ },
+ {
+ "name": "Jonas",
+ "url": "http://jpommerening.github.io/"
+ },
+ {
+ "name": "Chris Chua",
+ "url": "http://sirh.cc/"
+ },
+ {
+ "name": "Kael Zhang",
+ "url": "http://kael.me"
+ },
+ {
+ "name": "Krasimir Tsonev",
+ "url": "http://krasimirtsonev.com/blog"
+ },
+ {
+ "name": "brett-shwom"
+ }
+ ],
+ "dependencies": {
+ "globule": "~0.1.0"
+ },
+ "description": "A globbing fs.watch wrapper built from the best parts of other fine watch libs.",
+ "devDependencies": {
+ "async": "~0.2.10",
+ "grunt": "~0.4.1",
+ "grunt-benchmark": "~0.2.0",
+ "grunt-cli": "~0.1.13",
+ "grunt-contrib-jshint": "~0.6.0",
+ "grunt-contrib-nodeunit": "~0.2.0",
+ "rimraf": "~2.2.6"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "40b709537d24d1d45767db5a908689dfe69ac44f",
+ "tarball": "http://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "files": [
+ "LICENSE-MIT",
+ "lib"
+ ],
+ "gitHead": "52007df64a841ccf52b9f9cd617cd24a4e2ddf8b",
+ "homepage": "https://github.com/shama/gaze",
+ "keywords": [
+ "glob",
+ "watch"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/shama/gaze/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/gaze",
+ "maintainers": [
+ {
+ "name": "joshperry",
+ "email": "josh@6bit.com"
+ },
+ {
+ "name": "shama",
+ "email": "kyle@dontkry.com"
+ }
+ ],
+ "name": "gaze",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/shama/gaze.git"
+ },
+ "scripts": {
+ "test": "grunt nodeunit -v"
+ },
+ "version": "0.5.2"
+}
diff --git a/source/node_modules/generate-function/.npmignore b/source/node_modules/generate-function/.npmignore
new file mode 100644
index 000000000..3c3629e64
--- /dev/null
+++ b/source/node_modules/generate-function/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/source/node_modules/generate-function/.travis.yml b/source/node_modules/generate-function/.travis.yml
new file mode 100644
index 000000000..6e5919de3
--- /dev/null
+++ b/source/node_modules/generate-function/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10"
diff --git a/source/node_modules/generate-function/README.md b/source/node_modules/generate-function/README.md
new file mode 100644
index 000000000..693bff87c
--- /dev/null
+++ b/source/node_modules/generate-function/README.md
@@ -0,0 +1,72 @@
+# generate-function
+
+Module that helps you write generated functions in Node
+
+```
+npm install generate-function
+```
+
+[](http://travis-ci.org/mafintosh/generate-function)
+
+## Disclamer
+
+Writing code that generates code is hard.
+You should only use this if you really, really, really need this for performance reasons (like schema validators / parsers etc).
+
+## Usage
+
+``` js
+var genfun = require('generate-function')
+
+var addNumber = function(val) {
+ var fn = genfun()
+ ('function add(n) {')
+ ('return n + %d', val) // supports format strings to insert values
+ ('}')
+
+ return fn.toFunction() // will compile the function
+}
+
+var add2 = addNumber(2)
+
+console.log('1+2=', add2(1))
+console.log(add2.toString()) // prints the generated function
+```
+
+If you need to close over variables in your generated function pass them to `toFunction(scope)`
+
+``` js
+var multiply = function(a, b) {
+ return a * b
+}
+
+var addAndMultiplyNumber = function(val) {
+ var fn = genfun()
+ ('function(n) {')
+ ('if (typeof n !== "number") {') // ending a line with { will indent the source
+ ('throw new Error("argument should be a number")')
+ ('}')
+ ('var result = multiply(%d, n+%d)', val, val)
+ ('return result')
+ ('}')
+
+ // use fn.toString() if you want to see the generated source
+
+ return fn.toFunction({
+ multiply: multiply
+ })
+}
+
+var addAndMultiply2 = addAndMultiplyNumber(2)
+
+console.log('(3 + 2) * 2 =', addAndMultiply2(3))
+```
+
+## Related
+
+See [generate-object-property](https://github.com/mafintosh/generate-object-property) if you need to safely generate code that
+can be used to reference an object property
+
+## License
+
+MIT
\ No newline at end of file
diff --git a/source/node_modules/generate-function/example.js b/source/node_modules/generate-function/example.js
new file mode 100644
index 000000000..8d1fee162
--- /dev/null
+++ b/source/node_modules/generate-function/example.js
@@ -0,0 +1,27 @@
+var genfun = require('./')
+
+var multiply = function(a, b) {
+ return a * b
+}
+
+var addAndMultiplyNumber = function(val) {
+ var fn = genfun()
+ ('function(n) {')
+ ('if (typeof n !== "number") {') // ending a line with { will indent the source
+ ('throw new Error("argument should be a number")')
+ ('}')
+ ('var result = multiply(%d, n+%d)', val, val)
+ ('return result')
+ ('}')
+
+ // use fn.toString() if you want to see the generated source
+
+ return fn.toFunction({
+ multiply: multiply
+ })
+}
+
+var addAndMultiply2 = addAndMultiplyNumber(2)
+
+console.log(addAndMultiply2.toString())
+console.log('(3 + 2) * 2 =', addAndMultiply2(3))
\ No newline at end of file
diff --git a/source/node_modules/generate-function/index.js b/source/node_modules/generate-function/index.js
new file mode 100644
index 000000000..37e064bb4
--- /dev/null
+++ b/source/node_modules/generate-function/index.js
@@ -0,0 +1,61 @@
+var util = require('util')
+
+var INDENT_START = /[\{\[]/
+var INDENT_END = /[\}\]]/
+
+module.exports = function() {
+ var lines = []
+ var indent = 0
+
+ var push = function(str) {
+ var spaces = ''
+ while (spaces.length < indent*2) spaces += ' '
+ lines.push(spaces+str)
+ }
+
+ var line = function(fmt) {
+ if (!fmt) return line
+
+ if (INDENT_END.test(fmt.trim()[0]) && INDENT_START.test(fmt[fmt.length-1])) {
+ indent--
+ push(util.format.apply(util, arguments))
+ indent++
+ return line
+ }
+ if (INDENT_START.test(fmt[fmt.length-1])) {
+ push(util.format.apply(util, arguments))
+ indent++
+ return line
+ }
+ if (INDENT_END.test(fmt.trim()[0])) {
+ indent--
+ push(util.format.apply(util, arguments))
+ return line
+ }
+
+ push(util.format.apply(util, arguments))
+ return line
+ }
+
+ line.toString = function() {
+ return lines.join('\n')
+ }
+
+ line.toFunction = function(scope) {
+ var src = 'return ('+line.toString()+')'
+
+ var keys = Object.keys(scope || {}).map(function(key) {
+ return key
+ })
+
+ var vals = keys.map(function(key) {
+ return scope[key]
+ })
+
+ return Function.apply(null, keys.concat(src)).apply(null, vals)
+ }
+
+ if (arguments.length) line.apply(null, arguments)
+
+ return line
+}
diff --git a/source/node_modules/generate-function/package.json b/source/node_modules/generate-function/package.json
new file mode 100644
index 000000000..b0c19b1a1
--- /dev/null
+++ b/source/node_modules/generate-function/package.json
@@ -0,0 +1,79 @@
+{
+ "_args": [
+ [
+ "generate-function@^2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/is-my-json-valid"
+ ]
+ ],
+ "_from": "generate-function@>=2.0.0 <3.0.0",
+ "_id": "generate-function@2.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/generate-function",
+ "_npmUser": {
+ "email": "mathiasbuus@gmail.com",
+ "name": "mafintosh"
+ },
+ "_npmVersion": "1.4.23",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "generate-function",
+ "raw": "generate-function@^2.0.0",
+ "rawSpec": "^2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/is-my-json-valid"
+ ],
+ "_resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
+ "_shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
+ "_shrinkwrap": null,
+ "_spec": "generate-function@^2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/is-my-json-valid",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/generate-function/issues"
+ },
+ "dependencies": {},
+ "description": "Module that helps you write generated functions in Node",
+ "devDependencies": {
+ "tape": "^2.13.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
+ "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
+ },
+ "gitHead": "3d5fc8de5859be95f58e3af9bfb5f663edd95149",
+ "homepage": "https://github.com/mafintosh/generate-function",
+ "keywords": [
+ "code",
+ "function",
+ "generate",
+ "generation",
+ "performance"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "name": "generate-function",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/generate-function.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/source/node_modules/generate-function/test.js b/source/node_modules/generate-function/test.js
new file mode 100644
index 000000000..2768893eb
--- /dev/null
+++ b/source/node_modules/generate-function/test.js
@@ -0,0 +1,33 @@
+var tape = require('tape')
+var genfun = require('./')
+
+tape('generate add function', function(t) {
+ var fn = genfun()
+ ('function add(n) {')
+ ('return n + %d', 42)
+ ('}')
+
+ t.same(fn.toString(), 'function add(n) {\n return n + 42\n}', 'code is indented')
+ t.same(fn.toFunction()(10), 52, 'function works')
+ t.end()
+})
+
+tape('generate function + closed variables', function(t) {
+ var fn = genfun()
+ ('function add(n) {')
+ ('return n + %d + number', 42)
+ ('}')
+
+ var notGood = fn.toFunction()
+ var good = fn.toFunction({number:10})
+
+ try {
+ notGood(10)
+ t.ok(false, 'function should not work')
+ } catch (err) {
+ t.same(err.message, 'number is not defined', 'throws reference error')
+ }
+
+ t.same(good(11), 63, 'function with closed var works')
+ t.end()
+})
\ No newline at end of file
diff --git a/source/node_modules/generate-object-property/.npmignore b/source/node_modules/generate-object-property/.npmignore
new file mode 100644
index 000000000..3c3629e64
--- /dev/null
+++ b/source/node_modules/generate-object-property/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/source/node_modules/generate-object-property/.travis.yml b/source/node_modules/generate-object-property/.travis.yml
new file mode 100644
index 000000000..6e5919de3
--- /dev/null
+++ b/source/node_modules/generate-object-property/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10"
diff --git a/source/node_modules/generate-object-property/LICENSE b/source/node_modules/generate-object-property/LICENSE
new file mode 100644
index 000000000..757562ec5
--- /dev/null
+++ b/source/node_modules/generate-object-property/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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.
\ No newline at end of file
diff --git a/source/node_modules/generate-object-property/README.md b/source/node_modules/generate-object-property/README.md
new file mode 100644
index 000000000..0ee04613d
--- /dev/null
+++ b/source/node_modules/generate-object-property/README.md
@@ -0,0 +1,19 @@
+# generate-object-property
+
+Generate safe JS code that can used to reference a object property
+
+ npm install generate-object-property
+
+[](http://travis-ci.org/mafintosh/generate-object-property)
+
+## Usage
+
+``` js
+var gen = require('generate-object-property');
+console.log(gen('a','b')); // prints a.b
+console.log(gen('a', 'foo-bar')); // prints a["foo-bar"]
+```
+
+## License
+
+MIT
\ No newline at end of file
diff --git a/source/node_modules/generate-object-property/index.js b/source/node_modules/generate-object-property/index.js
new file mode 100644
index 000000000..5dc9f776d
--- /dev/null
+++ b/source/node_modules/generate-object-property/index.js
@@ -0,0 +1,12 @@
+var isProperty = require('is-property')
+
+var gen = function(obj, prop) {
+ return isProperty(prop) ? obj+'.'+prop : obj+'['+JSON.stringify(prop)+']'
+}
+
+gen.valid = isProperty
+gen.property = function (prop) {
+ return isProperty(prop) ? prop : JSON.stringify(prop)
+}
+
+module.exports = gen
diff --git a/source/node_modules/generate-object-property/package.json b/source/node_modules/generate-object-property/package.json
new file mode 100644
index 000000000..064dc5fd8
--- /dev/null
+++ b/source/node_modules/generate-object-property/package.json
@@ -0,0 +1,76 @@
+{
+ "_args": [
+ [
+ "generate-object-property@^1.1.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/is-my-json-valid"
+ ]
+ ],
+ "_from": "generate-object-property@>=1.1.0 <2.0.0",
+ "_id": "generate-object-property@1.2.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/generate-object-property",
+ "_nodeVersion": "2.0.1",
+ "_npmUser": {
+ "email": "mathiasbuus@gmail.com",
+ "name": "mafintosh"
+ },
+ "_npmVersion": "2.9.0",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "generate-object-property",
+ "raw": "generate-object-property@^1.1.0",
+ "rawSpec": "^1.1.0",
+ "scope": null,
+ "spec": ">=1.1.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/is-my-json-valid"
+ ],
+ "_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
+ "_shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
+ "_shrinkwrap": null,
+ "_spec": "generate-object-property@^1.1.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/is-my-json-valid",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/generate-object-property/issues"
+ },
+ "dependencies": {
+ "is-property": "^1.0.0"
+ },
+ "description": "Generate safe JS code that can used to reference a object property",
+ "devDependencies": {
+ "tape": "^2.13.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
+ "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz"
+ },
+ "gitHead": "0dd7d411018de54b2eae63b424c15b3e50bd678c",
+ "homepage": "https://github.com/mafintosh/generate-object-property",
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "name": "generate-object-property",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/generate-object-property.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/source/node_modules/generate-object-property/test.js b/source/node_modules/generate-object-property/test.js
new file mode 100644
index 000000000..6c299c67f
--- /dev/null
+++ b/source/node_modules/generate-object-property/test.js
@@ -0,0 +1,12 @@
+var tape = require('tape')
+var gen = require('./')
+
+tape('valid', function(t) {
+ t.same(gen('a', 'b'), 'a.b')
+ t.end()
+})
+
+tape('invalid', function(t) {
+ t.same(gen('a', '-b'), 'a["-b"]')
+ t.end()
+})
\ No newline at end of file
diff --git a/source/node_modules/get-stdin/index.js b/source/node_modules/get-stdin/index.js
new file mode 100644
index 000000000..0f1aeb3df
--- /dev/null
+++ b/source/node_modules/get-stdin/index.js
@@ -0,0 +1,49 @@
+'use strict';
+
+module.exports = function (cb) {
+ var stdin = process.stdin;
+ var ret = '';
+
+ if (stdin.isTTY) {
+ setImmediate(cb, '');
+ return;
+ }
+
+ stdin.setEncoding('utf8');
+
+ stdin.on('readable', function () {
+ var chunk;
+
+ while (chunk = stdin.read()) {
+ ret += chunk;
+ }
+ });
+
+ stdin.on('end', function () {
+ cb(ret);
+ });
+};
+
+module.exports.buffer = function (cb) {
+ var stdin = process.stdin;
+ var ret = [];
+ var len = 0;
+
+ if (stdin.isTTY) {
+ setImmediate(cb, new Buffer(''));
+ return;
+ }
+
+ stdin.on('readable', function () {
+ var chunk;
+
+ while (chunk = stdin.read()) {
+ ret.push(chunk);
+ len += chunk.length;
+ }
+ });
+
+ stdin.on('end', function () {
+ cb(Buffer.concat(ret, len));
+ });
+};
diff --git a/source/node_modules/get-stdin/package.json b/source/node_modules/get-stdin/package.json
new file mode 100644
index 000000000..b7eea3488
--- /dev/null
+++ b/source/node_modules/get-stdin/package.json
@@ -0,0 +1,92 @@
+{
+ "_args": [
+ [
+ "get-stdin@^4.0.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/dateformat"
+ ]
+ ],
+ "_from": "get-stdin@>=4.0.1 <5.0.0",
+ "_id": "get-stdin@4.0.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/get-stdin",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "1.4.28",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "get-stdin",
+ "raw": "get-stdin@^4.0.1",
+ "rawSpec": "^4.0.1",
+ "scope": null,
+ "spec": ">=4.0.1 <5.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/dateformat",
+ "/node-sass",
+ "/strip-indent"
+ ],
+ "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe",
+ "_shrinkwrap": null,
+ "_spec": "get-stdin@^4.0.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/dateformat",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/get-stdin/issues"
+ },
+ "dependencies": {},
+ "description": "Easier stdin",
+ "devDependencies": {
+ "ava": "0.0.4",
+ "buffer-equal": "0.0.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe",
+ "tarball": "http://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f",
+ "homepage": "https://github.com/sindresorhus/get-stdin",
+ "keywords": [
+ "buffer",
+ "concat",
+ "process",
+ "std",
+ "stdin",
+ "stdio",
+ "stream",
+ "stream"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "get-stdin",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/get-stdin.git"
+ },
+ "scripts": {
+ "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js"
+ },
+ "version": "4.0.1"
+}
diff --git a/source/node_modules/get-stdin/readme.md b/source/node_modules/get-stdin/readme.md
new file mode 100644
index 000000000..bc1d32a8a
--- /dev/null
+++ b/source/node_modules/get-stdin/readme.md
@@ -0,0 +1,44 @@
+# get-stdin [](https://travis-ci.org/sindresorhus/get-stdin)
+
+> Easier stdin
+
+
+## Install
+
+```sh
+$ npm install --save get-stdin
+```
+
+
+## Usage
+
+```js
+// example.js
+var stdin = require('get-stdin');
+
+stdin(function (data) {
+ console.log(data);
+ //=> unicorns
+});
+```
+
+```sh
+$ echo unicorns | node example.js
+unicorns
+```
+
+
+## API
+
+### stdin(callback)
+
+Get `stdin` as a string.
+
+### stdin.buffer(callback)
+
+Get `stdin` as a buffer.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/glob-stream/LICENSE b/source/node_modules/glob-stream/LICENSE
new file mode 100755
index 000000000..4f482f9ba
--- /dev/null
+++ b/source/node_modules/glob-stream/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Fractal
+
+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.
diff --git a/source/node_modules/glob-stream/README.md b/source/node_modules/glob-stream/README.md
new file mode 100644
index 000000000..b0dbd4544
--- /dev/null
+++ b/source/node_modules/glob-stream/README.md
@@ -0,0 +1,67 @@
+# glob-stream [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
+
+
+## Information
+
+
+
+Package glob-stream
+
+
+Description
+File system globs as a stream
+
+
+Node Version
+>= 0.9
+
+
+
+This is a simple wrapper around node-glob to make it streamy.
+
+## Usage
+
+```javascript
+var gs = require('glob-stream');
+
+var stream = gs.create("./files/**/*.coffee", {options});
+
+stream.on('data', function(file){
+ // file has path, base, and cwd attrs
+});
+```
+
+You can pass any combination of globs. One caveat is that you can not only pass a glob negation, you must give it at least one positive glob so it knows where to start. All given must match for the file to be returned.
+
+### Options
+
+- cwd
+ - Default is `process.cwd()`
+- base
+ - Default is everything before a glob starts (see [glob2base](https://github.com/wearefractal/glob2base))
+- cwdbase
+ - Default is `false`
+ - When true it is the same as saying opt.base = opt.cwd
+
+This argument is passed directly to [node-glob](https://github.com/isaacs/node-glob) so check there for more options
+
+#### Glob
+
+```javascript
+var stream = gs.create(["./**/*.js", "!./node_modules/**/*.*"]);
+```
+
+[npm-url]: https://npmjs.org/package/glob-stream
+[npm-image]: https://badge.fury.io/js/glob-stream.png
+
+[travis-url]: https://travis-ci.org/wearefractal/glob-stream
+[travis-image]: https://travis-ci.org/wearefractal/glob-stream.png?branch=master
+
+[coveralls-url]: https://coveralls.io/r/wearefractal/glob-stream
+[coveralls-image]: https://coveralls.io/repos/wearefractal/glob-stream/badge.png
+
+[depstat-url]: https://david-dm.org/wearefractal/glob-stream
+[depstat-image]: https://david-dm.org/wearefractal/glob-stream.png
+
+[david-url]: https://david-dm.org/wearefractal/glob-stream
+[david-image]: https://david-dm.org/wearefractal/glob-stream.png?theme=shields.io
diff --git a/source/node_modules/glob-stream/index.js b/source/node_modules/glob-stream/index.js
new file mode 100644
index 000000000..0960c7c74
--- /dev/null
+++ b/source/node_modules/glob-stream/index.js
@@ -0,0 +1,117 @@
+/*jslint node: true */
+
+'use strict';
+
+var through2 = require('through2');
+var Combine = require('ordered-read-streams');
+var unique = require('unique-stream');
+
+var glob = require('glob');
+var minimatch = require('minimatch');
+var glob2base = require('glob2base');
+var path = require('path');
+
+var gs = {
+ // creates a stream for a single glob or filter
+ createStream: function(ourGlob, negatives, opt) {
+ if (!negatives) negatives = [];
+ if (!opt) opt = {};
+ if (typeof opt.cwd !== 'string') opt.cwd = process.cwd();
+ if (typeof opt.dot !== 'boolean') opt.dot = false;
+ if (typeof opt.silent !== 'boolean') opt.silent = true;
+ if (typeof opt.nonull !== 'boolean') opt.nonull = false;
+ if (typeof opt.cwdbase !== 'boolean') opt.cwdbase = false;
+ if (opt.cwdbase) opt.base = opt.cwd;
+
+ // remove path relativity to make globs make sense
+ ourGlob = unrelative(opt.cwd, ourGlob);
+ negatives = negatives.map(unrelative.bind(null, opt.cwd));
+
+ // create globbing stuff
+ var globber = new glob.Glob(ourGlob, opt);
+
+ // extract base path from glob
+ var basePath = opt.base ? opt.base : glob2base(globber);
+
+ // create stream and map events from globber to it
+ var stream = through2.obj(negatives.length ? filterNegatives : undefined);
+
+ globber.on('error', stream.emit.bind(stream, 'error'));
+ globber.on('end', function(/* some args here so can't use bind directly */){
+ stream.end();
+ });
+ globber.on('match', function(filename) {
+ stream.write({
+ cwd: opt.cwd,
+ base: basePath,
+ path: path.resolve(opt.cwd, filename)
+ });
+ });
+
+ return stream;
+
+ function filterNegatives(filename, enc, cb) {
+ var matcha = isMatch.bind(null, filename, opt);
+ if (negatives.every(matcha)) {
+ cb(null, filename); // pass
+ } else {
+ cb(); // ignore
+ }
+ }
+ },
+
+ // creates a stream for multiple globs or filters
+ create: function(globs, opt) {
+ if (!opt) opt = {};
+
+ // only one glob no need to aggregate
+ if (!Array.isArray(globs)) return gs.createStream(globs, null, opt);
+
+ var positives = globs.filter(isPositive);
+ var negatives = globs.filter(isNegative);
+
+ if (positives.length === 0) throw new Error("Missing positive glob");
+
+ // only one positive glob no need to aggregate
+ if (positives.length === 1) return gs.createStream(positives[0], negatives, opt);
+
+ // create all individual streams
+ var streams = positives.map(function(glob){
+ return gs.createStream(glob, negatives, opt);
+ });
+
+ // then just pipe them to a single unique stream and return it
+ var aggregate = new Combine(streams);
+ var uniqueStream = unique('path');
+
+ return aggregate.pipe(uniqueStream);
+ }
+};
+
+function isMatch(file, opt, pattern) {
+ if (typeof pattern === 'string') return minimatch(file.path, pattern, opt);
+ if (pattern instanceof RegExp) return pattern.test(file.path);
+ return true; // unknown glob type?
+}
+
+function isNegative(pattern) {
+ if (typeof pattern !== 'string') return true;
+ if (pattern[0] === '!') return true;
+ return false;
+}
+
+function isPositive(pattern) {
+ return !isNegative(pattern);
+}
+
+function unrelative(cwd, glob) {
+ var mod = '';
+ if (glob[0] === '!') {
+ mod = glob[0];
+ glob = glob.slice(1);
+ }
+ return mod+path.resolve(cwd, glob);
+}
+
+
+module.exports = gs;
diff --git a/source/node_modules/glob-stream/node_modules/glob/LICENSE b/source/node_modules/glob-stream/node_modules/glob/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/glob/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/glob-stream/node_modules/glob/README.md b/source/node_modules/glob-stream/node_modules/glob/README.md
new file mode 100644
index 000000000..258257ecb
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/glob/README.md
@@ -0,0 +1,369 @@
+[](https://travis-ci.org/isaacs/node-glob/) [](https://david-dm.org/isaacs/node-glob) [](https://david-dm.org/isaacs/node-glob#info=devDependencies) [](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
+
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Glob Primer
+
+"Globs" are the patterns you type when you do stuff like `ls *.js` on
+the command line, or put `build/*` in a `.gitignore` file.
+
+Before parsing the path part patterns, braced sections are expanded
+into a set. Braced sections start with `{` and end with `}`, with any
+number of comma-delimited sections within. Braced sections may contain
+slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
+
+The following characters have special magic meaning when used in a
+path portion:
+
+* `*` Matches 0 or more characters in a single path portion
+* `?` Matches 1 character
+* `[...]` Matches a range of characters, similar to a RegExp range.
+ If the first character of the range is `!` or `^` then it matches
+ any character not in the range.
+* `!(pattern|pattern|pattern)` Matches anything that does not match
+ any of the patterns provided.
+* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
+ patterns provided.
+* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
+ patterns provided.
+* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
+* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
+ provided
+* `**` If a "globstar" is alone in a path portion, then it matches
+ zero or more directories and subdirectories searching for matches.
+ It does not crawl symlinked directories.
+
+### Dots
+
+If a file or directory path portion has a `.` as the first character,
+then it will not match any glob pattern unless that pattern's
+corresponding path part also has a `.` as its first character.
+
+For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
+However the pattern `a/*/c` would not, because `*` does not start with
+a dot character.
+
+You can make glob treat dots as normal characters by setting
+`dot:true` in the options.
+
+### Basename Matching
+
+If you set `matchBase:true` in the options, and the pattern has no
+slashes in it, then it will seek for any file anywhere in the tree
+with a matching basename. For example, `*.js` would match
+`test/simple/basic.js`.
+
+### Negation
+
+The intent for negation would be for a pattern starting with `!` to
+match everything that *doesn't* match the supplied pattern. However,
+the implementation is weird, and for the time being, this should be
+avoided. The behavior will change or be deprecated in version 5.
+
+### Empty Sets
+
+If no matching files are found, then an empty array is returned. This
+differs from the shell, where the pattern itself is returned. For
+example:
+
+ $ echo a*s*d*f
+ a*s*d*f
+
+To get the bash-style behavior, set the `nonull:true` in the options.
+
+### See Also:
+
+* `man sh`
+* `man bash` (Search for "Pattern Matching")
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob.hasMagic(pattern, [options])
+
+Returns `true` if there are any special characters in the pattern, and
+`false` otherwise.
+
+Note that the options affect the results. If `noext:true` is set in
+the options object, then `+(a|b)` will not be considered a magic
+pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
+then that is considered magical, unless `nobrace:true` is set in the
+options.
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+ * `err` {Error | null}
+ * `matches` {Array} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options])
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instantiating the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+ * `err` {Error | null}
+ * `matches` {Array} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+* `statCache` Collection of all the stat results the glob search
+ performed.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `'DIR'` - Path exists, and is not a directory
+ * `'FILE'` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+* `statCache` Cache of `fs.stat` results, to prevent statting the same
+ path multiple times.
+* `symlinks` A record of which paths are symbolic links, which is
+ relevant in resolving `**` patterns.
+* `realpathCache` An optional object which is passed to `fs.realpath`
+ to minimize unnecessary syscalls. It is stored on the instantiated
+ Glob object, and may be re-used.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `pause` Temporarily stop the search
+* `resume` Resume the search
+* `abort` Stop the search forever
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the Glob object, as well.
+
+If you are running many `glob` operations, you can pass a Glob object
+as the `options` argument to a subsequent operation to shortcut some
+`stat` and `readdir` calls. At the very least, you may pass in shared
+`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
+parallel glob operations will be sped up by sharing information about
+the filesystem.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence.
+* `silent` When an unusual error is encountered when attempting to
+ read a directory, a warning will be printed to stderr. Set the
+ `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered when attempting to
+ read a directory, the process will just continue on in search of
+ other matches. Set the `strict` option to raise an error in these
+ cases.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary
+ to set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `symlinks` A cache of known symbolic links. You may pass in a
+ previously generated `symlinks` object to save `lstat` calls when
+ resolving `**` matches.
+* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set. Set this
+ flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `debug` Set to enable debug logging in minimatch and glob.
+* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
+* `noglobstar` Do not match `**` against multiple filenames. (Ie,
+ treat it as a normal `*` instead.)
+* `noext` Do not match `+(a|b)` "extglob" patterns.
+* `nocase` Perform a case-insensitive match. Note: on
+ case-insensitive filesystems, non-magic patterns will match by
+ default, since `stat` and `readdir` will not raise errors.
+* `matchBase` Perform a basename-only match if the pattern does not
+ contain any slash characters. That is, `*.js` would be treated as
+ equivalent to `**/*.js`, matching all js files in all directories.
+* `nonegate` Suppress `negate` behavior. (See below.)
+* `nocomment` Suppress `comment` behavior. (See below.)
+* `nonull` Return the pattern when no matches are found.
+* `nodir` Do not match directories, only files. (Note: to match
+ *only* directories, simply put a `/` at the end of the pattern.)
+* `ignore` Add a pattern or an array of patterns to exclude matches.
+* `follow` Follow symlinked directories when expanding `**` patterns.
+ Note that this can result in a lot of duplicate references in the
+ presence of cyclic links.
+* `realpath` Set to true to call `fs.realpath` on all of the results.
+ In the case of a symlink that cannot be resolved, the full absolute
+ path to the matched entry is returned (though it will usually be a
+ broken symlink)
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.3, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+Note that symlinked directories are not crawled as part of a `**`,
+though their contents may match against subsequent portions of the
+pattern. This prevents infinite loops and duplicates and the like.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the cache or statCache objects are reused between glob
+calls.
+
+Users are thus advised not to use a glob result as a guarantee of
+filesystem state in the face of rapid changes. For the vast majority
+of operations, this is never a problem.
+
+## Contributing
+
+Any change to behavior (including bugfixes) must come with a test.
+
+Patches that fail tests or reduce performance will be rejected.
+
+```
+# to run tests
+npm test
+
+# to re-generate test fixtures
+npm run test-regen
+
+# to benchmark against bash/zsh
+npm run bench
+
+# to profile javascript
+npm run prof
+```
diff --git a/source/node_modules/glob-stream/node_modules/glob/common.js b/source/node_modules/glob-stream/node_modules/glob/common.js
new file mode 100644
index 000000000..cd7c82448
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/glob/common.js
@@ -0,0 +1,237 @@
+exports.alphasort = alphasort
+exports.alphasorti = alphasorti
+exports.isAbsolute = process.platform === "win32" ? absWin : absUnix
+exports.setopts = setopts
+exports.ownProp = ownProp
+exports.makeAbs = makeAbs
+exports.finish = finish
+exports.mark = mark
+exports.isIgnored = isIgnored
+exports.childrenIgnored = childrenIgnored
+
+function ownProp (obj, field) {
+ return Object.prototype.hasOwnProperty.call(obj, field)
+}
+
+var path = require("path")
+var minimatch = require("minimatch")
+var Minimatch = minimatch.Minimatch
+
+function absWin (p) {
+ if (absUnix(p)) return true
+ // pull off the device/UNC bit from a windows path.
+ // from node's lib/path.js
+ var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
+ var result = splitDeviceRe.exec(p)
+ var device = result[1] || ''
+ var isUnc = device && device.charAt(1) !== ':'
+ var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
+
+ return isAbsolute
+}
+
+function absUnix (p) {
+ return p.charAt(0) === "/" || p === ""
+}
+
+function alphasorti (a, b) {
+ return a.toLowerCase().localeCompare(b.toLowerCase())
+}
+
+function alphasort (a, b) {
+ return a.localeCompare(b)
+}
+
+function setupIgnores (self, options) {
+ self.ignore = options.ignore || []
+
+ if (!Array.isArray(self.ignore))
+ self.ignore = [self.ignore]
+
+ if (self.ignore.length) {
+ self.ignore = self.ignore.map(ignoreMap)
+ }
+}
+
+function ignoreMap (pattern) {
+ var gmatcher = null
+ if (pattern.slice(-3) === '/**') {
+ var gpattern = pattern.replace(/(\/\*\*)+$/, '')
+ gmatcher = new Minimatch(gpattern, { nonegate: true })
+ }
+
+ return {
+ matcher: new Minimatch(pattern, { nonegate: true }),
+ gmatcher: gmatcher
+ }
+}
+
+function setopts (self, pattern, options) {
+ if (!options)
+ options = {}
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ self.pattern = pattern
+ self.strict = options.strict !== false
+ self.realpath = !!options.realpath
+ self.realpathCache = options.realpathCache || Object.create(null)
+ self.follow = !!options.follow
+ self.dot = !!options.dot
+ self.mark = !!options.mark
+ self.nodir = !!options.nodir
+ if (self.nodir)
+ self.mark = true
+ self.sync = !!options.sync
+ self.nounique = !!options.nounique
+ self.nonull = !!options.nonull
+ self.nosort = !!options.nosort
+ self.nocase = !!options.nocase
+ self.stat = !!options.stat
+ self.noprocess = !!options.noprocess
+
+ self.maxLength = options.maxLength || Infinity
+ self.cache = options.cache || Object.create(null)
+ self.statCache = options.statCache || Object.create(null)
+ self.symlinks = options.symlinks || Object.create(null)
+
+ setupIgnores(self, options)
+
+ self.changedCwd = false
+ var cwd = process.cwd()
+ if (!ownProp(options, "cwd"))
+ self.cwd = cwd
+ else {
+ self.cwd = options.cwd
+ self.changedCwd = path.resolve(options.cwd) !== cwd
+ }
+
+ self.root = options.root || path.resolve(self.cwd, "/")
+ self.root = path.resolve(self.root)
+ if (process.platform === "win32")
+ self.root = self.root.replace(/\\/g, "/")
+
+ self.nomount = !!options.nomount
+
+ self.minimatch = new Minimatch(pattern, options)
+ self.options = self.minimatch.options
+}
+
+function finish (self) {
+ var nou = self.nounique
+ var all = nou ? [] : Object.create(null)
+
+ for (var i = 0, l = self.matches.length; i < l; i ++) {
+ var matches = self.matches[i]
+ if (!matches || Object.keys(matches).length === 0) {
+ if (self.nonull) {
+ // do like the shell, and spit out the literal glob
+ var literal = self.minimatch.globSet[i]
+ if (nou)
+ all.push(literal)
+ else
+ all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou)
+ all.push.apply(all, m)
+ else
+ m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou)
+ all = Object.keys(all)
+
+ if (!self.nosort)
+ all = all.sort(self.nocase ? alphasorti : alphasort)
+
+ // at *some* point we statted all of these
+ if (self.mark) {
+ for (var i = 0; i < all.length; i++) {
+ all[i] = self._mark(all[i])
+ }
+ if (self.nodir) {
+ all = all.filter(function (e) {
+ return !(/\/$/.test(e))
+ })
+ }
+ }
+
+ if (self.ignore.length)
+ all = all.filter(function(m) {
+ return !isIgnored(self, m)
+ })
+
+ self.found = all
+}
+
+function mark (self, p) {
+ var abs = makeAbs(self, p)
+ var c = self.cache[abs]
+ var m = p
+ if (c) {
+ var isDir = c === 'DIR' || Array.isArray(c)
+ var slash = p.slice(-1) === '/'
+
+ if (isDir && !slash)
+ m += '/'
+ else if (!isDir && slash)
+ m = m.slice(0, -1)
+
+ if (m !== p) {
+ var mabs = makeAbs(self, m)
+ self.statCache[mabs] = self.statCache[abs]
+ self.cache[mabs] = self.cache[abs]
+ }
+ }
+
+ return m
+}
+
+// lotta situps...
+function makeAbs (self, f) {
+ var abs = f
+ if (f.charAt(0) === '/') {
+ abs = path.join(self.root, f)
+ } else if (exports.isAbsolute(f)) {
+ abs = f
+ } else if (self.changedCwd) {
+ abs = path.resolve(self.cwd, f)
+ } else if (self.realpath) {
+ abs = path.resolve(f)
+ }
+ return abs
+}
+
+
+// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
+// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
+function isIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
+
+function childrenIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
diff --git a/source/node_modules/glob-stream/node_modules/glob/glob.js b/source/node_modules/glob-stream/node_modules/glob/glob.js
new file mode 100644
index 000000000..eac0693cc
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/glob/glob.js
@@ -0,0 +1,740 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern, false)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern, inGlobStar)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+//
+// If inGlobStar and PREFIX is symlink and points to dir
+// set ENTRIES = []
+// else readdir(PREFIX) as ENTRIES
+// If fail, END
+//
+// with ENTRIES
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// // Mark that this entry is a globstar match
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+module.exports = glob
+
+var fs = require('fs')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var inherits = require('inherits')
+var EE = require('events').EventEmitter
+var path = require('path')
+var assert = require('assert')
+var globSync = require('./sync.js')
+var common = require('./common.js')
+var alphasort = common.alphasort
+var alphasorti = common.alphasorti
+var isAbsolute = common.isAbsolute
+var setopts = common.setopts
+var ownProp = common.ownProp
+var inflight = require('inflight')
+var util = require('util')
+var childrenIgnored = common.childrenIgnored
+
+var once = require('once')
+
+function glob (pattern, options, cb) {
+ if (typeof options === 'function') cb = options, options = {}
+ if (!options) options = {}
+
+ if (options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return globSync(pattern, options)
+ }
+
+ return new Glob(pattern, options, cb)
+}
+
+glob.sync = globSync
+var GlobSync = glob.GlobSync = globSync.GlobSync
+
+// old api surface
+glob.glob = glob
+
+glob.hasMagic = function (pattern, options_) {
+ var options = util._extend({}, options_)
+ options.noprocess = true
+
+ var g = new Glob(pattern, options)
+ var set = g.minimatch.set
+ if (set.length > 1)
+ return true
+
+ for (var j = 0; j < set[0].length; j++) {
+ if (typeof set[0][j] !== 'string')
+ return true
+ }
+
+ return false
+}
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = null
+ }
+
+ if (options && options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return new GlobSync(pattern, options)
+ }
+
+ if (!(this instanceof Glob))
+ return new Glob(pattern, options, cb)
+
+ setopts(this, pattern, options)
+ this._didRealPath = false
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ if (typeof cb === 'function') {
+ cb = once(cb)
+ this.on('error', cb)
+ this.on('end', function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ var self = this
+ var n = this.minimatch.set.length
+ this._processing = 0
+ this.matches = new Array(n)
+
+ this._emitQueue = []
+ this._processQueue = []
+ this.paused = false
+
+ if (this.noprocess)
+ return this
+
+ if (n === 0)
+ return done()
+
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false, done)
+ }
+
+ function done () {
+ --self._processing
+ if (self._processing <= 0)
+ self._finish()
+ }
+}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+ if (this.aborted)
+ return
+
+ if (this.realpath && !this._didRealpath)
+ return this._realpath()
+
+ common.finish(this)
+ this.emit('end', this.found)
+}
+
+Glob.prototype._realpath = function () {
+ if (this._didRealpath)
+ return
+
+ this._didRealpath = true
+
+ var n = this.matches.length
+ if (n === 0)
+ return this._finish()
+
+ var self = this
+ for (var i = 0; i < this.matches.length; i++)
+ this._realpathSet(i, next)
+
+ function next () {
+ if (--n === 0)
+ self._finish()
+ }
+}
+
+Glob.prototype._realpathSet = function (index, cb) {
+ var matchset = this.matches[index]
+ if (!matchset)
+ return cb()
+
+ var found = Object.keys(matchset)
+ var self = this
+ var n = found.length
+
+ if (n === 0)
+ return cb()
+
+ var set = this.matches[index] = Object.create(null)
+ found.forEach(function (p, i) {
+ // If there's a problem with the stat, then it means that
+ // one or more of the links in the realpath couldn't be
+ // resolved. just return the abs value in that case.
+ p = self._makeAbs(p)
+ fs.realpath(p, self.realpathCache, function (er, real) {
+ if (!er)
+ set[real] = true
+ else if (er.syscall === 'stat')
+ set[p] = true
+ else
+ self.emit('error', er) // srsly wtf right here
+
+ if (--n === 0) {
+ self.matches[index] = set
+ cb()
+ }
+ })
+ })
+}
+
+Glob.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+Glob.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit('abort')
+}
+
+Glob.prototype.pause = function () {
+ if (!this.paused) {
+ this.paused = true
+ this.emit('pause')
+ }
+}
+
+Glob.prototype.resume = function () {
+ if (this.paused) {
+ this.emit('resume')
+ this.paused = false
+ if (this._emitQueue.length) {
+ var eq = this._emitQueue.slice(0)
+ this._emitQueue.length = 0
+ for (var i = 0; i < eq.length; i ++) {
+ var e = eq[i]
+ this._emitMatch(e[0], e[1])
+ }
+ }
+ if (this._processQueue.length) {
+ var pq = this._processQueue.slice(0)
+ this._processQueue.length = 0
+ for (var i = 0; i < pq.length; i ++) {
+ var p = pq[i]
+ this._processing--
+ this._process(p[0], p[1], p[2], p[3])
+ }
+ }
+ }
+}
+
+Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
+ assert(this instanceof Glob)
+ assert(typeof cb === 'function')
+
+ if (this.aborted)
+ return
+
+ this._processing++
+ if (this.paused) {
+ this._processQueue.push([pattern, index, inGlobStar, cb])
+ return
+ }
+
+ //console.error('PROCESS %d', this._processing, pattern)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index, cb)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip _processing
+ if (childrenIgnored(this, read))
+ return cb()
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
+}
+
+Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return cb()
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return cb()
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this._emitMatch(index, e)
+ }
+ // This was the last one, and no stats were needed
+ return cb()
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+ this._process([e].concat(remain), index, inGlobStar, cb)
+ }
+ cb()
+}
+
+Glob.prototype._emitMatch = function (index, e) {
+ if (this.aborted)
+ return
+
+ if (this.matches[index][e])
+ return
+
+ if (this.paused) {
+ this._emitQueue.push([index, e])
+ return
+ }
+
+ var abs = this._makeAbs(e)
+
+ if (this.nodir) {
+ var c = this.cache[abs]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ if (this.mark)
+ e = this._mark(e)
+
+ this.matches[index][e] = true
+
+ var st = this.statCache[abs]
+ if (st)
+ this.emit('stat', e, st)
+
+ this.emit('match', e)
+}
+
+Glob.prototype._readdirInGlobStar = function (abs, cb) {
+ if (this.aborted)
+ return
+
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false, cb)
+
+ var lstatkey = 'lstat\0' + abs
+ var self = this
+ var lstatcb = inflight(lstatkey, lstatcb_)
+
+ if (lstatcb)
+ fs.lstat(abs, lstatcb)
+
+ function lstatcb_ (er, lstat) {
+ if (er)
+ return cb()
+
+ var isSym = lstat.isSymbolicLink()
+ self.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && !lstat.isDirectory()) {
+ self.cache[abs] = 'FILE'
+ cb()
+ } else
+ self._readdir(abs, false, cb)
+ }
+}
+
+Glob.prototype._readdir = function (abs, inGlobStar, cb) {
+ if (this.aborted)
+ return
+
+ cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
+ if (!cb)
+ return
+
+ //console.error('RD %j %j', +inGlobStar, abs)
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs, cb)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return cb()
+
+ if (Array.isArray(c))
+ return cb(null, c)
+ }
+
+ var self = this
+ fs.readdir(abs, readdirCb(this, abs, cb))
+}
+
+function readdirCb (self, abs, cb) {
+ return function (er, entries) {
+ if (er)
+ self._readdirError(abs, er, cb)
+ else
+ self._readdirEntries(abs, entries, cb)
+ }
+}
+
+Glob.prototype._readdirEntries = function (abs, entries, cb) {
+ if (this.aborted)
+ return
+
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+ return cb(null, entries)
+}
+
+Glob.prototype._readdirError = function (f, er, cb) {
+ if (this.aborted)
+ return
+
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ this.cache[this._makeAbs(f)] = 'FILE'
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict) return this.emit('error', er)
+ if (!this.silent) console.error('glob error', er)
+ break
+ }
+ return cb()
+}
+
+Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+
+Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+ //console.error('pgs2', prefix, remain[0], entries)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return cb()
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false, cb)
+
+ var isSym = this.symlinks[abs]
+ var len = entries.length
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return cb()
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true, cb)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true, cb)
+ }
+
+ cb()
+}
+
+Glob.prototype._processSimple = function (prefix, index, cb) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var self = this
+ this._stat(prefix, function (er, exists) {
+ self._processSimple2(prefix, index, er, exists, cb)
+ })
+}
+Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
+
+ //console.error('ps2', prefix, exists)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return cb()
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this._emitMatch(index, prefix)
+ cb()
+}
+
+// Returns either 'DIR', 'FILE', or false
+Glob.prototype._stat = function (f, cb) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return cb()
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return cb(null, c)
+
+ if (needDir && c === 'FILE')
+ return cb()
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (stat !== undefined) {
+ if (stat === false)
+ return cb(null, stat)
+ else {
+ var type = stat.isDirectory() ? 'DIR' : 'FILE'
+ if (needDir && type === 'FILE')
+ return cb()
+ else
+ return cb(null, type, stat)
+ }
+ }
+
+ var self = this
+ var statcb = inflight('stat\0' + abs, lstatcb_)
+ if (statcb)
+ fs.lstat(abs, statcb)
+
+ function lstatcb_ (er, lstat) {
+ if (lstat && lstat.isSymbolicLink()) {
+ // If it's a symlink, then treat it as the target, unless
+ // the target does not exist, then treat it as a file.
+ return fs.stat(abs, function (er, stat) {
+ if (er)
+ self._stat2(f, abs, null, lstat, cb)
+ else
+ self._stat2(f, abs, er, stat, cb)
+ })
+ } else {
+ self._stat2(f, abs, er, lstat, cb)
+ }
+ }
+}
+
+Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
+ if (er) {
+ this.statCache[abs] = false
+ return cb()
+ }
+
+ var needDir = f.slice(-1) === '/'
+ this.statCache[abs] = stat
+
+ if (abs.slice(-1) === '/' && !stat.isDirectory())
+ return cb(null, false, stat)
+
+ var c = stat.isDirectory() ? 'DIR' : 'FILE'
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c !== 'DIR')
+ return cb()
+
+ return cb(null, c, stat)
+}
diff --git a/source/node_modules/glob-stream/node_modules/glob/package.json b/source/node_modules/glob-stream/node_modules/glob/package.json
new file mode 100644
index 000000000..94ce12359
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/glob/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ "glob@^4.3.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream"
+ ]
+ ],
+ "_from": "glob@>=4.3.1 <5.0.0",
+ "_id": "glob@4.5.3",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob-stream/glob",
+ "_nodeVersion": "1.4.2",
+ "_npmUser": {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ "_npmVersion": "2.7.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "glob",
+ "raw": "glob@^4.3.1",
+ "rawSpec": "^4.3.1",
+ "scope": null,
+ "spec": ">=4.3.1 <5.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
+ "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
+ "_shrinkwrap": null,
+ "_spec": "glob@^4.3.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "dependencies": {
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^2.0.1",
+ "once": "^1.3.0"
+ },
+ "description": "a little globber",
+ "devDependencies": {
+ "mkdirp": "0",
+ "rimraf": "^2.2.8",
+ "tap": "^0.5.0",
+ "tick": "0.0.6"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f",
+ "tarball": "http://registry.npmjs.org/glob/-/glob-4.5.3.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "files": [
+ "common.js",
+ "glob.js",
+ "sync.js"
+ ],
+ "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f",
+ "homepage": "https://github.com/isaacs/node-glob",
+ "license": "ISC",
+ "main": "glob.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "glob",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "scripts": {
+ "bench": "bash benchmark.sh",
+ "benchclean": "bash benchclean.sh",
+ "prepublish": "npm run benchclean",
+ "prof": "bash prof.sh && cat profile.txt",
+ "profclean": "rm -f v8.log profile.txt",
+ "test": "npm run profclean && tap test/*.js",
+ "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
+ },
+ "version": "4.5.3"
+}
diff --git a/source/node_modules/glob-stream/node_modules/glob/sync.js b/source/node_modules/glob-stream/node_modules/glob/sync.js
new file mode 100644
index 000000000..f4f5e36d4
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/glob/sync.js
@@ -0,0 +1,457 @@
+module.exports = globSync
+globSync.GlobSync = GlobSync
+
+var fs = require('fs')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var Glob = require('./glob.js').Glob
+var util = require('util')
+var path = require('path')
+var assert = require('assert')
+var common = require('./common.js')
+var alphasort = common.alphasort
+var alphasorti = common.alphasorti
+var isAbsolute = common.isAbsolute
+var setopts = common.setopts
+var ownProp = common.ownProp
+var childrenIgnored = common.childrenIgnored
+
+function globSync (pattern, options) {
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ return new GlobSync(pattern, options).found
+}
+
+function GlobSync (pattern, options) {
+ if (!pattern)
+ throw new Error('must provide pattern')
+
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ if (!(this instanceof GlobSync))
+ return new GlobSync(pattern, options)
+
+ setopts(this, pattern, options)
+
+ if (this.noprocess)
+ return this
+
+ var n = this.minimatch.set.length
+ this.matches = new Array(n)
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false)
+ }
+ this._finish()
+}
+
+GlobSync.prototype._finish = function () {
+ assert(this instanceof GlobSync)
+ if (this.realpath) {
+ var self = this
+ this.matches.forEach(function (matchset, index) {
+ var set = self.matches[index] = Object.create(null)
+ for (var p in matchset) {
+ try {
+ p = self._makeAbs(p)
+ var real = fs.realpathSync(p, this.realpathCache)
+ set[real] = true
+ } catch (er) {
+ if (er.syscall === 'stat')
+ set[self._makeAbs(p)] = true
+ else
+ throw er
+ }
+ }
+ })
+ }
+ common.finish(this)
+}
+
+
+GlobSync.prototype._process = function (pattern, index, inGlobStar) {
+ assert(this instanceof GlobSync)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // See if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip processing
+ if (childrenIgnored(this, read))
+ return
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
+}
+
+
+GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
+ var entries = this._readdir(abs, inGlobStar)
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix.slice(-1) !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this.matches[index][e] = true
+ }
+ // This was the last one, and no stats were needed
+ return
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix)
+ newPattern = [prefix, e]
+ else
+ newPattern = [e]
+ this._process(newPattern.concat(remain), index, inGlobStar)
+ }
+}
+
+
+GlobSync.prototype._emitMatch = function (index, e) {
+ var abs = this._makeAbs(e)
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.matches[index][e])
+ return
+
+ if (this.nodir) {
+ var c = this.cache[this._makeAbs(e)]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ this.matches[index][e] = true
+ if (this.stat)
+ this._stat(e)
+}
+
+
+GlobSync.prototype._readdirInGlobStar = function (abs) {
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false)
+
+ var entries
+ var lstat
+ var stat
+ try {
+ lstat = fs.lstatSync(abs)
+ } catch (er) {
+ // lstat failed, doesn't exist
+ return null
+ }
+
+ var isSym = lstat.isSymbolicLink()
+ this.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && !lstat.isDirectory())
+ this.cache[abs] = 'FILE'
+ else
+ entries = this._readdir(abs, false)
+
+ return entries
+}
+
+GlobSync.prototype._readdir = function (abs, inGlobStar) {
+ var entries
+
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return null
+
+ if (Array.isArray(c))
+ return c
+ }
+
+ try {
+ return this._readdirEntries(abs, fs.readdirSync(abs))
+ } catch (er) {
+ this._readdirError(abs, er)
+ return null
+ }
+}
+
+GlobSync.prototype._readdirEntries = function (abs, entries) {
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+
+ // mark and cache dir-ness
+ return entries
+}
+
+GlobSync.prototype._readdirError = function (f, er) {
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ this.cache[this._makeAbs(f)] = 'FILE'
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict) throw er
+ if (!this.silent) console.error('glob error', er)
+ break
+ }
+}
+
+GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
+
+ var entries = this._readdir(abs, inGlobStar)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false)
+
+ var len = entries.length
+ var isSym = this.symlinks[abs]
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true)
+ }
+}
+
+GlobSync.prototype._processSimple = function (prefix, index) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var exists = this._stat(prefix)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this.matches[index][prefix] = true
+}
+
+// Returns either 'DIR', 'FILE', or false
+GlobSync.prototype._stat = function (f) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return false
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return c
+
+ if (needDir && c === 'FILE')
+ return false
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (!stat) {
+ var lstat
+ try {
+ lstat = fs.lstatSync(abs)
+ } catch (er) {
+ return false
+ }
+
+ if (lstat.isSymbolicLink()) {
+ try {
+ stat = fs.statSync(abs)
+ } catch (er) {
+ stat = lstat
+ }
+ } else {
+ stat = lstat
+ }
+ }
+
+ this.statCache[abs] = stat
+
+ var c = stat.isDirectory() ? 'DIR' : 'FILE'
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c !== 'DIR')
+ return false
+
+ return c
+}
+
+GlobSync.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+GlobSync.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
diff --git a/source/node_modules/glob-stream/node_modules/minimatch/LICENSE b/source/node_modules/glob-stream/node_modules/minimatch/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/minimatch/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/glob-stream/node_modules/minimatch/README.md b/source/node_modules/glob-stream/node_modules/minimatch/README.md
new file mode 100644
index 000000000..d458bc2e0
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/minimatch/README.md
@@ -0,0 +1,216 @@
+# minimatch
+
+A minimal matching utility.
+
+[](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items. So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself if this option is set. When not set, an empty list
+is returned if there are no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
+
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
diff --git a/source/node_modules/glob-stream/node_modules/minimatch/browser.js b/source/node_modules/glob-stream/node_modules/minimatch/browser.js
new file mode 100644
index 000000000..7d0515920
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/minimatch/browser.js
@@ -0,0 +1,1159 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o any number of characters
+var star = qmark + '*?'
+
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === '') return p === ''
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ if (typeof pattern === 'undefined') {
+ throw new Error('undefined pattern')
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === '**') return GLOBSTAR
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var plType
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ case '/':
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({
+ type: plType,
+ start: i - 1,
+ reStart: re.length
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ re += ')'
+ var pl = patternListStack.pop()
+ plType = pl.type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:)
+ switch (plType) {
+ case '!':
+ negativeLists.push(pl)
+ re += ')[^/]*?)'
+ pl.reEnd = re.length
+ break
+ case '?':
+ case '+':
+ case '*':
+ re += plType
+ break
+ case '@': break // the default anyway
+ }
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ if (inClass) {
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '.':
+ case '[':
+ case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ var regExp = new RegExp('^' + re + '$', flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
+
+},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){
+var concatMap = require('concat-map');
+var balanced = require('balanced-match');
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ return parts;
+}
+
+function expandTop(str) {
+ if (!str)
+ return [];
+
+ var expansions = expand(escapeBraces(str));
+ return expansions.filter(identity).map(unescapeBraces);
+}
+
+function identity(e) {
+ return e;
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+function expand(str) {
+ var expansions = [];
+
+ var m = balanced('{', '}', str);
+ if (!m || /\$$/.test(m.pre)) return [str];
+
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = /^(.*,)+(.+)?$/.test(m.body);
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,.*}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
+
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0]).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length
+ ? expand(m.post)
+ : [''];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
+
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
+
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post)
+ : [''];
+
+ var N;
+
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+
+ N = [];
+
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = concatMap(n, function(el) { return expand(el) });
+ }
+
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ expansions.push([pre, N[j], post[k]].join(''))
+ }
+ }
+
+ return expansions;
+}
+
+
+},{"balanced-match":3,"concat-map":4}],3:[function(require,module,exports){
+module.exports = balanced;
+function balanced(a, b, str) {
+ var bal = 0;
+ var m = {};
+ var ended = false;
+
+ for (var i = 0; i < str.length; i++) {
+ if (a == str.substr(i, a.length)) {
+ if (!('start' in m)) m.start = i;
+ bal++;
+ }
+ else if (b == str.substr(i, b.length) && 'start' in m) {
+ ended = true;
+ bal--;
+ if (!bal) {
+ m.end = i;
+ m.pre = str.substr(0, m.start);
+ m.body = (m.end - m.start > 1)
+ ? str.substring(m.start + a.length, m.end)
+ : '';
+ m.post = str.slice(m.end + b.length);
+ return m;
+ }
+ }
+ }
+
+ // if we opened more than we closed, find the one we closed
+ if (bal && ended) {
+ var start = m.start + a.length;
+ m = balanced(a, b, str.substr(start));
+ if (m) {
+ m.start += start;
+ m.end += start;
+ m.pre = str.slice(0, start) + m.pre;
+ }
+ return m;
+ }
+}
+
+},{}],4:[function(require,module,exports){
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (Array.isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+},{}]},{},[1])(1)
+});
\ No newline at end of file
diff --git a/source/node_modules/glob-stream/node_modules/minimatch/minimatch.js b/source/node_modules/glob-stream/node_modules/minimatch/minimatch.js
new file mode 100644
index 000000000..ec4c05c57
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/minimatch/minimatch.js
@@ -0,0 +1,912 @@
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
+
+var path = { sep: '/' }
+try {
+ path = require('path')
+} catch (er) {}
+
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = require('brace-expansion')
+
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
+
+// * => any number of characters
+var star = qmark + '*?'
+
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === '') return p === ''
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ if (typeof pattern === 'undefined') {
+ throw new Error('undefined pattern')
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === '**') return GLOBSTAR
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var plType
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ case '/':
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({
+ type: plType,
+ start: i - 1,
+ reStart: re.length
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ re += ')'
+ var pl = patternListStack.pop()
+ plType = pl.type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:)
+ switch (plType) {
+ case '!':
+ negativeLists.push(pl)
+ re += ')[^/]*?)'
+ pl.reEnd = re.length
+ break
+ case '?':
+ case '+':
+ case '*':
+ re += plType
+ break
+ case '@': break // the default anyway
+ }
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ if (inClass) {
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '.':
+ case '[':
+ case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ var regExp = new RegExp('^' + re + '$', flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
diff --git a/source/node_modules/glob-stream/node_modules/minimatch/package.json b/source/node_modules/glob-stream/node_modules/minimatch/package.json
new file mode 100644
index 000000000..2f3028cce
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/minimatch/package.json
@@ -0,0 +1,89 @@
+{
+ "_args": [
+ [
+ "minimatch@^2.0.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream"
+ ]
+ ],
+ "_from": "minimatch@>=2.0.1 <3.0.0",
+ "_id": "minimatch@2.0.10",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob-stream/minimatch",
+ "_nodeVersion": "2.2.1",
+ "_npmUser": {
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
+ },
+ "_npmVersion": "3.1.0",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "minimatch",
+ "raw": "minimatch@^2.0.1",
+ "rawSpec": "^2.0.1",
+ "scope": null,
+ "spec": ">=2.0.1 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob-stream",
+ "/glob-stream/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7",
+ "_shrinkwrap": null,
+ "_spec": "minimatch@^2.0.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "dependencies": {
+ "brace-expansion": "^1.0.0"
+ },
+ "description": "a glob matcher in javascript",
+ "devDependencies": {
+ "browserify": "^9.0.3",
+ "standard": "^3.7.2",
+ "tap": "^1.2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7",
+ "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "files": [
+ "browser.js",
+ "minimatch.js"
+ ],
+ "gitHead": "6afb85f0c324b321f76a38df81891e562693e257",
+ "homepage": "https://github.com/isaacs/minimatch#readme",
+ "license": "ISC",
+ "main": "minimatch.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "minimatch",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "scripts": {
+ "posttest": "standard minimatch.js test/*.js",
+ "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare",
+ "test": "tap test/*.js"
+ },
+ "version": "2.0.10"
+}
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/.npmignore b/source/node_modules/glob-stream/node_modules/readable-stream/.npmignore
new file mode 100644
index 000000000..38344f87a
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/.npmignore
@@ -0,0 +1,5 @@
+build/
+test/
+examples/
+fs.js
+zlib.js
\ No newline at end of file
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/LICENSE b/source/node_modules/glob-stream/node_modules/readable-stream/LICENSE
new file mode 100644
index 000000000..e3d4e695a
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+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.
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/README.md b/source/node_modules/glob-stream/node_modules/readable-stream/README.md
new file mode 100644
index 000000000..3fb3e8023
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/README.md
@@ -0,0 +1,15 @@
+# readable-stream
+
+***Node-core streams for userland***
+
+[](https://nodei.co/npm/readable-stream/)
+[](https://nodei.co/npm/readable-stream/)
+
+This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
+
+If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core.
+
+**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.
+
+**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"`
+
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/duplex.js b/source/node_modules/glob-stream/node_modules/readable-stream/duplex.js
new file mode 100644
index 000000000..ca807af87
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_duplex.js")
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 000000000..b513d61a9
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,89 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+module.exports = Duplex;
+
+/**/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
+/* */
+
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+forEach(objectKeys(Writable.prototype), function(method) {
+ if (!Duplex.prototype[method])
+ Duplex.prototype[method] = Writable.prototype[method];
+});
+
+function Duplex(options) {
+ if (!(this instanceof Duplex))
+ return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false)
+ this.readable = false;
+
+ if (options && options.writable === false)
+ this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false)
+ this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended)
+ return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ process.nextTick(this.end.bind(this));
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 000000000..895ca50a1
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,46 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function(chunk, encoding, cb) {
+ cb(null, chunk);
+};
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 000000000..630722099
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,982 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+module.exports = Readable;
+
+/**/
+var isArray = require('isarray');
+/* */
+
+
+/**/
+var Buffer = require('buffer').Buffer;
+/* */
+
+Readable.ReadableState = ReadableState;
+
+var EE = require('events').EventEmitter;
+
+/**/
+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/* */
+
+var Stream = require('stream');
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+function ReadableState(options, stream) {
+ options = options || {};
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = false;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // In streams that never have any data, and do push(null) right away,
+ // the consumer can miss the 'end' event if they do some I/O before
+ // consuming the stream. So, we don't emit('end') until some reading
+ // happens.
+ this.calledRead = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, becuase any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ if (!(this instanceof Readable))
+ return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function(chunk, encoding) {
+ var state = this._readableState;
+
+ if (typeof chunk === 'string' && !state.objectMode) {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function(chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (chunk === null || chunk === undefined) {
+ state.reading = false;
+ if (!state.ended)
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
+
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) {
+ state.buffer.unshift(chunk);
+ } else {
+ state.reading = false;
+ state.buffer.push(chunk);
+ }
+
+ if (state.needReadable)
+ emitReadable(stream);
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &&
+ (state.needReadable ||
+ state.length < state.highWaterMark ||
+ state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function(enc) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+};
+
+// Don't raise the hwm > 128MB
+var MAX_HWM = 0x800000;
+function roundUpToNextPowerOf2(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2
+ n--;
+ for (var p = 1; p < 32; p <<= 1) n |= n >> p;
+ n++;
+ }
+ return n;
+}
+
+function howMuchToRead(n, state) {
+ if (state.length === 0 && state.ended)
+ return 0;
+
+ if (state.objectMode)
+ return n === 0 ? 0 : 1;
+
+ if (n === null || isNaN(n)) {
+ // only flow one buffer at a time
+ if (state.flowing && state.buffer.length)
+ return state.buffer[0].length;
+ else
+ return state.length;
+ }
+
+ if (n <= 0)
+ return 0;
+
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n > state.highWaterMark)
+ state.highWaterMark = roundUpToNextPowerOf2(n);
+
+ // don't have that much. return null, unless we've ended.
+ if (n > state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else
+ return state.length;
+ }
+
+ return n;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function(n) {
+ var state = this._readableState;
+ state.calledRead = true;
+ var nOrig = n;
+ var ret;
+
+ if (typeof n !== 'number' || n > 0)
+ state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &&
+ state.needReadable &&
+ (state.length >= state.highWaterMark || state.ended)) {
+ emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ ret = null;
+
+ // In cases where the decoder did not receive enough data
+ // to produce a full chunk, then immediately received an
+ // EOF, state.buffer will contain [, ].
+ // howMuchToRead will see this and coerce the amount to
+ // read to zero (because it's looking at the length of the
+ // first in state.buffer), and we'll end up here.
+ //
+ // This can only happen via state.decoder -- no other venue
+ // exists for pushing a zero-length chunk into state.buffer
+ // and triggering this behavior. In this case, we return our
+ // remaining data and end the stream, if appropriate.
+ if (state.length > 0 && state.decoder) {
+ ret = fromList(n, state);
+ state.length -= ret.length;
+ }
+
+ if (state.length === 0)
+ endReadable(this);
+
+ return ret;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length - n <= state.highWaterMark)
+ doRead = true;
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading)
+ doRead = false;
+
+ if (doRead) {
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0)
+ state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+
+ // If _read called its callback synchronously, then `reading`
+ // will be false, and we need to re-evaluate how much data we
+ // can return to the user.
+ if (doRead && !state.reading)
+ n = howMuchToRead(nOrig, state);
+
+ if (n > 0)
+ ret = fromList(n, state);
+ else
+ ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ }
+
+ state.length -= n;
+
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 && !state.ended)
+ state.needReadable = true;
+
+ // If we happened to read() exactly the remaining amount in the
+ // buffer, and the EOF has been seen at this point, then make sure
+ // that we emit 'end' on the very next tick.
+ if (state.ended && !state.endEmitted && state.length === 0)
+ endReadable(this);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!Buffer.isBuffer(chunk) &&
+ 'string' !== typeof chunk &&
+ chunk !== null &&
+ chunk !== undefined &&
+ !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+
+function onEofChunk(stream, state) {
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // if we've ended and we have some data left, then emit
+ // 'readable' now to make sure it gets picked up.
+ if (state.length > 0)
+ emitReadable(stream);
+ else
+ endReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (state.emittedReadable)
+ return;
+
+ state.emittedReadable = true;
+ if (state.sync)
+ process.nextTick(function() {
+ emitReadable_(stream);
+ });
+ else
+ emitReadable_(stream);
+}
+
+function emitReadable_(stream) {
+ stream.emit('readable');
+}
+
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ process.nextTick(function() {
+ maybeReadMore_(stream, state);
+ });
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended &&
+ state.length < state.highWaterMark) {
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;
+ else
+ len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function(n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function(dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
+ dest !== process.stdout &&
+ dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted)
+ process.nextTick(endFn);
+ else
+ src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ if (readable !== src) return;
+ cleanup();
+ }
+
+ function onend() {
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ function cleanup() {
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (!dest._writableState || dest._writableState.needDrain)
+ ondrain();
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EE.listenerCount(dest, 'error') === 0)
+ dest.emit('error', er);
+ }
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events || !dest._events.error)
+ dest.on('error', onerror);
+ else if (isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ // the handler that waits for readable events after all
+ // the data gets sucked out in flow.
+ // This would be easier to follow with a .once() handler
+ // in flow(), but that is too slow.
+ this.on('readable', pipeOnReadable);
+
+ state.flowing = true;
+ process.nextTick(function() {
+ flow(src);
+ });
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function() {
+ var dest = this;
+ var state = src._readableState;
+ state.awaitDrain--;
+ if (state.awaitDrain === 0)
+ flow(src);
+ };
+}
+
+function flow(src) {
+ var state = src._readableState;
+ var chunk;
+ state.awaitDrain = 0;
+
+ function write(dest, i, list) {
+ var written = dest.write(chunk);
+ if (false === written) {
+ state.awaitDrain++;
+ }
+ }
+
+ while (state.pipesCount && null !== (chunk = src.read())) {
+
+ if (state.pipesCount === 1)
+ write(state.pipes, 0, null);
+ else
+ forEach(state.pipes, write);
+
+ src.emit('data', chunk);
+
+ // if anyone needs a drain, then we have to wait for that.
+ if (state.awaitDrain > 0)
+ return;
+ }
+
+ // if every destination was unpiped, either before entering this
+ // function, or in the while loop, then stop flowing.
+ //
+ // NB: This is a pretty rare edge case.
+ if (state.pipesCount === 0) {
+ state.flowing = false;
+
+ // if there were data event listeners added, then switch to old mode.
+ if (EE.listenerCount(src, 'data') > 0)
+ emitDataEvents(src);
+ return;
+ }
+
+ // at this point, no one needed a drain, so we just ran out of data
+ // on the next readable event, start it over again.
+ state.ranOut = true;
+}
+
+function pipeOnReadable() {
+ if (this._readableState.ranOut) {
+ this._readableState.ranOut = false;
+ flow(this);
+ }
+}
+
+
+Readable.prototype.unpipe = function(dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0)
+ return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes)
+ return this;
+
+ if (!dest)
+ dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ this.removeListener('readable', pipeOnReadable);
+ state.flowing = false;
+ if (dest)
+ dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ this.removeListener('readable', pipeOnReadable);
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++)
+ dests[i].emit('unpipe', this);
+ return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1)
+ return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1)
+ state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function(ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data' && !this._readableState.flowing)
+ emitDataEvents(this);
+
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ this.read(0);
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function() {
+ emitDataEvents(this);
+ this.read(0);
+ this.emit('resume');
+};
+
+Readable.prototype.pause = function() {
+ emitDataEvents(this, true);
+ this.emit('pause');
+};
+
+function emitDataEvents(stream, startPaused) {
+ var state = stream._readableState;
+
+ if (state.flowing) {
+ // https://github.com/isaacs/readable-stream/issues/16
+ throw new Error('Cannot switch to old mode now.');
+ }
+
+ var paused = startPaused || false;
+ var readable = false;
+
+ // convert to an old-style stream.
+ stream.readable = true;
+ stream.pipe = Stream.prototype.pipe;
+ stream.on = stream.addListener = Stream.prototype.on;
+
+ stream.on('readable', function() {
+ readable = true;
+
+ var c;
+ while (!paused && (null !== (c = stream.read())))
+ stream.emit('data', c);
+
+ if (c === null) {
+ readable = false;
+ stream._readableState.needReadable = true;
+ }
+ });
+
+ stream.pause = function() {
+ paused = true;
+ this.emit('pause');
+ };
+
+ stream.resume = function() {
+ paused = false;
+ if (readable)
+ process.nextTick(function() {
+ stream.emit('readable');
+ });
+ else
+ this.read(0);
+ this.emit('resume');
+ };
+
+ // now make it start, just in case it hadn't already.
+ stream.emit('readable');
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function(stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function() {
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length)
+ self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function(chunk) {
+ if (state.decoder)
+ chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ //if (state.objectMode && util.isNullOrUndefined(chunk))
+ if (state.objectMode && (chunk === null || chunk === undefined))
+ return;
+ else if (!state.objectMode && (!chunk || !chunk.length))
+ return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (typeof stream[i] === 'function' &&
+ typeof this[i] === 'undefined') {
+ this[i] = function(method) { return function() {
+ return stream[method].apply(stream, arguments);
+ }}(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function(ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function(n) {
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+
+ // nothing in the list, definitely empty.
+ if (list.length === 0)
+ return null;
+
+ if (length === 0)
+ ret = null;
+ else if (objectMode)
+ ret = list.shift();
+ else if (!n || n >= length) {
+ // read it all, truncate the array.
+ if (stringMode)
+ ret = list.join('');
+ else
+ ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n < list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode)
+ ret = '';
+ else
+ ret = new Buffer(n);
+
+ var c = 0;
+ for (var i = 0, l = list.length; i < l && c < n; i++) {
+ var buf = list[0];
+ var cpy = Math.min(n - c, buf.length);
+
+ if (stringMode)
+ ret += buf.slice(0, cpy);
+ else
+ buf.copy(ret, c, 0, cpy);
+
+ if (cpy < buf.length)
+ list[0] = buf.slice(cpy);
+ else
+ list.shift();
+
+ c += cpy;
+ }
+ }
+ }
+
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0)
+ throw new Error('endReadable called on non-empty stream');
+
+ if (!state.endEmitted && state.calledRead) {
+ state.ended = true;
+ process.nextTick(function() {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+ });
+ }
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf (xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 000000000..eb188df3e
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,210 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+util.inherits(Transform, Duplex);
+
+
+function TransformState(options, stream) {
+ this.afterTransform = function(er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb)
+ return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data !== null && data !== undefined)
+ stream.push(data);
+
+ if (cb)
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+
+function Transform(options) {
+ if (!(this instanceof Transform))
+ return new Transform(options);
+
+ Duplex.call(this, options);
+
+ var ts = this._transformState = new TransformState(options, this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ this.once('finish', function() {
+ if ('function' === typeof this._flush)
+ this._flush(function(er) {
+ done(stream, er);
+ });
+ else
+ done(stream);
+ });
+}
+
+Transform.prototype.push = function(chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function(chunk, encoding, cb) {
+ throw new Error('not implemented');
+};
+
+Transform.prototype._write = function(chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform ||
+ rs.needReadable ||
+ rs.length < rs.highWaterMark)
+ this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function(n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+
+function done(stream, er) {
+ if (er)
+ return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var ts = stream._transformState;
+
+ if (ws.length)
+ throw new Error('calling transform done when ws.length != 0');
+
+ if (ts.transforming)
+ throw new Error('calling transform done when still transforming');
+
+ return stream.push(null);
+}
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 000000000..4bdaa4fa4
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,386 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, cb), and it'll handle all
+// the drain event emission and buffering.
+
+module.exports = Writable;
+
+/**/
+var Buffer = require('buffer').Buffer;
+/* */
+
+Writable.WritableState = WritableState;
+
+
+/**/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/* */
+
+var Stream = require('stream');
+
+util.inherits(Writable, Stream);
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+}
+
+function WritableState(options, stream) {
+ options = options || {};
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, becuase any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function(er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.buffer = [];
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+}
+
+function Writable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function() {
+ this.emit('error', new Error('Cannot pipe. Not readable.'));
+};
+
+
+function writeAfterEnd(stream, state, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ if (!Buffer.isBuffer(chunk) &&
+ 'string' !== typeof chunk &&
+ chunk !== null &&
+ chunk !== undefined &&
+ !state.objectMode) {
+ var er = new TypeError('Invalid non-string/buffer chunk');
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function(chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (Buffer.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function')
+ cb = function() {};
+
+ if (state.ended)
+ writeAfterEnd(this, state, cb);
+ else if (validChunk(this, state, chunk, cb))
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+
+ return ret;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &&
+ state.decodeStrings !== false &&
+ typeof chunk === 'string') {
+ chunk = new Buffer(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (Buffer.isBuffer(chunk))
+ encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret)
+ state.needDrain = true;
+
+ if (state.writing)
+ state.buffer.push(new WriteReq(chunk, encoding, cb));
+ else
+ doWrite(stream, state, len, chunk, encoding, cb);
+
+ return ret;
+}
+
+function doWrite(stream, state, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ if (sync)
+ process.nextTick(function() {
+ cb(er);
+ });
+ else
+ cb(er);
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er)
+ onwriteError(stream, state, sync, er, cb);
+ else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(stream, state);
+
+ if (!finished && !state.bufferProcessing && state.buffer.length)
+ clearBuffer(stream, state);
+
+ if (sync) {
+ process.nextTick(function() {
+ afterWrite(stream, state, finished, cb);
+ });
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished)
+ onwriteDrain(stream, state);
+ cb();
+ if (finished)
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+
+ for (var c = 0; c < state.buffer.length; c++) {
+ var entry = state.buffer[c];
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, len, chunk, encoding, cb);
+
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ c++;
+ break;
+ }
+ }
+
+ state.bufferProcessing = false;
+ if (c < state.buffer.length)
+ state.buffer = state.buffer.slice(c);
+ else
+ state.buffer.length = 0;
+}
+
+Writable.prototype._write = function(chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+};
+
+Writable.prototype.end = function(chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (typeof chunk !== 'undefined' && chunk !== null)
+ this.write(chunk, encoding);
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished)
+ endWritable(this, state, cb);
+};
+
+
+function needFinish(stream, state) {
+ return (state.ending &&
+ state.length === 0 &&
+ !state.finished &&
+ !state.writing);
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(stream, state);
+ if (need) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished)
+ process.nextTick(cb);
+ else
+ stream.once('finish', cb);
+ }
+ state.ended = true;
+}
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/package.json b/source/node_modules/glob-stream/node_modules/readable-stream/package.json
new file mode 100644
index 000000000..1592d4c8b
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/package.json
@@ -0,0 +1,95 @@
+{
+ "_args": [
+ [
+ "readable-stream@>=1.0.33-1 <1.1.0-0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream/node_modules/through2"
+ ]
+ ],
+ "_from": "readable-stream@>=1.0.33-1 <1.1.0-0",
+ "_id": "readable-stream@1.0.33",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob-stream/readable-stream",
+ "_npmUser": {
+ "email": "rod@vagg.org",
+ "name": "rvagg"
+ },
+ "_npmVersion": "1.4.28",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "readable-stream",
+ "raw": "readable-stream@>=1.0.33-1 <1.1.0-0",
+ "rawSpec": ">=1.0.33-1 <1.1.0-0",
+ "scope": null,
+ "spec": ">=1.0.33-1 <1.1.0-0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob-stream/through2"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz",
+ "_shasum": "3a360dd66c1b1d7fd4705389860eda1d0f61126c",
+ "_shrinkwrap": null,
+ "_spec": "readable-stream@>=1.0.33-1 <1.1.0-0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream/node_modules/through2",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "browser": {
+ "util": false
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/readable-stream/issues"
+ },
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ },
+ "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x",
+ "devDependencies": {
+ "tap": "~0.2.6"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "3a360dd66c1b1d7fd4705389860eda1d0f61126c",
+ "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz"
+ },
+ "gitHead": "0bf97a117c5646556548966409ebc57a6dda2638",
+ "homepage": "https://github.com/isaacs/readable-stream",
+ "keywords": [
+ "pipe",
+ "readable",
+ "stream"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ }
+ ],
+ "name": "readable-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/readable-stream.git"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "version": "1.0.33"
+}
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/passthrough.js b/source/node_modules/glob-stream/node_modules/readable-stream/passthrough.js
new file mode 100644
index 000000000..27e8d8a55
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_passthrough.js")
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/readable.js b/source/node_modules/glob-stream/node_modules/readable-stream/readable.js
new file mode 100644
index 000000000..8b5337b5c
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/readable.js
@@ -0,0 +1,8 @@
+var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = Stream;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/transform.js b/source/node_modules/glob-stream/node_modules/readable-stream/transform.js
new file mode 100644
index 000000000..5d482f078
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_transform.js")
diff --git a/source/node_modules/glob-stream/node_modules/readable-stream/writable.js b/source/node_modules/glob-stream/node_modules/readable-stream/writable.js
new file mode 100644
index 000000000..e1e9efdf3
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/readable-stream/writable.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_writable.js")
diff --git a/source/node_modules/glob-stream/node_modules/through2/.npmignore b/source/node_modules/glob-stream/node_modules/through2/.npmignore
new file mode 100644
index 000000000..1e1dcab34
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/through2/.npmignore
@@ -0,0 +1,3 @@
+test
+.jshintrc
+.travis.yml
\ No newline at end of file
diff --git a/source/node_modules/glob-stream/node_modules/through2/LICENSE b/source/node_modules/glob-stream/node_modules/through2/LICENSE
new file mode 100644
index 000000000..f6a0029de
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/through2/LICENSE
@@ -0,0 +1,39 @@
+Copyright 2013, Rod Vagg (the "Original Author")
+All rights reserved.
+
+MIT +no-false-attribs License
+
+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.
+
+Distributions of all or part of the Software intended to be used
+by the recipients as they would use the unmodified Software,
+containing modifications that substantially alter, remove, or
+disable functionality of the Software, outside of the documented
+configuration mechanisms provided by the Software, shall be
+modified such that the Original Author's bug reporting email
+addresses and urls are either replaced with the contact information
+of the parties responsible for the changes, or removed entirely.
+
+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.
+
+
+Except where noted, this license applies to any and all software
+programs and associated documentation files created by the
+Original Author, when distributed with the Software.
\ No newline at end of file
diff --git a/source/node_modules/glob-stream/node_modules/through2/README.md b/source/node_modules/glob-stream/node_modules/through2/README.md
new file mode 100644
index 000000000..11259a5f7
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/through2/README.md
@@ -0,0 +1,132 @@
+# through2
+
+[](https://nodei.co/npm/through2/)
+
+**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
+
+Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
+
+Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
+
+```js
+fs.createReadStream('ex.txt')
+ .pipe(through2(function (chunk, enc, callback) {
+ for (var i = 0; i < chunk.length; i++)
+ if (chunk[i] == 97)
+ chunk[i] = 122 // swap 'a' for 'z'
+
+ this.push(chunk)
+
+ callback()
+ }))
+ .pipe(fs.createWriteStream('out.txt'))
+```
+
+Or object streams:
+
+```js
+var all = []
+
+fs.createReadStream('data.csv')
+ .pipe(csv2())
+ .pipe(through2.obj(function (chunk, enc, callback) {
+ var data = {
+ name : chunk[0]
+ , address : chunk[3]
+ , phone : chunk[10]
+ }
+ this.push(data)
+
+ callback()
+ }))
+ .on('data', function (data) {
+ all.push(data)
+ })
+ .on('end', function () {
+ doSomethingSpecial(all)
+ })
+```
+
+Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
+
+## API
+
+through2([ options, ] [ transformFunction ] [, flushFunction ])
+
+Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
+
+### options
+
+The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
+
+The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2({ objectMode: true, allowHalfOpen: false },
+ function (chunk, enc, cb) {
+ cb(null, 'wut?') // note we can use the second argument on the callback
+ // to provide data as an alternative to this.push('wut?')
+ }
+ )
+ .pipe(fs.createWriteStream('/tmp/wut.txt'))
+```
+
+### transformFunction
+
+The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
+
+To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
+
+Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
+
+If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
+
+### flushFunction
+
+The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2(
+ function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
+ function (cb) { // flush function
+ this.push('tacking on an extra buffer to the end');
+ cb();
+ }
+ ))
+ .pipe(fs.createWriteStream('/tmp/wut.txt'));
+```
+
+through2.ctor([ options, ] transformFunction[, flushFunction ])
+
+Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+```js
+var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
+ if (record.temp != null && record.unit = "F") {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = "C"
+ }
+ this.push(record)
+ callback()
+})
+
+// Create instances of FToC like so:
+var converter = new FToC()
+// Or:
+var converter = FToC()
+// Or specify/override options when you instantiate, if you prefer:
+var converter = FToC({objectMode: true})
+```
+
+## See Also
+
+ - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
+ - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
+ - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
+ - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
+
+## License
+
+**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
diff --git a/source/node_modules/glob-stream/node_modules/through2/package.json b/source/node_modules/glob-stream/node_modules/through2/package.json
new file mode 100644
index 000000000..e01574283
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/through2/package.json
@@ -0,0 +1,92 @@
+{
+ "_args": [
+ [
+ "through2@^0.6.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream"
+ ],
+ [
+ "through2@^0.6.1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs"
+ ]
+ ],
+ "_from": "through2@>=0.6.1 <0.7.0",
+ "_id": "through2@0.6.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob-stream/through2",
+ "_npmUser": {
+ "email": "bryce@ravenwall.com",
+ "name": "bryce"
+ },
+ "_npmVersion": "1.4.28",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "through2",
+ "raw": "through2@^0.6.1",
+ "rawSpec": "^0.6.1",
+ "scope": null,
+ "spec": ">=0.6.1 <0.7.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob-stream"
+ ],
+ "_shrinkwrap": null,
+ "_spec": "through2@^0.6.1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream",
+ "author": {
+ "email": "r@va.gg",
+ "name": "Rod Vagg",
+ "url": "https://github.com/rvagg"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/through2/issues"
+ },
+ "dependencies": {
+ "readable-stream": ">=1.0.33-1 <1.1.0-0",
+ "xtend": ">=4.0.0 <4.1.0-0"
+ },
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
+ "devDependencies": {
+ "bl": ">=0.9.0 <0.10.0-0",
+ "stream-spigot": ">=3.0.4 <3.1.0-0",
+ "tape": ">=2.14.0 <2.15.0-0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48",
+ "tarball": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
+ },
+ "gitHead": "ba4a87875f2c82323c10023e36f4ae4b386c1bf8",
+ "homepage": "https://github.com/rvagg/through2",
+ "keywords": [
+ "stream",
+ "streams2",
+ "through",
+ "transform"
+ ],
+ "license": "MIT",
+ "main": "through2.js",
+ "maintainers": [
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ {
+ "name": "bryce",
+ "email": "bryce@ravenwall.com"
+ }
+ ],
+ "name": "through2",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/through2.git"
+ },
+ "scripts": {
+ "test": "node test/test.js",
+ "test-local": "brtapsauce-local test/basic-test.js"
+ },
+ "version": "0.6.5"
+}
diff --git a/source/node_modules/glob-stream/node_modules/through2/through2.js b/source/node_modules/glob-stream/node_modules/through2/through2.js
new file mode 100644
index 000000000..5b7a880e8
--- /dev/null
+++ b/source/node_modules/glob-stream/node_modules/through2/through2.js
@@ -0,0 +1,96 @@
+var Transform = require('readable-stream/transform')
+ , inherits = require('util').inherits
+ , xtend = require('xtend')
+
+function DestroyableTransform(opts) {
+ Transform.call(this, opts)
+ this._destroyed = false
+}
+
+inherits(DestroyableTransform, Transform)
+
+DestroyableTransform.prototype.destroy = function(err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err)
+ self.emit('error', err)
+ self.emit('close')
+ })
+}
+
+// a noop _transform function
+function noop (chunk, enc, callback) {
+ callback(null, chunk)
+}
+
+
+// create a new export function, used by both the main export and
+// the .ctor export, contains common logic for dealing with arguments
+function through2 (construct) {
+ return function (options, transform, flush) {
+ if (typeof options == 'function') {
+ flush = transform
+ transform = options
+ options = {}
+ }
+
+ if (typeof transform != 'function')
+ transform = noop
+
+ if (typeof flush != 'function')
+ flush = null
+
+ return construct(options, transform, flush)
+ }
+}
+
+
+// main export, just make me a transform stream!
+module.exports = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(options)
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
+
+
+// make me a reusable prototype that I can `new`, or implicitly `new`
+// with a constructor call
+module.exports.ctor = through2(function (options, transform, flush) {
+ function Through2 (override) {
+ if (!(this instanceof Through2))
+ return new Through2(override)
+
+ this.options = xtend(options, override)
+
+ DestroyableTransform.call(this, this.options)
+ }
+
+ inherits(Through2, DestroyableTransform)
+
+ Through2.prototype._transform = transform
+
+ if (flush)
+ Through2.prototype._flush = flush
+
+ return Through2
+})
+
+
+module.exports.obj = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
diff --git a/source/node_modules/glob-stream/package.json b/source/node_modules/glob-stream/package.json
new file mode 100644
index 000000000..505670554
--- /dev/null
+++ b/source/node_modules/glob-stream/package.json
@@ -0,0 +1,110 @@
+{
+ "_args": [
+ [
+ "glob-stream@^3.1.5",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs"
+ ]
+ ],
+ "_from": "glob-stream@>=3.1.5 <4.0.0",
+ "_id": "glob-stream@3.1.18",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob-stream",
+ "_nodeVersion": "0.10.33",
+ "_npmUser": {
+ "email": "contact@wearefractal.com",
+ "name": "fractal"
+ },
+ "_npmVersion": "2.1.6",
+ "_phantomChildren": {
+ "brace-expansion": "1.1.3",
+ "core-util-is": "1.0.2",
+ "inflight": "1.0.4",
+ "inherits": "2.0.1",
+ "isarray": "0.0.1",
+ "once": "1.3.3",
+ "string_decoder": "0.10.31",
+ "xtend": "4.0.1"
+ },
+ "_requested": {
+ "name": "glob-stream",
+ "raw": "glob-stream@^3.1.5",
+ "rawSpec": "^3.1.5",
+ "scope": null,
+ "spec": ">=3.1.5 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/vinyl-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz",
+ "_shasum": "9170a5f12b790306fdfe598f313f8f7954fd143b",
+ "_shrinkwrap": null,
+ "_spec": "glob-stream@^3.1.5",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs",
+ "author": {
+ "email": "contact@wearefractal.com",
+ "name": "Fractal",
+ "url": "http://wearefractal.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/wearefractal/glob-stream/issues"
+ },
+ "dependencies": {
+ "glob": "^4.3.1",
+ "glob2base": "^0.0.12",
+ "minimatch": "^2.0.1",
+ "ordered-read-streams": "^0.1.0",
+ "through2": "^0.6.1",
+ "unique-stream": "^1.0.0"
+ },
+ "description": "File system globs as a stream",
+ "devDependencies": {
+ "coveralls": "^2.11.2",
+ "istanbul": "^0.3.0",
+ "istanbul-coveralls": "^1.0.1",
+ "jshint": "^2.5.10",
+ "mocha": "^2.0.0",
+ "mocha-lcov-reporter": "0.0.1",
+ "rimraf": "^2.2.5",
+ "should": "^4.3.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9170a5f12b790306fdfe598f313f8f7954fd143b",
+ "tarball": "http://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz"
+ },
+ "engines": {
+ "node": ">= 0.9"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "472b98e7a0a747a3c72454337def65cebc4fb78e",
+ "homepage": "http://github.com/wearefractal/glob-stream",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/wearefractal/glob-stream/raw/master/LICENSE"
+ }
+ ],
+ "main": "./index.js",
+ "maintainers": [
+ {
+ "name": "fractal",
+ "email": "contact@wearefractal.com"
+ }
+ ],
+ "name": "glob-stream",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/wearefractal/glob-stream.git"
+ },
+ "scripts": {
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && istanbul-coveralls",
+ "test": "mocha --reporter spec && jshint"
+ },
+ "version": "3.1.18"
+}
diff --git a/source/node_modules/glob-watcher/.npmignore b/source/node_modules/glob-watcher/.npmignore
new file mode 100644
index 000000000..b5ef13a3c
--- /dev/null
+++ b/source/node_modules/glob-watcher/.npmignore
@@ -0,0 +1,6 @@
+.DS_Store
+*.log
+node_modules
+build
+*.node
+components
\ No newline at end of file
diff --git a/source/node_modules/glob-watcher/.travis.yml b/source/node_modules/glob-watcher/.travis.yml
new file mode 100644
index 000000000..33ad9f8c8
--- /dev/null
+++ b/source/node_modules/glob-watcher/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.9"
+ - "0.10"
+after_script:
+ - npm run coveralls
\ No newline at end of file
diff --git a/source/node_modules/glob-watcher/LICENSE b/source/node_modules/glob-watcher/LICENSE
new file mode 100755
index 000000000..4f482f9ba
--- /dev/null
+++ b/source/node_modules/glob-watcher/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Fractal
+
+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.
diff --git a/source/node_modules/glob-watcher/README.md b/source/node_modules/glob-watcher/README.md
new file mode 100644
index 000000000..129311ebc
--- /dev/null
+++ b/source/node_modules/glob-watcher/README.md
@@ -0,0 +1,53 @@
+# glob-watcher [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
+
+## Information
+
+
+
+Package glob-watcher
+
+
+Description
+Watch globs
+
+
+Node Version
+>= 0.9
+
+
+
+## Usage
+
+```javascript
+var watch = require('glob-watcher');
+
+// callback interface
+watch(["./*.js", "!./something.js"], function(evt){
+ // evt has what file changed and all that jazz
+});
+
+// EE interface
+var watcher = watch(["./*.js", "!./something.js"]);
+watcher.on('change', function(evt) {
+ // evt has what file changed and all that jazz
+});
+
+// add files after it has been created
+watcher.add("./somefolder/somefile.js");
+```
+
+
+[npm-url]: https://npmjs.org/package/glob-watcher
+[npm-image]: https://badge.fury.io/js/glob-watcher.png
+
+[travis-url]: https://travis-ci.org/wearefractal/glob-watcher
+[travis-image]: https://travis-ci.org/wearefractal/glob-watcher.png?branch=master
+
+[coveralls-url]: https://coveralls.io/r/wearefractal/glob-watcher
+[coveralls-image]: https://coveralls.io/repos/wearefractal/glob-watcher/badge.png
+
+[depstat-url]: https://david-dm.org/wearefractal/glob-watcher
+[depstat-image]: https://david-dm.org/wearefractal/glob-watcher.png
+
+[david-url]: https://david-dm.org/wearefractal/glob-watcher
+[david-image]: https://david-dm.org/wearefractal/glob-watcher.png?theme=shields.io
diff --git a/source/node_modules/glob-watcher/index.js b/source/node_modules/glob-watcher/index.js
new file mode 100644
index 000000000..907defd4e
--- /dev/null
+++ b/source/node_modules/glob-watcher/index.js
@@ -0,0 +1,39 @@
+var gaze = require('gaze');
+var EventEmitter = require('events').EventEmitter;
+
+module.exports = function(glob, opts, cb) {
+ var out = new EventEmitter();
+
+ if (typeof opts === 'function') {
+ cb = opts;
+ opts = {};
+ }
+
+ var watcher = gaze(glob, opts, function(err, rwatcher){
+ if (err) out.emit('error', err);
+ rwatcher.on('all', function(evt, path, old){
+ var outEvt = {type: evt, path: path};
+ if(old) outEvt.old = old;
+ out.emit('change', outEvt);
+ if(cb) cb(outEvt);
+ });
+ });
+
+ watcher.on('end', out.emit.bind(out, 'end'));
+ watcher.on('error', out.emit.bind(out, 'error'));
+ watcher.on('ready', out.emit.bind(out, 'ready'));
+ watcher.on('nomatch', out.emit.bind(out, 'nomatch'));
+
+ out.end = function(){
+ return watcher.close();
+ };
+ out.add = function(){
+ return watcher.add.apply(watcher, arguments);
+ };
+ out.remove = function(){
+ return watcher.remove();
+ };
+ out._watcher = watcher;
+
+ return out;
+};
diff --git a/source/node_modules/glob-watcher/package.json b/source/node_modules/glob-watcher/package.json
new file mode 100644
index 000000000..1457d3fcf
--- /dev/null
+++ b/source/node_modules/glob-watcher/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ "glob-watcher@^0.0.6",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs"
+ ]
+ ],
+ "_from": "glob-watcher@>=0.0.6 <0.0.7",
+ "_id": "glob-watcher@0.0.6",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob-watcher",
+ "_npmUser": {
+ "email": "contact@wearefractal.com",
+ "name": "fractal"
+ },
+ "_npmVersion": "1.4.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "glob-watcher",
+ "raw": "glob-watcher@^0.0.6",
+ "rawSpec": "^0.0.6",
+ "scope": null,
+ "spec": ">=0.0.6 <0.0.7",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/vinyl-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz",
+ "_shasum": "b95b4a8df74b39c83298b0c05c978b4d9a3b710b",
+ "_shrinkwrap": null,
+ "_spec": "glob-watcher@^0.0.6",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/vinyl-fs",
+ "author": {
+ "email": "contact@wearefractal.com",
+ "name": "Fractal",
+ "url": "http://wearefractal.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/wearefractal/glob-watcher/issues"
+ },
+ "dependencies": {
+ "gaze": "^0.5.1"
+ },
+ "description": "Watch globs",
+ "devDependencies": {
+ "coveralls": "^2.6.1",
+ "istanbul": "^0.2.3",
+ "jshint": "^2.4.1",
+ "mkdirp": "^0.3.5",
+ "mocha": "^1.17.0",
+ "mocha-lcov-reporter": "0.0.1",
+ "rimraf": "^2.2.5",
+ "should": "^2.1.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "b95b4a8df74b39c83298b0c05c978b4d9a3b710b",
+ "tarball": "http://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz"
+ },
+ "engines": {
+ "node": ">= 0.9"
+ },
+ "homepage": "http://github.com/wearefractal/glob-watcher",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/wearefractal/glob-watcher/raw/master/LICENSE"
+ }
+ ],
+ "main": "./index.js",
+ "maintainers": [
+ {
+ "name": "fractal",
+ "email": "contact@wearefractal.com"
+ }
+ ],
+ "name": "glob-watcher",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/wearefractal/glob-watcher.git"
+ },
+ "scripts": {
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
+ "test": "mocha --reporter spec && jshint"
+ },
+ "version": "0.0.6"
+}
diff --git a/source/node_modules/glob-watcher/test/fixtures/test.coffee b/source/node_modules/glob-watcher/test/fixtures/test.coffee
new file mode 100644
index 000000000..4be3c4508
--- /dev/null
+++ b/source/node_modules/glob-watcher/test/fixtures/test.coffee
@@ -0,0 +1 @@
+test test
\ No newline at end of file
diff --git a/source/node_modules/glob-watcher/test/main.js b/source/node_modules/glob-watcher/test/main.js
new file mode 100644
index 000000000..2903e8f8a
--- /dev/null
+++ b/source/node_modules/glob-watcher/test/main.js
@@ -0,0 +1,87 @@
+var watch = require('../');
+var should = require('should');
+var path = require('path');
+var fs = require('fs');
+var rimraf = require('rimraf');
+var mkdirp = require('mkdirp');
+
+require('mocha');
+
+describe('glob-watcher', function() {
+ it('should return a valid file struct via EE', function(done) {
+ var expectedName = path.join(__dirname, "./fixtures/stuff/temp.coffee");
+ var fname = path.join(__dirname, "./fixtures/**/temp.coffee");
+ mkdirp.sync(path.dirname(expectedName));
+ fs.writeFileSync(expectedName, "testing");
+
+ var watcher = watch(fname);
+ watcher.on('change', function(evt) {
+ should.exist(evt);
+ should.exist(evt.path);
+ should.exist(evt.type);
+ evt.type.should.equal('changed');
+ evt.path.should.equal(expectedName);
+ watcher.end();
+ });
+ watcher.on('end', function(){
+ rimraf.sync(expectedName);
+ done();
+ });
+ setTimeout(function(){
+ fs.writeFileSync(expectedName, "test test");
+ }, 125);
+ });
+
+ it('should emit nomatch via EE', function(done) {
+ var fname = path.join(__dirname, "./doesnt_exist_lol/temp.coffee");
+
+ var watcher = watch(fname);
+ watcher.on('nomatch', function() {
+ done();
+ });
+ });
+
+ it('should return a valid file struct via callback', function(done) {
+ var expectedName = path.join(__dirname, "./fixtures/stuff/test.coffee");
+ var fname = path.join(__dirname, "./fixtures/**/test.coffee");
+ mkdirp.sync(path.dirname(expectedName));
+ fs.writeFileSync(expectedName, "testing");
+
+ var watcher = watch(fname, function(evt) {
+ should.exist(evt);
+ should.exist(evt.path);
+ should.exist(evt.type);
+ evt.type.should.equal('changed');
+ evt.path.should.equal(expectedName);
+ watcher.end();
+ });
+
+ watcher.on('end', function(){
+ rimraf.sync(expectedName);
+ done();
+ });
+ setTimeout(function(){
+ fs.writeFileSync(expectedName, "test test");
+ }, 200);
+ });
+
+ it('should not return a non-matching file struct via callback', function(done) {
+ var expectedName = path.join(__dirname, "./fixtures/test123.coffee");
+ var fname = path.join(__dirname, "./fixtures/**/test.coffee");
+ mkdirp.sync(path.dirname(expectedName));
+ fs.writeFileSync(expectedName, "testing");
+
+ var watcher = watch(fname, function(evt) {
+ throw new Error("Should not have been called! "+evt.path);
+ });
+
+ setTimeout(function(){
+ fs.writeFileSync(expectedName, "test test");
+ }, 200);
+
+ setTimeout(function(){
+ rimraf.sync(expectedName);
+ done();
+ }, 1500);
+ });
+});
\ No newline at end of file
diff --git a/source/node_modules/glob/LICENSE b/source/node_modules/glob/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/source/node_modules/glob/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/glob/README.md b/source/node_modules/glob/README.md
new file mode 100644
index 000000000..063cf950a
--- /dev/null
+++ b/source/node_modules/glob/README.md
@@ -0,0 +1,377 @@
+[](https://travis-ci.org/isaacs/node-glob/) [](https://david-dm.org/isaacs/node-glob) [](https://david-dm.org/isaacs/node-glob#info=devDependencies) [](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
+
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Glob Primer
+
+"Globs" are the patterns you type when you do stuff like `ls *.js` on
+the command line, or put `build/*` in a `.gitignore` file.
+
+Before parsing the path part patterns, braced sections are expanded
+into a set. Braced sections start with `{` and end with `}`, with any
+number of comma-delimited sections within. Braced sections may contain
+slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
+
+The following characters have special magic meaning when used in a
+path portion:
+
+* `*` Matches 0 or more characters in a single path portion
+* `?` Matches 1 character
+* `[...]` Matches a range of characters, similar to a RegExp range.
+ If the first character of the range is `!` or `^` then it matches
+ any character not in the range.
+* `!(pattern|pattern|pattern)` Matches anything that does not match
+ any of the patterns provided.
+* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
+ patterns provided.
+* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
+ patterns provided.
+* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
+* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
+ provided
+* `**` If a "globstar" is alone in a path portion, then it matches
+ zero or more directories and subdirectories searching for matches.
+ It does not crawl symlinked directories.
+
+### Dots
+
+If a file or directory path portion has a `.` as the first character,
+then it will not match any glob pattern unless that pattern's
+corresponding path part also has a `.` as its first character.
+
+For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
+However the pattern `a/*/c` would not, because `*` does not start with
+a dot character.
+
+You can make glob treat dots as normal characters by setting
+`dot:true` in the options.
+
+### Basename Matching
+
+If you set `matchBase:true` in the options, and the pattern has no
+slashes in it, then it will seek for any file anywhere in the tree
+with a matching basename. For example, `*.js` would match
+`test/simple/basic.js`.
+
+### Negation
+
+The intent for negation would be for a pattern starting with `!` to
+match everything that *doesn't* match the supplied pattern. However,
+the implementation is weird, and for the time being, this should be
+avoided. The behavior is deprecated in version 5, and will be removed
+entirely in version 6.
+
+### Empty Sets
+
+If no matching files are found, then an empty array is returned. This
+differs from the shell, where the pattern itself is returned. For
+example:
+
+ $ echo a*s*d*f
+ a*s*d*f
+
+To get the bash-style behavior, set the `nonull:true` in the options.
+
+### See Also:
+
+* `man sh`
+* `man bash` (Search for "Pattern Matching")
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob.hasMagic(pattern, [options])
+
+Returns `true` if there are any special characters in the pattern, and
+`false` otherwise.
+
+Note that the options affect the results. If `noext:true` is set in
+the options object, then `+(a|b)` will not be considered a magic
+pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
+then that is considered magical, unless `nobrace:true` is set in the
+options.
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+ * `err` {Error | null}
+ * `matches` {Array} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options])
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instantiating the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+ * `err` {Error | null}
+ * `matches` {Array} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `'DIR'` - Path exists, and is not a directory
+ * `'FILE'` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+* `statCache` Cache of `fs.stat` results, to prevent statting the same
+ path multiple times.
+* `symlinks` A record of which paths are symbolic links, which is
+ relevant in resolving `**` patterns.
+* `realpathCache` An optional object which is passed to `fs.realpath`
+ to minimize unnecessary syscalls. It is stored on the instantiated
+ Glob object, and may be re-used.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `pause` Temporarily stop the search
+* `resume` Resume the search
+* `abort` Stop the search forever
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the Glob object, as well.
+
+If you are running many `glob` operations, you can pass a Glob object
+as the `options` argument to a subsequent operation to shortcut some
+`stat` and `readdir` calls. At the very least, you may pass in shared
+`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
+parallel glob operations will be sped up by sharing information about
+the filesystem.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence.
+* `silent` When an unusual error is encountered when attempting to
+ read a directory, a warning will be printed to stderr. Set the
+ `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered when attempting to
+ read a directory, the process will just continue on in search of
+ other matches. Set the `strict` option to raise an error in these
+ cases.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary
+ to set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `symlinks` A cache of known symbolic links. You may pass in a
+ previously generated `symlinks` object to save `lstat` calls when
+ resolving `**` matches.
+* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set. Set this
+ flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `debug` Set to enable debug logging in minimatch and glob.
+* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
+* `noglobstar` Do not match `**` against multiple filenames. (Ie,
+ treat it as a normal `*` instead.)
+* `noext` Do not match `+(a|b)` "extglob" patterns.
+* `nocase` Perform a case-insensitive match. Note: on
+ case-insensitive filesystems, non-magic patterns will match by
+ default, since `stat` and `readdir` will not raise errors.
+* `matchBase` Perform a basename-only match if the pattern does not
+ contain any slash characters. That is, `*.js` would be treated as
+ equivalent to `**/*.js`, matching all js files in all directories.
+* `nodir` Do not match directories, only files. (Note: to match
+ *only* directories, simply put a `/` at the end of the pattern.)
+* `ignore` Add a pattern or an array of patterns to exclude matches.
+* `follow` Follow symlinked directories when expanding `**` patterns.
+ Note that this can result in a lot of duplicate references in the
+ presence of cyclic links.
+* `realpath` Set to true to call `fs.realpath` on all of the results.
+ In the case of a symlink that cannot be resolved, the full absolute
+ path to the matched entry is returned (though it will usually be a
+ broken symlink)
+* `nonegate` Suppress deprecated `negate` behavior. (See below.)
+ Default=true
+* `nocomment` Suppress deprecated `comment` behavior. (See below.)
+ Default=true
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.3, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+Note that symlinked directories are not crawled as part of a `**`,
+though their contents may match against subsequent portions of the
+pattern. This prevents infinite loops and duplicates and the like.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+### Comments and Negation
+
+**Note**: In version 5 of this module, negation and comments are
+**disabled** by default. You can explicitly set `nonegate:false` or
+`nocomment:false` to re-enable them. They are going away entirely in
+version 6.
+
+The intent for negation would be for a pattern starting with `!` to
+match everything that *doesn't* match the supplied pattern. However,
+the implementation is weird. It is better to use the `ignore` option
+to set a pattern or set of patterns to exclude from matches. If you
+want the "everything except *x*" type of behavior, you can use `**` as
+the main pattern, and set an `ignore` for the things to exclude.
+
+The comments feature is added in minimatch, primarily to more easily
+support use cases like ignore files, where a `#` at the start of a
+line makes the pattern "empty". However, in the context of a
+straightforward filesystem globber, "comments" don't make much sense.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the cache or statCache objects are reused between glob
+calls.
+
+Users are thus advised not to use a glob result as a guarantee of
+filesystem state in the face of rapid changes. For the vast majority
+of operations, this is never a problem.
+
+## Contributing
+
+Any change to behavior (including bugfixes) must come with a test.
+
+Patches that fail tests or reduce performance will be rejected.
+
+```
+# to run tests
+npm test
+
+# to re-generate test fixtures
+npm run test-regen
+
+# to benchmark against bash/zsh
+npm run bench
+
+# to profile javascript
+npm run prof
+```
diff --git a/source/node_modules/glob/common.js b/source/node_modules/glob/common.js
new file mode 100644
index 000000000..e36a631ca
--- /dev/null
+++ b/source/node_modules/glob/common.js
@@ -0,0 +1,245 @@
+exports.alphasort = alphasort
+exports.alphasorti = alphasorti
+exports.setopts = setopts
+exports.ownProp = ownProp
+exports.makeAbs = makeAbs
+exports.finish = finish
+exports.mark = mark
+exports.isIgnored = isIgnored
+exports.childrenIgnored = childrenIgnored
+
+function ownProp (obj, field) {
+ return Object.prototype.hasOwnProperty.call(obj, field)
+}
+
+var path = require("path")
+var minimatch = require("minimatch")
+var isAbsolute = require("path-is-absolute")
+var Minimatch = minimatch.Minimatch
+
+function alphasorti (a, b) {
+ return a.toLowerCase().localeCompare(b.toLowerCase())
+}
+
+function alphasort (a, b) {
+ return a.localeCompare(b)
+}
+
+function setupIgnores (self, options) {
+ self.ignore = options.ignore || []
+
+ if (!Array.isArray(self.ignore))
+ self.ignore = [self.ignore]
+
+ if (self.ignore.length) {
+ self.ignore = self.ignore.map(ignoreMap)
+ }
+}
+
+function ignoreMap (pattern) {
+ var gmatcher = null
+ if (pattern.slice(-3) === '/**') {
+ var gpattern = pattern.replace(/(\/\*\*)+$/, '')
+ gmatcher = new Minimatch(gpattern)
+ }
+
+ return {
+ matcher: new Minimatch(pattern),
+ gmatcher: gmatcher
+ }
+}
+
+function setopts (self, pattern, options) {
+ if (!options)
+ options = {}
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ self.silent = !!options.silent
+ self.pattern = pattern
+ self.strict = options.strict !== false
+ self.realpath = !!options.realpath
+ self.realpathCache = options.realpathCache || Object.create(null)
+ self.follow = !!options.follow
+ self.dot = !!options.dot
+ self.mark = !!options.mark
+ self.nodir = !!options.nodir
+ if (self.nodir)
+ self.mark = true
+ self.sync = !!options.sync
+ self.nounique = !!options.nounique
+ self.nonull = !!options.nonull
+ self.nosort = !!options.nosort
+ self.nocase = !!options.nocase
+ self.stat = !!options.stat
+ self.noprocess = !!options.noprocess
+
+ self.maxLength = options.maxLength || Infinity
+ self.cache = options.cache || Object.create(null)
+ self.statCache = options.statCache || Object.create(null)
+ self.symlinks = options.symlinks || Object.create(null)
+
+ setupIgnores(self, options)
+
+ self.changedCwd = false
+ var cwd = process.cwd()
+ if (!ownProp(options, "cwd"))
+ self.cwd = cwd
+ else {
+ self.cwd = options.cwd
+ self.changedCwd = path.resolve(options.cwd) !== cwd
+ }
+
+ self.root = options.root || path.resolve(self.cwd, "/")
+ self.root = path.resolve(self.root)
+ if (process.platform === "win32")
+ self.root = self.root.replace(/\\/g, "/")
+
+ self.nomount = !!options.nomount
+
+ // disable comments and negation unless the user explicitly
+ // passes in false as the option.
+ options.nonegate = options.nonegate === false ? false : true
+ options.nocomment = options.nocomment === false ? false : true
+ deprecationWarning(options)
+
+ self.minimatch = new Minimatch(pattern, options)
+ self.options = self.minimatch.options
+}
+
+// TODO(isaacs): remove entirely in v6
+// exported to reset in tests
+exports.deprecationWarned
+function deprecationWarning(options) {
+ if (!options.nonegate || !options.nocomment) {
+ if (process.noDeprecation !== true && !exports.deprecationWarned) {
+ var msg = 'glob WARNING: comments and negation will be disabled in v6'
+ if (process.throwDeprecation)
+ throw new Error(msg)
+ else if (process.traceDeprecation)
+ console.trace(msg)
+ else
+ console.error(msg)
+
+ exports.deprecationWarned = true
+ }
+ }
+}
+
+function finish (self) {
+ var nou = self.nounique
+ var all = nou ? [] : Object.create(null)
+
+ for (var i = 0, l = self.matches.length; i < l; i ++) {
+ var matches = self.matches[i]
+ if (!matches || Object.keys(matches).length === 0) {
+ if (self.nonull) {
+ // do like the shell, and spit out the literal glob
+ var literal = self.minimatch.globSet[i]
+ if (nou)
+ all.push(literal)
+ else
+ all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou)
+ all.push.apply(all, m)
+ else
+ m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou)
+ all = Object.keys(all)
+
+ if (!self.nosort)
+ all = all.sort(self.nocase ? alphasorti : alphasort)
+
+ // at *some* point we statted all of these
+ if (self.mark) {
+ for (var i = 0; i < all.length; i++) {
+ all[i] = self._mark(all[i])
+ }
+ if (self.nodir) {
+ all = all.filter(function (e) {
+ return !(/\/$/.test(e))
+ })
+ }
+ }
+
+ if (self.ignore.length)
+ all = all.filter(function(m) {
+ return !isIgnored(self, m)
+ })
+
+ self.found = all
+}
+
+function mark (self, p) {
+ var abs = makeAbs(self, p)
+ var c = self.cache[abs]
+ var m = p
+ if (c) {
+ var isDir = c === 'DIR' || Array.isArray(c)
+ var slash = p.slice(-1) === '/'
+
+ if (isDir && !slash)
+ m += '/'
+ else if (!isDir && slash)
+ m = m.slice(0, -1)
+
+ if (m !== p) {
+ var mabs = makeAbs(self, m)
+ self.statCache[mabs] = self.statCache[abs]
+ self.cache[mabs] = self.cache[abs]
+ }
+ }
+
+ return m
+}
+
+// lotta situps...
+function makeAbs (self, f) {
+ var abs = f
+ if (f.charAt(0) === '/') {
+ abs = path.join(self.root, f)
+ } else if (isAbsolute(f) || f === '') {
+ abs = f
+ } else if (self.changedCwd) {
+ abs = path.resolve(self.cwd, f)
+ } else {
+ abs = path.resolve(f)
+ }
+ return abs
+}
+
+
+// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
+// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
+function isIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
+
+function childrenIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
diff --git a/source/node_modules/glob/glob.js b/source/node_modules/glob/glob.js
new file mode 100644
index 000000000..022d2ac8c
--- /dev/null
+++ b/source/node_modules/glob/glob.js
@@ -0,0 +1,752 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern, false)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern, inGlobStar)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+//
+// If inGlobStar and PREFIX is symlink and points to dir
+// set ENTRIES = []
+// else readdir(PREFIX) as ENTRIES
+// If fail, END
+//
+// with ENTRIES
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// // Mark that this entry is a globstar match
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+module.exports = glob
+
+var fs = require('fs')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var inherits = require('inherits')
+var EE = require('events').EventEmitter
+var path = require('path')
+var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
+var globSync = require('./sync.js')
+var common = require('./common.js')
+var alphasort = common.alphasort
+var alphasorti = common.alphasorti
+var setopts = common.setopts
+var ownProp = common.ownProp
+var inflight = require('inflight')
+var util = require('util')
+var childrenIgnored = common.childrenIgnored
+var isIgnored = common.isIgnored
+
+var once = require('once')
+
+function glob (pattern, options, cb) {
+ if (typeof options === 'function') cb = options, options = {}
+ if (!options) options = {}
+
+ if (options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return globSync(pattern, options)
+ }
+
+ return new Glob(pattern, options, cb)
+}
+
+glob.sync = globSync
+var GlobSync = glob.GlobSync = globSync.GlobSync
+
+// old api surface
+glob.glob = glob
+
+glob.hasMagic = function (pattern, options_) {
+ var options = util._extend({}, options_)
+ options.noprocess = true
+
+ var g = new Glob(pattern, options)
+ var set = g.minimatch.set
+ if (set.length > 1)
+ return true
+
+ for (var j = 0; j < set[0].length; j++) {
+ if (typeof set[0][j] !== 'string')
+ return true
+ }
+
+ return false
+}
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = null
+ }
+
+ if (options && options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return new GlobSync(pattern, options)
+ }
+
+ if (!(this instanceof Glob))
+ return new Glob(pattern, options, cb)
+
+ setopts(this, pattern, options)
+ this._didRealPath = false
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ if (typeof cb === 'function') {
+ cb = once(cb)
+ this.on('error', cb)
+ this.on('end', function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ var self = this
+ var n = this.minimatch.set.length
+ this._processing = 0
+ this.matches = new Array(n)
+
+ this._emitQueue = []
+ this._processQueue = []
+ this.paused = false
+
+ if (this.noprocess)
+ return this
+
+ if (n === 0)
+ return done()
+
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false, done)
+ }
+
+ function done () {
+ --self._processing
+ if (self._processing <= 0)
+ self._finish()
+ }
+}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+ if (this.aborted)
+ return
+
+ if (this.realpath && !this._didRealpath)
+ return this._realpath()
+
+ common.finish(this)
+ this.emit('end', this.found)
+}
+
+Glob.prototype._realpath = function () {
+ if (this._didRealpath)
+ return
+
+ this._didRealpath = true
+
+ var n = this.matches.length
+ if (n === 0)
+ return this._finish()
+
+ var self = this
+ for (var i = 0; i < this.matches.length; i++)
+ this._realpathSet(i, next)
+
+ function next () {
+ if (--n === 0)
+ self._finish()
+ }
+}
+
+Glob.prototype._realpathSet = function (index, cb) {
+ var matchset = this.matches[index]
+ if (!matchset)
+ return cb()
+
+ var found = Object.keys(matchset)
+ var self = this
+ var n = found.length
+
+ if (n === 0)
+ return cb()
+
+ var set = this.matches[index] = Object.create(null)
+ found.forEach(function (p, i) {
+ // If there's a problem with the stat, then it means that
+ // one or more of the links in the realpath couldn't be
+ // resolved. just return the abs value in that case.
+ p = self._makeAbs(p)
+ fs.realpath(p, self.realpathCache, function (er, real) {
+ if (!er)
+ set[real] = true
+ else if (er.syscall === 'stat')
+ set[p] = true
+ else
+ self.emit('error', er) // srsly wtf right here
+
+ if (--n === 0) {
+ self.matches[index] = set
+ cb()
+ }
+ })
+ })
+}
+
+Glob.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+Glob.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit('abort')
+}
+
+Glob.prototype.pause = function () {
+ if (!this.paused) {
+ this.paused = true
+ this.emit('pause')
+ }
+}
+
+Glob.prototype.resume = function () {
+ if (this.paused) {
+ this.emit('resume')
+ this.paused = false
+ if (this._emitQueue.length) {
+ var eq = this._emitQueue.slice(0)
+ this._emitQueue.length = 0
+ for (var i = 0; i < eq.length; i ++) {
+ var e = eq[i]
+ this._emitMatch(e[0], e[1])
+ }
+ }
+ if (this._processQueue.length) {
+ var pq = this._processQueue.slice(0)
+ this._processQueue.length = 0
+ for (var i = 0; i < pq.length; i ++) {
+ var p = pq[i]
+ this._processing--
+ this._process(p[0], p[1], p[2], p[3])
+ }
+ }
+ }
+}
+
+Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
+ assert(this instanceof Glob)
+ assert(typeof cb === 'function')
+
+ if (this.aborted)
+ return
+
+ this._processing++
+ if (this.paused) {
+ this._processQueue.push([pattern, index, inGlobStar, cb])
+ return
+ }
+
+ //console.error('PROCESS %d', this._processing, pattern)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index, cb)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip _processing
+ if (childrenIgnored(this, read))
+ return cb()
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
+}
+
+Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return cb()
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return cb()
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this._emitMatch(index, e)
+ }
+ // This was the last one, and no stats were needed
+ return cb()
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+ this._process([e].concat(remain), index, inGlobStar, cb)
+ }
+ cb()
+}
+
+Glob.prototype._emitMatch = function (index, e) {
+ if (this.aborted)
+ return
+
+ if (this.matches[index][e])
+ return
+
+ if (isIgnored(this, e))
+ return
+
+ if (this.paused) {
+ this._emitQueue.push([index, e])
+ return
+ }
+
+ var abs = this._makeAbs(e)
+
+ if (this.nodir) {
+ var c = this.cache[abs]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ if (this.mark)
+ e = this._mark(e)
+
+ this.matches[index][e] = true
+
+ var st = this.statCache[abs]
+ if (st)
+ this.emit('stat', e, st)
+
+ this.emit('match', e)
+}
+
+Glob.prototype._readdirInGlobStar = function (abs, cb) {
+ if (this.aborted)
+ return
+
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false, cb)
+
+ var lstatkey = 'lstat\0' + abs
+ var self = this
+ var lstatcb = inflight(lstatkey, lstatcb_)
+
+ if (lstatcb)
+ fs.lstat(abs, lstatcb)
+
+ function lstatcb_ (er, lstat) {
+ if (er)
+ return cb()
+
+ var isSym = lstat.isSymbolicLink()
+ self.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && !lstat.isDirectory()) {
+ self.cache[abs] = 'FILE'
+ cb()
+ } else
+ self._readdir(abs, false, cb)
+ }
+}
+
+Glob.prototype._readdir = function (abs, inGlobStar, cb) {
+ if (this.aborted)
+ return
+
+ cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
+ if (!cb)
+ return
+
+ //console.error('RD %j %j', +inGlobStar, abs)
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs, cb)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return cb()
+
+ if (Array.isArray(c))
+ return cb(null, c)
+ }
+
+ var self = this
+ fs.readdir(abs, readdirCb(this, abs, cb))
+}
+
+function readdirCb (self, abs, cb) {
+ return function (er, entries) {
+ if (er)
+ self._readdirError(abs, er, cb)
+ else
+ self._readdirEntries(abs, entries, cb)
+ }
+}
+
+Glob.prototype._readdirEntries = function (abs, entries, cb) {
+ if (this.aborted)
+ return
+
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+ return cb(null, entries)
+}
+
+Glob.prototype._readdirError = function (f, er, cb) {
+ if (this.aborted)
+ return
+
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ this.cache[this._makeAbs(f)] = 'FILE'
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict) {
+ this.emit('error', er)
+ // If the error is handled, then we abort
+ // if not, we threw out of here
+ this.abort()
+ }
+ if (!this.silent)
+ console.error('glob error', er)
+ break
+ }
+
+ return cb()
+}
+
+Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+
+Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+ //console.error('pgs2', prefix, remain[0], entries)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return cb()
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false, cb)
+
+ var isSym = this.symlinks[abs]
+ var len = entries.length
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return cb()
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true, cb)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true, cb)
+ }
+
+ cb()
+}
+
+Glob.prototype._processSimple = function (prefix, index, cb) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var self = this
+ this._stat(prefix, function (er, exists) {
+ self._processSimple2(prefix, index, er, exists, cb)
+ })
+}
+Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
+
+ //console.error('ps2', prefix, exists)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return cb()
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this._emitMatch(index, prefix)
+ cb()
+}
+
+// Returns either 'DIR', 'FILE', or false
+Glob.prototype._stat = function (f, cb) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return cb()
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return cb(null, c)
+
+ if (needDir && c === 'FILE')
+ return cb()
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (stat !== undefined) {
+ if (stat === false)
+ return cb(null, stat)
+ else {
+ var type = stat.isDirectory() ? 'DIR' : 'FILE'
+ if (needDir && type === 'FILE')
+ return cb()
+ else
+ return cb(null, type, stat)
+ }
+ }
+
+ var self = this
+ var statcb = inflight('stat\0' + abs, lstatcb_)
+ if (statcb)
+ fs.lstat(abs, statcb)
+
+ function lstatcb_ (er, lstat) {
+ if (lstat && lstat.isSymbolicLink()) {
+ // If it's a symlink, then treat it as the target, unless
+ // the target does not exist, then treat it as a file.
+ return fs.stat(abs, function (er, stat) {
+ if (er)
+ self._stat2(f, abs, null, lstat, cb)
+ else
+ self._stat2(f, abs, er, stat, cb)
+ })
+ } else {
+ self._stat2(f, abs, er, lstat, cb)
+ }
+ }
+}
+
+Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
+ if (er) {
+ this.statCache[abs] = false
+ return cb()
+ }
+
+ var needDir = f.slice(-1) === '/'
+ this.statCache[abs] = stat
+
+ if (abs.slice(-1) === '/' && !stat.isDirectory())
+ return cb(null, false, stat)
+
+ var c = stat.isDirectory() ? 'DIR' : 'FILE'
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c !== 'DIR')
+ return cb()
+
+ return cb(null, c, stat)
+}
diff --git a/source/node_modules/glob/node_modules/minimatch/LICENSE b/source/node_modules/glob/node_modules/minimatch/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/source/node_modules/glob/node_modules/minimatch/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/glob/node_modules/minimatch/README.md b/source/node_modules/glob/node_modules/minimatch/README.md
new file mode 100644
index 000000000..d458bc2e0
--- /dev/null
+++ b/source/node_modules/glob/node_modules/minimatch/README.md
@@ -0,0 +1,216 @@
+# minimatch
+
+A minimal matching utility.
+
+[](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items. So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself if this option is set. When not set, an empty list
+is returned if there are no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
+
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
diff --git a/source/node_modules/glob/node_modules/minimatch/minimatch.js b/source/node_modules/glob/node_modules/minimatch/minimatch.js
new file mode 100644
index 000000000..ec4c05c57
--- /dev/null
+++ b/source/node_modules/glob/node_modules/minimatch/minimatch.js
@@ -0,0 +1,912 @@
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
+
+var path = { sep: '/' }
+try {
+ path = require('path')
+} catch (er) {}
+
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = require('brace-expansion')
+
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
+
+// * => any number of characters
+var star = qmark + '*?'
+
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === '') return p === ''
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ if (typeof pattern === 'undefined') {
+ throw new Error('undefined pattern')
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === '**') return GLOBSTAR
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var plType
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ case '/':
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({
+ type: plType,
+ start: i - 1,
+ reStart: re.length
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ re += ')'
+ var pl = patternListStack.pop()
+ plType = pl.type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:)
+ switch (plType) {
+ case '!':
+ negativeLists.push(pl)
+ re += ')[^/]*?)'
+ pl.reEnd = re.length
+ break
+ case '?':
+ case '+':
+ case '*':
+ re += plType
+ break
+ case '@': break // the default anyway
+ }
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ if (inClass) {
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '.':
+ case '[':
+ case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ var regExp = new RegExp('^' + re + '$', flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
diff --git a/source/node_modules/glob/node_modules/minimatch/package.json b/source/node_modules/glob/node_modules/minimatch/package.json
new file mode 100644
index 000000000..2758f8d8c
--- /dev/null
+++ b/source/node_modules/glob/node_modules/minimatch/package.json
@@ -0,0 +1,85 @@
+{
+ "_args": [
+ [
+ "minimatch@2 || 3",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob"
+ ]
+ ],
+ "_from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0",
+ "_id": "minimatch@3.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob/minimatch",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
+ },
+ "_npmVersion": "3.3.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "minimatch",
+ "raw": "minimatch@2 || 3",
+ "rawSpec": "2 || 3",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0||>=3.0.0 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz",
+ "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83",
+ "_shrinkwrap": null,
+ "_spec": "minimatch@2 || 3",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "dependencies": {
+ "brace-expansion": "^1.0.0"
+ },
+ "description": "a glob matcher in javascript",
+ "devDependencies": {
+ "standard": "^3.7.2",
+ "tap": "^1.2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83",
+ "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "files": [
+ "minimatch.js"
+ ],
+ "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20",
+ "homepage": "https://github.com/isaacs/minimatch#readme",
+ "license": "ISC",
+ "main": "minimatch.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "minimatch",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "scripts": {
+ "posttest": "standard minimatch.js test/*.js",
+ "test": "tap test/*.js"
+ },
+ "version": "3.0.0"
+}
diff --git a/source/node_modules/glob/package.json b/source/node_modules/glob/package.json
new file mode 100644
index 000000000..08a0178d5
--- /dev/null
+++ b/source/node_modules/glob/package.json
@@ -0,0 +1,100 @@
+{
+ "_args": [
+ [
+ "glob@^5.0.14",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass"
+ ]
+ ],
+ "_from": "glob@>=5.0.14 <6.0.0",
+ "_id": "glob@5.0.15",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
+ },
+ "_npmVersion": "3.3.2",
+ "_phantomChildren": {
+ "brace-expansion": "1.1.3"
+ },
+ "_requested": {
+ "name": "glob",
+ "raw": "glob@^5.0.14",
+ "rawSpec": "^5.0.14",
+ "scope": null,
+ "spec": ">=5.0.14 <6.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/node-sass"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+ "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1",
+ "_shrinkwrap": null,
+ "_spec": "glob@^5.0.14",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/node-sass",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "dependencies": {
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "2 || 3",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "description": "a little globber",
+ "devDependencies": {
+ "mkdirp": "0",
+ "rimraf": "^2.2.8",
+ "tap": "^1.1.4",
+ "tick": "0.0.6"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1",
+ "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "files": [
+ "common.js",
+ "glob.js",
+ "sync.js"
+ ],
+ "gitHead": "3a7e71d453dd80e75b196fd262dd23ed54beeceb",
+ "homepage": "https://github.com/isaacs/node-glob#readme",
+ "license": "ISC",
+ "main": "glob.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "glob",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "scripts": {
+ "bench": "bash benchmark.sh",
+ "benchclean": "node benchclean.js",
+ "prepublish": "npm run benchclean",
+ "prof": "bash prof.sh && cat profile.txt",
+ "profclean": "rm -f v8.log profile.txt",
+ "test": "tap test/*.js --cov",
+ "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
+ },
+ "version": "5.0.15"
+}
diff --git a/source/node_modules/glob/sync.js b/source/node_modules/glob/sync.js
new file mode 100644
index 000000000..09883d2ce
--- /dev/null
+++ b/source/node_modules/glob/sync.js
@@ -0,0 +1,460 @@
+module.exports = globSync
+globSync.GlobSync = GlobSync
+
+var fs = require('fs')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var Glob = require('./glob.js').Glob
+var util = require('util')
+var path = require('path')
+var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
+var common = require('./common.js')
+var alphasort = common.alphasort
+var alphasorti = common.alphasorti
+var setopts = common.setopts
+var ownProp = common.ownProp
+var childrenIgnored = common.childrenIgnored
+
+function globSync (pattern, options) {
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ return new GlobSync(pattern, options).found
+}
+
+function GlobSync (pattern, options) {
+ if (!pattern)
+ throw new Error('must provide pattern')
+
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ if (!(this instanceof GlobSync))
+ return new GlobSync(pattern, options)
+
+ setopts(this, pattern, options)
+
+ if (this.noprocess)
+ return this
+
+ var n = this.minimatch.set.length
+ this.matches = new Array(n)
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false)
+ }
+ this._finish()
+}
+
+GlobSync.prototype._finish = function () {
+ assert(this instanceof GlobSync)
+ if (this.realpath) {
+ var self = this
+ this.matches.forEach(function (matchset, index) {
+ var set = self.matches[index] = Object.create(null)
+ for (var p in matchset) {
+ try {
+ p = self._makeAbs(p)
+ var real = fs.realpathSync(p, self.realpathCache)
+ set[real] = true
+ } catch (er) {
+ if (er.syscall === 'stat')
+ set[self._makeAbs(p)] = true
+ else
+ throw er
+ }
+ }
+ })
+ }
+ common.finish(this)
+}
+
+
+GlobSync.prototype._process = function (pattern, index, inGlobStar) {
+ assert(this instanceof GlobSync)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // See if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip processing
+ if (childrenIgnored(this, read))
+ return
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
+}
+
+
+GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
+ var entries = this._readdir(abs, inGlobStar)
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix.slice(-1) !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this.matches[index][e] = true
+ }
+ // This was the last one, and no stats were needed
+ return
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix)
+ newPattern = [prefix, e]
+ else
+ newPattern = [e]
+ this._process(newPattern.concat(remain), index, inGlobStar)
+ }
+}
+
+
+GlobSync.prototype._emitMatch = function (index, e) {
+ var abs = this._makeAbs(e)
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.matches[index][e])
+ return
+
+ if (this.nodir) {
+ var c = this.cache[this._makeAbs(e)]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ this.matches[index][e] = true
+ if (this.stat)
+ this._stat(e)
+}
+
+
+GlobSync.prototype._readdirInGlobStar = function (abs) {
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false)
+
+ var entries
+ var lstat
+ var stat
+ try {
+ lstat = fs.lstatSync(abs)
+ } catch (er) {
+ // lstat failed, doesn't exist
+ return null
+ }
+
+ var isSym = lstat.isSymbolicLink()
+ this.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && !lstat.isDirectory())
+ this.cache[abs] = 'FILE'
+ else
+ entries = this._readdir(abs, false)
+
+ return entries
+}
+
+GlobSync.prototype._readdir = function (abs, inGlobStar) {
+ var entries
+
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return null
+
+ if (Array.isArray(c))
+ return c
+ }
+
+ try {
+ return this._readdirEntries(abs, fs.readdirSync(abs))
+ } catch (er) {
+ this._readdirError(abs, er)
+ return null
+ }
+}
+
+GlobSync.prototype._readdirEntries = function (abs, entries) {
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+
+ // mark and cache dir-ness
+ return entries
+}
+
+GlobSync.prototype._readdirError = function (f, er) {
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ this.cache[this._makeAbs(f)] = 'FILE'
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict)
+ throw er
+ if (!this.silent)
+ console.error('glob error', er)
+ break
+ }
+}
+
+GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
+
+ var entries = this._readdir(abs, inGlobStar)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false)
+
+ var len = entries.length
+ var isSym = this.symlinks[abs]
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true)
+ }
+}
+
+GlobSync.prototype._processSimple = function (prefix, index) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var exists = this._stat(prefix)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this.matches[index][prefix] = true
+}
+
+// Returns either 'DIR', 'FILE', or false
+GlobSync.prototype._stat = function (f) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return false
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return c
+
+ if (needDir && c === 'FILE')
+ return false
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (!stat) {
+ var lstat
+ try {
+ lstat = fs.lstatSync(abs)
+ } catch (er) {
+ return false
+ }
+
+ if (lstat.isSymbolicLink()) {
+ try {
+ stat = fs.statSync(abs)
+ } catch (er) {
+ stat = lstat
+ }
+ } else {
+ stat = lstat
+ }
+ }
+
+ this.statCache[abs] = stat
+
+ var c = stat.isDirectory() ? 'DIR' : 'FILE'
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c !== 'DIR')
+ return false
+
+ return c
+}
+
+GlobSync.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+GlobSync.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
diff --git a/source/node_modules/glob2base/LICENSE b/source/node_modules/glob2base/LICENSE
new file mode 100755
index 000000000..7cbe012c6
--- /dev/null
+++ b/source/node_modules/glob2base/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2014 Fractal
+
+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.
diff --git a/source/node_modules/glob2base/README.md b/source/node_modules/glob2base/README.md
new file mode 100644
index 000000000..c14fa38c3
--- /dev/null
+++ b/source/node_modules/glob2base/README.md
@@ -0,0 +1,51 @@
+# glob2base [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Support us][gittip-image]][gittip-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url]
+
+
+## Information
+
+
+
+Package glob2base
+
+
+Description
+Extracts a base path from a node-glob instance
+
+
+Node Version
+>= 0.10
+
+
+
+## Usage
+
+The module is a function that takes in a node-glob instance and returns a string. Basically it just gives you everything before any globbing/matching happens.
+
+```javascript
+var glob2base = require('glob2base');
+var glob = require('glob');
+
+// js/
+glob2base(new glob.Glob('js/**/*.js'));
+
+// css/test/
+glob2base(new glob.Glob('css/test/{a,b}/*.css'));
+
+// pages/whatever/
+glob2base(new glob.Glob('pages/whatever/index.html'));
+```
+
+## Like what we do?
+
+[gittip-url]: https://www.gittip.com/WeAreFractal/
+[gittip-image]: http://img.shields.io/gittip/WeAreFractal.svg
+
+[downloads-image]: http://img.shields.io/npm/dm/glob2base.svg
+[npm-url]: https://npmjs.org/package/glob2base
+[npm-image]: http://img.shields.io/npm/v/glob2base.svg
+
+[travis-url]: https://travis-ci.org/wearefractal/glob2base
+[travis-image]: http://img.shields.io/travis/wearefractal/glob2base.svg
+
+[coveralls-url]: https://coveralls.io/r/wearefractal/glob2base
+[coveralls-image]: http://img.shields.io/coveralls/wearefractal/glob2base/master.svg
diff --git a/source/node_modules/glob2base/index.js b/source/node_modules/glob2base/index.js
new file mode 100644
index 000000000..307e3f27c
--- /dev/null
+++ b/source/node_modules/glob2base/index.js
@@ -0,0 +1,59 @@
+'use strict';
+
+var path = require('path');
+var findIndex = require('find-index');
+
+var flattenGlob = function(arr){
+ var out = [];
+ var flat = true;
+ for(var i = 0; i < arr.length; i++) {
+ if (typeof arr[i] !== 'string') {
+ flat = false;
+ break;
+ }
+ out.push(arr[i]);
+ }
+
+ // last one is a file or specific dir
+ // so we pop it off
+ if (flat) {
+ out.pop();
+ }
+ return out;
+};
+
+var flattenExpansion = function(set) {
+ var first = set[0];
+ var toCompare = set.slice(1);
+
+ // find index where the diff is
+ var idx = findIndex(first, function(v, idx){
+ if (typeof v !== 'string') {
+ return true;
+ }
+
+ var matched = toCompare.every(function(arr){
+ return v === arr[idx];
+ });
+
+ return !matched;
+ });
+
+ return first.slice(0, idx);
+};
+
+var setToBase = function(set) {
+ // normal something/*.js
+ if (set.length <= 1) {
+ return flattenGlob(set[0]);
+ }
+ // has expansion
+ return flattenExpansion(set);
+};
+
+module.exports = function(glob) {
+ var set = glob.minimatch.set;
+ var baseParts = setToBase(set);
+ var basePath = path.normalize(baseParts.join(path.sep))+path.sep;
+ return basePath;
+};
diff --git a/source/node_modules/glob2base/package.json b/source/node_modules/glob2base/package.json
new file mode 100644
index 000000000..6452f0d43
--- /dev/null
+++ b/source/node_modules/glob2base/package.json
@@ -0,0 +1,98 @@
+{
+ "_args": [
+ [
+ "glob2base@^0.0.12",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream"
+ ]
+ ],
+ "_from": "glob2base@>=0.0.12 <0.0.13",
+ "_id": "glob2base@0.0.12",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glob2base",
+ "_nodeVersion": "0.10.33",
+ "_npmUser": {
+ "email": "contact@wearefractal.com",
+ "name": "fractal"
+ },
+ "_npmVersion": "2.1.6",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "glob2base",
+ "raw": "glob2base@^0.0.12",
+ "rawSpec": "^0.0.12",
+ "scope": null,
+ "spec": ">=0.0.12 <0.0.13",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz",
+ "_shasum": "9d419b3e28f12e83a362164a277055922c9c0d56",
+ "_shrinkwrap": null,
+ "_spec": "glob2base@^0.0.12",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/glob-stream",
+ "author": {
+ "email": "contact@wearefractal.com",
+ "name": "Fractal",
+ "url": "http://wearefractal.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/wearefractal/glob2base/issues"
+ },
+ "dependencies": {
+ "find-index": "^0.1.1"
+ },
+ "description": "Extracts a base path from a node-glob instance",
+ "devDependencies": {
+ "coveralls": "^2.6.1",
+ "glob": "^4.0.0",
+ "istanbul": "^0.3.2",
+ "jshint": "^2.4.1",
+ "jshint-stylish": "^1.0.0",
+ "mocha": "^2.0.0",
+ "mocha-lcov-reporter": "^0.0.1",
+ "should": "^4.0.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9d419b3e28f12e83a362164a277055922c9c0d56",
+ "tarball": "http://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "gitHead": "d3fadacea415f4676fd431c90cd2205a2f1e6b26",
+ "homepage": "http://github.com/wearefractal/glob2base",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/wearefractal/glob2base/raw/master/LICENSE"
+ }
+ ],
+ "main": "./index.js",
+ "maintainers": [
+ {
+ "name": "fractal",
+ "email": "contact@wearefractal.com"
+ }
+ ],
+ "name": "glob2base",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/wearefractal/glob2base.git"
+ },
+ "scripts": {
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
+ "lint": "jshint index.js --reporter node_modules/jshint-stylish/stylish.js --exclude node_modules",
+ "test": "npm run-script lint && mocha --reporter spec"
+ },
+ "version": "0.0.12"
+}
diff --git a/source/node_modules/globule/.jshintrc b/source/node_modules/globule/.jshintrc
new file mode 100644
index 000000000..2c40c4443
--- /dev/null
+++ b/source/node_modules/globule/.jshintrc
@@ -0,0 +1,15 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "unused": true,
+ "boss": true,
+ "eqnull": true,
+ "node": true,
+ "es5": true
+}
diff --git a/source/node_modules/globule/.npmignore b/source/node_modules/globule/.npmignore
new file mode 100644
index 000000000..2ccbe4656
--- /dev/null
+++ b/source/node_modules/globule/.npmignore
@@ -0,0 +1 @@
+/node_modules/
diff --git a/source/node_modules/globule/.travis.yml b/source/node_modules/globule/.travis.yml
new file mode 100644
index 000000000..cbace30bb
--- /dev/null
+++ b/source/node_modules/globule/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+before_script:
+ - npm install -g grunt-cli
diff --git a/source/node_modules/globule/Gruntfile.js b/source/node_modules/globule/Gruntfile.js
new file mode 100644
index 000000000..c3f7d7466
--- /dev/null
+++ b/source/node_modules/globule/Gruntfile.js
@@ -0,0 +1,48 @@
+'use strict';
+
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ nodeunit: {
+ files: ['test/**/*_test.js'],
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ lib: {
+ src: ['lib/**/*.js']
+ },
+ test: {
+ src: ['test/*.js']
+ },
+ },
+ watch: {
+ gruntfile: {
+ files: '<%= jshint.gruntfile.src %>',
+ tasks: ['jshint:gruntfile']
+ },
+ lib: {
+ files: '<%= jshint.lib.src %>',
+ tasks: ['jshint:lib', 'nodeunit']
+ },
+ test: {
+ files: '<%= jshint.test.src %>',
+ tasks: ['jshint:test', 'nodeunit']
+ },
+ },
+ });
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'nodeunit']);
+
+};
diff --git a/source/node_modules/globule/LICENSE-MIT b/source/node_modules/globule/LICENSE-MIT
new file mode 100644
index 000000000..bb2aad6dc
--- /dev/null
+++ b/source/node_modules/globule/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 "Cowboy" Ben Alman
+
+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.
diff --git a/source/node_modules/globule/README.md b/source/node_modules/globule/README.md
new file mode 100644
index 000000000..656b1ed9b
--- /dev/null
+++ b/source/node_modules/globule/README.md
@@ -0,0 +1,117 @@
+# globule [](http://travis-ci.org/cowboy/node-globule)
+
+An easy-to-use wildcard globbing library.
+
+## Getting Started
+Install the module with: `npm install globule`
+
+```javascript
+var globule = require('globule');
+var filepaths = globule.find('**/*.js');
+```
+
+## Documentation
+
+### globule.find
+Returns a unique array of all file or directory paths that match the given globbing pattern(s). This method accepts either comma separated globbing patterns or an array of globbing patterns. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.
+
+```js
+globule.find(patterns [, options])
+```
+
+The `options` object supports all [glob][] library options, along with a few extras. These are the most commonly used:
+
+* `filter` Either a valid [fs.Stats method name](http://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats) or a function that will be passed the matched `src` filepath and `options` object as arguments. This function should return a `Boolean` value.
+* `nonull` Retain globbing patterns in result set even if they fail to match files.
+* `matchBase` Patterns without slashes will match just the basename part. Eg. this makes `*.js` work like `**/*.js`.
+* `srcBase` Patterns will be matched relative to the specified path instead of the current working directory. This is a synonym for `cwd`.
+* `prefixBase` Any specified `srcBase` will be prefixed to all returned filepaths.
+
+[glob]: https://github.com/isaacs/node-glob
+
+### globule.match
+Match one or more globbing patterns against one or more file paths. Returns a uniqued array of all file paths that match any of the specified globbing patterns. Both the `patterns` and `filepaths` arguments can be a single string or array of strings. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.
+
+```js
+grunt.file.match(patterns, filepaths [, options])
+```
+
+### globule.isMatch
+This method contains the same signature and logic as the `globule.match` method, but returns `true` if any files were matched, otherwise `false`.
+
+```js
+grunt.file.isMatch(patterns, filepaths [, options])
+```
+
+### globule.mapping
+Given a set of source file paths, returns an array of src-dest file mapping objects. Both src and dest paths may be renamed, depending on the options specified.
+
+```js
+globule.mapping(filepaths [, options])
+```
+
+In addition to the options the `globule.find` method supports, the options object also supports these properties:
+
+* `srcBase` The directory from which patterns are matched. Any string specified as `srcBase` is effectively stripped from the beginning of all matched paths.
+* `destBase` The specified path is prefixed to all `dest` filepaths.
+* `ext` Remove anything after (and including) the first `.` in the destination path, then append this value.
+* `extDot` Change the behavior of `ext`, `"first"` and `"last"` will remove anything after the first or last `.` in the destination filename, respectively. Defaults to `"first"`.
+* `flatten` Remove the path component from all matched src files. The src file path is still joined to the specified destBase.
+* `rename` If specified, this function will be responsible for returning the final `dest` filepath. By default, it flattens paths (if specified), changes extensions (if specified) and joins the matched path to the `destBase`.
+
+### globule.findMapping
+This method is a convenience wrapper around the `globule.find` and `globule.mapping` methods.
+
+```js
+globule.findMapping(patterns [, options])
+```
+
+
+## Examples
+
+Given the files `foo/a.js` and `foo/b.js`:
+
+### srcBase and destBase
+
+```js
+globule.find("foo/*.js")
+// ["foo/a.js", "foo/b.js"]
+
+globule.find("*.js", {srcBase: "foo"})
+// ["a.js", "b.js"]
+
+globule.find("*.js", {srcBase: "foo", prefixBase: true})
+// ["foo/a.js", "foo/b.js"]
+```
+
+```js
+globule.findMapping("foo/*.js")
+// [{src: "foo/a.js", dest: "foo/a.js"}, {src: "foo/b.js", dest: "foo/b.js"}]
+
+globule.findMapping("foo/*.js", {destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/foo/a.js"}, {src: "foo/b.js", dest: "bar/foo/b.js"}]
+
+globule.findMapping("*.js", {srcBase: "foo", destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/a.js"}, {src: "foo/b.js", dest: "bar/b.js"}]
+```
+
+```js
+globule.mapping(["foo/a.js", "foo/b.js"])
+// [{src: "foo/a.js", dest: "foo/a.js"}, {src: "foo/b.js", dest: "foo/b.js"}]
+
+globule.mapping(["foo/a.js", "foo/b.js"], {destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/foo/a.js"}, {src: "foo/b.js", dest: "bar/foo/b.js"}]
+
+globule.mapping(["a.js", "b.js"], {srcBase: "foo", destBase: "bar"})
+// [{src: "foo/a.js", dest: "bar/a.js"}, {src: "foo/b.js", dest: "bar/b.js"}]
+```
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
+
+## Release History
+_(Nothing yet)_
+
+## License
+Copyright (c) 2013 "Cowboy" Ben Alman
+Licensed under the MIT license.
diff --git a/source/node_modules/globule/lib/globule.js b/source/node_modules/globule/lib/globule.js
new file mode 100644
index 000000000..01017b92d
--- /dev/null
+++ b/source/node_modules/globule/lib/globule.js
@@ -0,0 +1,172 @@
+/*
+ * globule
+ * https://github.com/cowboy/node-globule
+ *
+ * Copyright (c) 2013 "Cowboy" Ben Alman
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+
+var _ = require('lodash');
+var glob = require('glob');
+var minimatch = require('minimatch');
+
+// The module.
+var globule = exports;
+
+// Process specified wildcard glob patterns or filenames against a
+// callback, excluding and uniquing files in the result set.
+function processPatterns(patterns, fn) {
+ return _.flatten(patterns).reduce(function(result, pattern) {
+ if (pattern.indexOf('!') === 0) {
+ // If the first character is ! all matches via this pattern should be
+ // removed from the result set.
+ pattern = pattern.slice(1);
+ return _.difference(result, fn(pattern));
+ } else {
+ // Otherwise, add all matching filepaths to the result set.
+ return _.union(result, fn(pattern));
+ }
+ }, []);
+}
+
+// Match a filepath or filepaths against one or more wildcard patterns. Returns
+// all matching filepaths. This behaves just like minimatch.match, but supports
+// any number of patterns.
+globule.match = function(patterns, filepaths, options) {
+ // Return empty set if either patterns or filepaths was omitted.
+ if (patterns == null || filepaths == null) { return []; }
+ // Normalize patterns and filepaths to arrays.
+ if (!_.isArray(patterns)) { patterns = [patterns]; }
+ if (!_.isArray(filepaths)) { filepaths = [filepaths]; }
+ // Return empty set if there are no patterns or filepaths.
+ if (patterns.length === 0 || filepaths.length === 0) { return []; }
+ // Return all matching filepaths.
+ return processPatterns(patterns, function(pattern) {
+ return minimatch.match(filepaths, pattern, options || {});
+ });
+};
+
+// Match a filepath or filepaths against one or more wildcard patterns. Returns
+// true if any of the patterns match.
+globule.isMatch = function() {
+ return globule.match.apply(null, arguments).length > 0;
+};
+
+// Return an array of all file paths that match the given wildcard patterns.
+globule.find = function() {
+ var args = _.toArray(arguments);
+ // If the last argument is an options object, remove it from args.
+ var options = _.isPlainObject(args[args.length - 1]) ? args.pop() : {};
+ // Use the first argument if it's an Array, otherwise use all arguments.
+ var patterns = _.isArray(args[0]) ? args[0] : args;
+ // Return empty set if there are no patterns or filepaths.
+ if (patterns.length === 0) { return []; }
+ var srcBase = options.srcBase || options.cwd;
+ // Create glob-specific options object.
+ var globOptions = _.extend({}, options);
+ if (srcBase) {
+ globOptions.cwd = srcBase;
+ }
+ // Get all matching filepaths.
+ var matches = processPatterns(patterns, function(pattern) {
+ return glob.sync(pattern, globOptions);
+ });
+ // If srcBase and prefixBase were specified, prefix srcBase to matched paths.
+ if (srcBase && options.prefixBase) {
+ matches = matches.map(function(filepath) {
+ return path.join(srcBase, filepath);
+ });
+ }
+ // Filter result set?
+ if (options.filter) {
+ matches = matches.filter(function(filepath) {
+ // If srcBase was specified but prefixBase was NOT, prefix srcBase
+ // temporarily, for filtering.
+ if (srcBase && !options.prefixBase) {
+ filepath = path.join(srcBase, filepath);
+ }
+ try {
+ if (_.isFunction(options.filter)) {
+ return options.filter(filepath, options);
+ } else {
+ // If the file is of the right type and exists, this should work.
+ return fs.statSync(filepath)[options.filter]();
+ }
+ } catch(err) {
+ // Otherwise, it's probably not the right type.
+ return false;
+ }
+ });
+ }
+ return matches;
+};
+
+var pathSeparatorRe = /[\/\\]/g;
+var extDotRe = {
+ first: /(\.[^\/]*)?$/,
+ last: /(\.[^\/\.]*)?$/,
+};
+function rename(dest, options) {
+ // Flatten path?
+ if (options.flatten) {
+ dest = path.basename(dest);
+ }
+ // Change the extension?
+ if (options.ext) {
+ dest = dest.replace(extDotRe[options.extDot], options.ext);
+ }
+ // Join dest and destBase?
+ if (options.destBase) {
+ dest = path.join(options.destBase, dest);
+ }
+ return dest;
+}
+
+// Build a mapping of src-dest filepaths from the given set of filepaths.
+globule.mapping = function(filepaths, options) {
+ // Return empty set if filepaths was omitted.
+ if (filepaths == null) { return []; }
+ options = _.defaults({}, options, {
+ extDot: 'first',
+ rename: rename,
+ });
+ var files = [];
+ var fileByDest = {};
+ // Find all files matching pattern, using passed-in options.
+ filepaths.forEach(function(src) {
+ // Generate destination filename.
+ var dest = options.rename(src, options);
+ // Prepend srcBase to all src paths.
+ if (options.srcBase) {
+ src = path.join(options.srcBase, src);
+ }
+ // Normalize filepaths to be unix-style.
+ dest = dest.replace(pathSeparatorRe, '/');
+ src = src.replace(pathSeparatorRe, '/');
+ // Map correct src path to dest path.
+ if (fileByDest[dest]) {
+ // If dest already exists, push this src onto that dest's src array.
+ fileByDest[dest].src.push(src);
+ } else {
+ // Otherwise create a new src-dest file mapping object.
+ files.push({
+ src: [src],
+ dest: dest,
+ });
+ // And store a reference for later use.
+ fileByDest[dest] = files[files.length - 1];
+ }
+ });
+ return files;
+};
+
+// Return a mapping of src-dest filepaths from files matching the given
+// wildcard patterns.
+globule.findMapping = function(patterns, options) {
+ return globule.mapping(globule.find(patterns, options), options);
+};
diff --git a/source/node_modules/globule/node_modules/glob/.npmignore b/source/node_modules/globule/node_modules/glob/.npmignore
new file mode 100644
index 000000000..2af4b71c9
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/.npmignore
@@ -0,0 +1,2 @@
+.*.swp
+test/a/
diff --git a/source/node_modules/globule/node_modules/glob/.travis.yml b/source/node_modules/globule/node_modules/glob/.travis.yml
new file mode 100644
index 000000000..baa0031d5
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.8
diff --git a/source/node_modules/globule/node_modules/glob/LICENSE b/source/node_modules/globule/node_modules/glob/LICENSE
new file mode 100644
index 000000000..0c44ae716
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
diff --git a/source/node_modules/globule/node_modules/glob/README.md b/source/node_modules/globule/node_modules/glob/README.md
new file mode 100644
index 000000000..6e27df620
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/README.md
@@ -0,0 +1,233 @@
+# Glob
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+## Attention: node-glob users!
+
+The API has changed dramatically between 2.x and 3.x. This library is
+now 100% JavaScript, and the integer flags have been replaced with an
+options object.
+
+Also, there's an event emitter class, proper tests, and all the other
+things you've come to expect from node modules.
+
+And best of all, no compilation!
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Features
+
+Please see the [minimatch
+documentation](https://github.com/isaacs/minimatch) for more details.
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+ * `err` {Error | null}
+ * `matches` {Array} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options]
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instanting the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+ * `err` {Error | null}
+ * `matches` {Array} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `error` The error encountered. When an error is encountered, the
+ glob object is in an undefined state, and should be discarded.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `abort` Stop the search.
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the glob object, as well.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence. It will cause
+ ELOOP to be triggered one level sooner in the case of cyclical
+ symbolic links.
+* `silent` When an unusual error is encountered
+ when attempting to read a directory, a warning will be printed to
+ stderr. Set the `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered
+ when attempting to read a directory, the process will just continue on
+ in search of other matches. Set the `strict` option to raise an error
+ in these cases.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary to
+ set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `sync` Perform a synchronous glob search.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set.
+ Set this flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `nocase` Perform a case-insensitive match. Note that case-insensitive
+ filesystems will sometimes result in glob returning results that are
+ case-insensitively matched anyway, since readdir and stat will not
+ raise an error.
+* `debug` Set to enable debug logging in minimatch and glob.
+* `globDebug` Set to enable debug logging in glob, but not minimatch.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not. **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the statCache object is reused between glob calls.
+
+Users are thus advised not to use a glob result as a
+guarantee of filesystem state in the face of rapid changes.
+For the vast majority of operations, this is never a problem.
diff --git a/source/node_modules/globule/node_modules/glob/examples/g.js b/source/node_modules/globule/node_modules/glob/examples/g.js
new file mode 100644
index 000000000..be122df00
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/examples/g.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "test/a/**/[cg]/../[cg]"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
diff --git a/source/node_modules/globule/node_modules/glob/examples/usr-local.js b/source/node_modules/globule/node_modules/glob/examples/usr-local.js
new file mode 100644
index 000000000..327a425e4
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/examples/usr-local.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "{./*/*,/*,/usr/local/*}"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
diff --git a/source/node_modules/globule/node_modules/glob/glob.js b/source/node_modules/globule/node_modules/glob/glob.js
new file mode 100644
index 000000000..891c88360
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/glob.js
@@ -0,0 +1,643 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+// readdir(PREFIX) as ENTRIES
+// If fails, END
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $])
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+
+
+module.exports = glob
+
+var fs = require("graceful-fs")
+, minimatch = require("minimatch")
+, Minimatch = minimatch.Minimatch
+, inherits = require("inherits")
+, EE = require("events").EventEmitter
+, path = require("path")
+, isDir = {}
+, assert = require("assert").ok
+
+function glob (pattern, options, cb) {
+ if (typeof options === "function") cb = options, options = {}
+ if (!options) options = {}
+
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ var g = new Glob(pattern, options, cb)
+ return g.sync ? g.found : g
+}
+
+glob.fnmatch = deprecated
+
+function deprecated () {
+ throw new Error("glob's interface has changed. Please see the docs.")
+}
+
+glob.sync = globSync
+function globSync (pattern, options) {
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ options = options || {}
+ options.sync = true
+ return glob(pattern, options)
+}
+
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (!(this instanceof Glob)) {
+ return new Glob(pattern, options, cb)
+ }
+
+ if (typeof cb === "function") {
+ this.on("error", cb)
+ this.on("end", function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ options = options || {}
+
+ this.EOF = {}
+ this._emitQueue = []
+
+ this.maxDepth = options.maxDepth || 1000
+ this.maxLength = options.maxLength || Infinity
+ this.statCache = options.statCache || {}
+
+ this.changedCwd = false
+ var cwd = process.cwd()
+ if (!options.hasOwnProperty("cwd")) this.cwd = cwd
+ else {
+ this.cwd = options.cwd
+ this.changedCwd = path.resolve(options.cwd) !== cwd
+ }
+
+ this.root = options.root || path.resolve(this.cwd, "/")
+ this.root = path.resolve(this.root)
+ if (process.platform === "win32")
+ this.root = this.root.replace(/\\/g, "/")
+
+ this.nomount = !!options.nomount
+
+ if (!pattern) {
+ throw new Error("must provide pattern")
+ }
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ this.strict = options.strict !== false
+ this.dot = !!options.dot
+ this.mark = !!options.mark
+ this.sync = !!options.sync
+ this.nounique = !!options.nounique
+ this.nonull = !!options.nonull
+ this.nosort = !!options.nosort
+ this.nocase = !!options.nocase
+ this.stat = !!options.stat
+
+ this.debug = !!options.debug || !!options.globDebug
+ if (this.debug)
+ this.log = console.error
+
+ this.silent = !!options.silent
+
+ var mm = this.minimatch = new Minimatch(pattern, options)
+ this.options = mm.options
+ pattern = this.pattern = mm.pattern
+
+ this.error = null
+ this.aborted = false
+
+ EE.call(this)
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ this.minimatch.set.forEach(iterator.bind(this))
+ function iterator (pattern, i, set) {
+ this._process(pattern, 0, i, function (er) {
+ if (er) this.emit("error", er)
+ if (-- n <= 0) this._finish()
+ })
+ }
+}
+
+Glob.prototype.log = function () {}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+
+ var nou = this.nounique
+ , all = nou ? [] : {}
+
+ for (var i = 0, l = this.matches.length; i < l; i ++) {
+ var matches = this.matches[i]
+ this.log("matches[%d] =", i, matches)
+ // do like the shell, and spit out the literal glob
+ if (!matches) {
+ if (this.nonull) {
+ var literal = this.minimatch.globSet[i]
+ if (nou) all.push(literal)
+ else all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou) all.push.apply(all, m)
+ else m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou) all = Object.keys(all)
+
+ if (!this.nosort) {
+ all = all.sort(this.nocase ? alphasorti : alphasort)
+ }
+
+ if (this.mark) {
+ // at *some* point we statted all of these
+ all = all.map(function (m) {
+ var sc = this.statCache[m]
+ if (!sc)
+ return m
+ var isDir = (Array.isArray(sc) || sc === 2)
+ if (isDir && m.slice(-1) !== "/") {
+ return m + "/"
+ }
+ if (!isDir && m.slice(-1) === "/") {
+ return m.replace(/\/+$/, "")
+ }
+ return m
+ }, this)
+ }
+
+ this.log("emitting end", all)
+
+ this.EOF = this.found = all
+ this.emitMatch(this.EOF)
+}
+
+function alphasorti (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return alphasort(a, b)
+}
+
+function alphasort (a, b) {
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit("abort")
+}
+
+Glob.prototype.pause = function () {
+ if (this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = true
+ this.emit("pause")
+}
+
+Glob.prototype.resume = function () {
+ if (!this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = false
+ this.emit("resume")
+ this._processEmitQueue()
+ //process.nextTick(this.emit.bind(this, "resume"))
+}
+
+Glob.prototype.emitMatch = function (m) {
+ this._emitQueue.push(m)
+ this._processEmitQueue()
+}
+
+Glob.prototype._processEmitQueue = function (m) {
+ while (!this._processingEmitQueue &&
+ !this.paused) {
+ this._processingEmitQueue = true
+ var m = this._emitQueue.shift()
+ if (!m) {
+ this._processingEmitQueue = false
+ break
+ }
+
+ this.log('emit!', m === this.EOF ? "end" : "match")
+
+ this.emit(m === this.EOF ? "end" : "match", m)
+ this._processingEmitQueue = false
+ }
+}
+
+Glob.prototype._process = function (pattern, depth, index, cb_) {
+ assert(this instanceof Glob)
+
+ var cb = function cb (er, res) {
+ assert(this instanceof Glob)
+ if (this.paused) {
+ if (!this._processQueue) {
+ this._processQueue = []
+ this.once("resume", function () {
+ var q = this._processQueue
+ this._processQueue = null
+ q.forEach(function (cb) { cb() })
+ })
+ }
+ this._processQueue.push(cb_.bind(this, er, res))
+ } else {
+ cb_.call(this, er, res)
+ }
+ }.bind(this)
+
+ if (this.aborted) return cb()
+
+ if (depth > this.maxDepth) return cb()
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === "string") {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ prefix = pattern.join("/")
+ this._stat(prefix, function (exists, isDir) {
+ // either it's there, or it isn't.
+ // nothing more to do, either way.
+ if (exists) {
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ if (prefix.charAt(0) === "/") {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ }
+ }
+
+ if (process.platform === "win32")
+ prefix = prefix.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][prefix] = true
+ this.emitMatch(prefix)
+ }
+ return cb()
+ })
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's "absolute" like /foo/bar,
+ // or "relative" like "../baz"
+ prefix = pattern.slice(0, n)
+ prefix = prefix.join("/")
+ break
+ }
+
+ // get the list of entries.
+ var read
+ if (prefix === null) read = "."
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
+ if (!prefix || !isAbsolute(prefix)) {
+ prefix = path.join("/", prefix)
+ }
+ read = prefix = path.resolve(prefix)
+
+ // if (process.platform === "win32")
+ // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
+
+ this.log('absolute: ', prefix, this.root, pattern, read)
+ } else {
+ read = prefix
+ }
+
+ this.log('readdir(%j)', read, this.cwd, this.root)
+
+ return this._readdir(read, function (er, entries) {
+ if (er) {
+ // not a directory!
+ // this means that, whatever else comes after this, it can never match
+ return cb()
+ }
+
+ // globstar is special
+ if (pattern[n] === minimatch.GLOBSTAR) {
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
+ entries.forEach(function (e) {
+ if (e.charAt(0) === "." && !this.dot) return
+ // instead of the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
+ // below the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
+ }, this)
+
+ // now asyncForEach over this
+ var l = s.length
+ , errState = null
+ s.forEach(function (gsPattern) {
+ this._process(gsPattern, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l <= 0) return cb()
+ })
+ }, this)
+
+ return
+ }
+
+ // not a globstar
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = pattern[n]
+ if (typeof pn === "string") {
+ var found = entries.indexOf(pn) !== -1
+ entries = found ? entries[pn] : []
+ } else {
+ var rawGlob = pattern[n]._glob
+ , dotOk = this.dot || rawGlob.charAt(0) === "."
+
+ entries = entries.filter(function (e) {
+ return (e.charAt(0) !== "." || dotOk) &&
+ (typeof pattern[n] === "string" && e === pattern[n] ||
+ e.match(pattern[n]))
+ })
+ }
+
+ // If n === pattern.length - 1, then there's no need for the extra stat
+ // *unless* the user has specified "mark" or "stat" explicitly.
+ // We know that they exist, since the readdir returned them.
+ if (n === pattern.length - 1 &&
+ !this.mark &&
+ !this.stat) {
+ entries.forEach(function (e) {
+ if (prefix) {
+ if (prefix !== "/") e = prefix + "/" + e
+ else e = prefix + e
+ }
+ if (e.charAt(0) === "/" && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+
+ if (process.platform === "win32")
+ e = e.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][e] = true
+ this.emitMatch(e)
+ }, this)
+ return cb.call(this)
+ }
+
+
+ // now test all the remaining entries as stand-ins for that part
+ // of the pattern.
+ var l = entries.length
+ , errState = null
+ if (l === 0) return cb() // no matches possible
+ entries.forEach(function (e) {
+ var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
+ this._process(p, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l === 0) return cb.call(this)
+ })
+ }, this)
+ })
+
+}
+
+Glob.prototype._stat = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+ this.log('stat', [this.cwd, f, '=', abs])
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterStat(f, abs, cb, er)
+ }
+
+ if (this.statCache.hasOwnProperty(f)) {
+ var exists = this.statCache[f]
+ , isDir = exists && (Array.isArray(exists) || exists === 2)
+ if (this.sync) return cb.call(this, !!exists, isDir)
+ return process.nextTick(cb.bind(this, !!exists, isDir))
+ }
+
+ if (this.sync) {
+ var er, stat
+ try {
+ stat = fs.statSync(abs)
+ } catch (e) {
+ er = e
+ }
+ this._afterStat(f, abs, cb, er, stat)
+ } else {
+ fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
+ }
+}
+
+Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
+ var exists
+ assert(this instanceof Glob)
+
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) {
+ this.log("should be ENOTDIR, fake it")
+
+ er = new Error("ENOTDIR, not a directory '" + abs + "'")
+ er.path = abs
+ er.code = "ENOTDIR"
+ stat = null
+ }
+
+ if (er || !stat) {
+ exists = false
+ } else {
+ exists = stat.isDirectory() ? 2 : 1
+ }
+ this.statCache[f] = this.statCache[f] || exists
+ cb.call(this, !!exists, exists === 2)
+}
+
+Glob.prototype._readdir = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (isAbsolute(f)) {
+ abs = f
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+
+ this.log('readdir', [this.cwd, f, abs])
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterReaddir(f, abs, cb, er)
+ }
+
+ if (this.statCache.hasOwnProperty(f)) {
+ var c = this.statCache[f]
+ if (Array.isArray(c)) {
+ if (this.sync) return cb.call(this, null, c)
+ return process.nextTick(cb.bind(this, null, c))
+ }
+
+ if (!c || c === 1) {
+ // either ENOENT or ENOTDIR
+ var code = c ? "ENOTDIR" : "ENOENT"
+ , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
+ er.path = f
+ er.code = code
+ this.log(f, er)
+ if (this.sync) return cb.call(this, er)
+ return process.nextTick(cb.bind(this, er))
+ }
+
+ // at this point, c === 2, meaning it's a dir, but we haven't
+ // had to read it yet, or c === true, meaning it's *something*
+ // but we don't have any idea what. Need to read it, either way.
+ }
+
+ if (this.sync) {
+ var er, entries
+ try {
+ entries = fs.readdirSync(abs)
+ } catch (e) {
+ er = e
+ }
+ return this._afterReaddir(f, abs, cb, er, entries)
+ }
+
+ fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
+}
+
+Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
+ assert(this instanceof Glob)
+ if (entries && !er) {
+ this.statCache[f] = entries
+ // if we haven't asked to stat everything for suresies, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time. This also gets us one step
+ // further into ELOOP territory.
+ if (!this.mark && !this.stat) {
+ entries.forEach(function (e) {
+ if (f === "/") e = f + e
+ else e = f + "/" + e
+ this.statCache[e] = true
+ }, this)
+ }
+
+ return cb.call(this, er, entries)
+ }
+
+ // now handle errors, and cache the information
+ if (er) switch (er.code) {
+ case "ENOTDIR": // totally normal. means it *does* exist.
+ this.statCache[f] = 1
+ return cb.call(this, er)
+ case "ENOENT": // not terribly unusual
+ case "ELOOP":
+ case "ENAMETOOLONG":
+ case "UNKNOWN":
+ this.statCache[f] = false
+ return cb.call(this, er)
+ default: // some unusual error. Treat as failure.
+ this.statCache[f] = false
+ if (this.strict) this.emit("error", er)
+ if (!this.silent) console.error("glob error", er)
+ return cb.call(this, er)
+ }
+}
+
+var isAbsolute = process.platform === "win32" ? absWin : absUnix
+
+function absWin (p) {
+ if (absUnix(p)) return true
+ // pull off the device/UNC bit from a windows path.
+ // from node's lib/path.js
+ var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
+ , result = splitDeviceRe.exec(p)
+ , device = result[1] || ''
+ , isUnc = device && device.charAt(1) !== ':'
+ , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
+
+ return isAbsolute
+}
+
+function absUnix (p) {
+ return p.charAt(0) === "/" || p === ""
+}
diff --git a/source/node_modules/globule/node_modules/glob/package.json b/source/node_modules/globule/node_modules/glob/package.json
new file mode 100644
index 000000000..3fe07dd63
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/package.json
@@ -0,0 +1,82 @@
+{
+ "_args": [
+ [
+ "glob@~3.1.21",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/globule"
+ ]
+ ],
+ "_from": "glob@>=3.1.21 <3.2.0",
+ "_id": "glob@3.1.21",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/globule/glob",
+ "_npmUser": {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ "_npmVersion": "1.2.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "glob",
+ "raw": "glob@~3.1.21",
+ "rawSpec": "~3.1.21",
+ "scope": null,
+ "spec": ">=3.1.21 <3.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+ "_shasum": "d29e0a055dea5138f4d07ed40e8982e83c2066cd",
+ "_shrinkwrap": null,
+ "_spec": "glob@~3.1.21",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/globule",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "dependencies": {
+ "graceful-fs": "~1.2.0",
+ "inherits": "1",
+ "minimatch": "~0.2.11"
+ },
+ "description": "a little globber",
+ "devDependencies": {
+ "mkdirp": "0",
+ "rimraf": "1",
+ "tap": "~0.4.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d29e0a055dea5138f4d07ed40e8982e83c2066cd",
+ "tarball": "http://registry.npmjs.org/glob/-/glob-3.1.21.tgz"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "homepage": "https://github.com/isaacs/node-glob#readme",
+ "license": "BSD",
+ "main": "glob.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "glob",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "3.1.21"
+}
diff --git a/source/node_modules/globule/node_modules/glob/test/00-setup.js b/source/node_modules/globule/node_modules/glob/test/00-setup.js
new file mode 100644
index 000000000..245afafda
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/00-setup.js
@@ -0,0 +1,176 @@
+// just a little pre-run script to set up the fixtures.
+// zz-finish cleans it up
+
+var mkdirp = require("mkdirp")
+var path = require("path")
+var i = 0
+var tap = require("tap")
+var fs = require("fs")
+var rimraf = require("rimraf")
+
+var files =
+[ "a/.abcdef/x/y/z/a"
+, "a/abcdef/g/h"
+, "a/abcfed/g/h"
+, "a/b/c/d"
+, "a/bc/e/f"
+, "a/c/d/c/b"
+, "a/cb/e/f"
+]
+
+var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
+var symlinkFrom = "../.."
+
+files = files.map(function (f) {
+ return path.resolve(__dirname, f)
+})
+
+tap.test("remove fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "remove fixtures")
+ t.end()
+ })
+})
+
+files.forEach(function (f) {
+ tap.test(f, function (t) {
+ var d = path.dirname(f)
+ mkdirp(d, 0755, function (er) {
+ if (er) {
+ t.fail(er)
+ return t.bailout()
+ }
+ fs.writeFile(f, "i like tests", function (er) {
+ t.ifError(er, "make file")
+ t.end()
+ })
+ })
+ })
+})
+
+if (process.platform !== "win32") {
+ tap.test("symlinky", function (t) {
+ var d = path.dirname(symlinkTo)
+ console.error("mkdirp", d)
+ mkdirp(d, 0755, function (er) {
+ t.ifError(er)
+ fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) {
+ t.ifError(er, "make symlink")
+ t.end()
+ })
+ })
+ })
+}
+
+;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) {
+ w = "/tmp/glob-test/" + w
+ tap.test("create " + w, function (t) {
+ mkdirp(w, function (er) {
+ if (er)
+ throw er
+ t.pass(w)
+ t.end()
+ })
+ })
+})
+
+
+// generate the bash pattern test-fixtures if possible
+if (process.platform === "win32" || !process.env.TEST_REGEN) {
+ console.error("Windows, or TEST_REGEN unset. Using cached fixtures.")
+ return
+}
+
+var spawn = require("child_process").spawn;
+var globs =
+ // put more patterns here.
+ // anything that would be directly in / should be in /tmp/glob-test
+ ["test/a/*/+(c|g)/./d"
+ ,"test/a/**/[cg]/../[cg]"
+ ,"test/a/{b,c,d,e,f}/**/g"
+ ,"test/a/b/**"
+ ,"test/**/g"
+ ,"test/a/abc{fed,def}/g/h"
+ ,"test/a/abc{fed/g,def}/**/"
+ ,"test/a/abc{fed/g,def}/**///**/"
+ ,"test/**/a/**/"
+ ,"test/+(a|b|c)/a{/,bc*}/**"
+ ,"test/*/*/*/f"
+ ,"test/**/f"
+ ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
+ ,"{./*/*,/tmp/glob-test/*}"
+ ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me!
+ ,"test/a/!(symlink)/**"
+ ]
+var bashOutput = {}
+var fs = require("fs")
+
+globs.forEach(function (pattern) {
+ tap.test("generate fixture " + pattern, function (t) {
+ var cmd = "shopt -s globstar && " +
+ "shopt -s extglob && " +
+ "shopt -s nullglob && " +
+ // "shopt >&2; " +
+ "eval \'for i in " + pattern + "; do echo $i; done\'"
+ var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) })
+ var out = []
+ cp.stdout.on("data", function (c) {
+ out.push(c)
+ })
+ cp.stderr.pipe(process.stderr)
+ cp.on("close", function (code) {
+ out = flatten(out)
+ if (!out)
+ out = []
+ else
+ out = cleanResults(out.split(/\r*\n/))
+
+ bashOutput[pattern] = out
+ t.notOk(code, "bash test should finish nicely")
+ t.end()
+ })
+ })
+})
+
+tap.test("save fixtures", function (t) {
+ var fname = path.resolve(__dirname, "bash-results.json")
+ var data = JSON.stringify(bashOutput, null, 2) + "\n"
+ fs.writeFile(fname, data, function (er) {
+ t.ifError(er)
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+function flatten (chunks) {
+ var s = 0
+ chunks.forEach(function (c) { s += c.length })
+ var out = new Buffer(s)
+ s = 0
+ chunks.forEach(function (c) {
+ c.copy(out, s)
+ s += c.length
+ })
+
+ return out.toString().trim()
+}
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
diff --git a/source/node_modules/globule/node_modules/glob/test/bash-comparison.js b/source/node_modules/globule/node_modules/glob/test/bash-comparison.js
new file mode 100644
index 000000000..239ed1a9c
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/bash-comparison.js
@@ -0,0 +1,63 @@
+// basic test
+// show that it does the same thing by default as the shell.
+var tap = require("tap")
+, child_process = require("child_process")
+, bashResults = require("./bash-results.json")
+, globs = Object.keys(bashResults)
+, glob = require("../")
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+globs.forEach(function (pattern) {
+ var expect = bashResults[pattern]
+ // anything regarding the symlink thing will fail on windows, so just skip it
+ if (process.platform === "win32" &&
+ expect.some(function (m) {
+ return /\/symlink\//.test(m)
+ }))
+ return
+
+ tap.test(pattern, function (t) {
+ glob(pattern, function (er, matches) {
+ if (er)
+ throw er
+
+ // sort and unmark, just to match the shell results
+ matches = cleanResults(matches)
+
+ t.deepEqual(matches, expect, pattern)
+ t.end()
+ })
+ })
+
+ tap.test(pattern + " sync", function (t) {
+ var matches = cleanResults(glob.sync(pattern))
+
+ t.deepEqual(matches, expect, "should match shell")
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
+ })
+}
diff --git a/source/node_modules/globule/node_modules/glob/test/bash-results.json b/source/node_modules/globule/node_modules/glob/test/bash-results.json
new file mode 100644
index 000000000..c227449b6
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/bash-results.json
@@ -0,0 +1,348 @@
+{
+ "test/a/*/+(c|g)/./d": [
+ "test/a/b/c/./d"
+ ],
+ "test/a/**/[cg]/../[cg]": [
+ "test/a/abcdef/g/../g",
+ "test/a/abcfed/g/../g",
+ "test/a/b/c/../c",
+ "test/a/c/../c",
+ "test/a/c/d/c/../c",
+ "test/a/symlink/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c"
+ ],
+ "test/a/{b,c,d,e,f}/**/g": [],
+ "test/a/b/**": [
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d"
+ ],
+ "test/**/g": [
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed,def}/g/h": [
+ "test/a/abcdef/g/h",
+ "test/a/abcfed/g/h"
+ ],
+ "test/a/abc{fed/g,def}/**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed/g,def}/**///**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/**/a/**/": [
+ "test/a",
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/symlink",
+ "test/a/symlink/a",
+ "test/a/symlink/a/b",
+ "test/a/symlink/a/b/c",
+ "test/a/symlink/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b"
+ ],
+ "test/+(a|b|c)/a{/,bc*}/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h"
+ ],
+ "test/*/*/*/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/**/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c"
+ ],
+ "{./*/*,/tmp/glob-test/*}": [
+ "./examples/g.js",
+ "./examples/usr-local.js",
+ "./node_modules/graceful-fs",
+ "./node_modules/inherits",
+ "./node_modules/minimatch",
+ "./node_modules/mkdirp",
+ "./node_modules/rimraf",
+ "./node_modules/tap",
+ "./test/00-setup.js",
+ "./test/a",
+ "./test/bash-comparison.js",
+ "./test/bash-results.json",
+ "./test/cwd-test.js",
+ "./test/mark.js",
+ "./test/nocase-nomagic.js",
+ "./test/pause-resume.js",
+ "./test/root-nomount.js",
+ "./test/root.js",
+ "./test/zz-cleanup.js",
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq"
+ ],
+ "{/tmp/glob-test/*,*}": [
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq",
+ "examples",
+ "glob.js",
+ "LICENSE",
+ "node_modules",
+ "package.json",
+ "README.md",
+ "test"
+ ],
+ "test/a/!(symlink)/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/bc/e/f",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/c/d/c/b",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/cb/e/f"
+ ]
+}
diff --git a/source/node_modules/globule/node_modules/glob/test/cwd-test.js b/source/node_modules/globule/node_modules/glob/test/cwd-test.js
new file mode 100644
index 000000000..352c27efa
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/cwd-test.js
@@ -0,0 +1,55 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing cwd and searching for **/d", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('**/d', function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'b/c/d', 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b/', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('.', function (t) {
+ glob('**/d', {cwd: process.cwd()}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
diff --git a/source/node_modules/globule/node_modules/glob/test/mark.js b/source/node_modules/globule/node_modules/glob/test/mark.js
new file mode 100644
index 000000000..ed68a335c
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/mark.js
@@ -0,0 +1,74 @@
+var test = require("tap").test
+var glob = require('../')
+process.chdir(__dirname)
+
+test("mark, no / on pattern", function (t) {
+ glob("a/*", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, no / on pattern", function (t) {
+ glob("a/*", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=true, / on pattern", function (t) {
+ glob("a/*/", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, / on pattern", function (t) {
+ glob("a/*/", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
diff --git a/source/node_modules/globule/node_modules/glob/test/nocase-nomagic.js b/source/node_modules/globule/node_modules/glob/test/nocase-nomagic.js
new file mode 100644
index 000000000..d86297098
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/nocase-nomagic.js
@@ -0,0 +1,113 @@
+var fs = require('graceful-fs');
+var test = require('tap').test;
+var glob = require('../');
+
+test('mock fs', function(t) {
+ var stat = fs.stat
+ var statSync = fs.statSync
+ var readdir = fs.readdir
+ var readdirSync = fs.readdirSync
+
+ function fakeStat(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = { isDirectory: function() { return true } }
+ break
+ case '/tmp/a':
+ ret = { isDirectory: function() { return false } }
+ break
+ }
+ return ret
+ }
+
+ fs.stat = function(path, cb) {
+ var f = fakeStat(path);
+ if (f) {
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ } else {
+ stat.call(fs, path, cb)
+ }
+ }
+
+ fs.statSync = function(path) {
+ return fakeStat(path) || statSync.call(fs, path)
+ }
+
+ function fakeReaddir(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = [ 'a', 'A' ]
+ break
+ case '/':
+ ret = ['tmp', 'tMp', 'tMP', 'TMP']
+ }
+ return ret
+ }
+
+ fs.readdir = function(path, cb) {
+ var f = fakeReaddir(path)
+ if (f)
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ else
+ readdir.call(fs, path, cb)
+ }
+
+ fs.readdirSync = function(path) {
+ return fakeReaddir(path) || readdirSync.call(fs, path)
+ }
+
+ t.pass('mocked')
+ t.end()
+})
+
+test('nocase, nomagic', function(t) {
+ var n = 2
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/a', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+ glob('/tmp/A', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+})
+
+test('nocase, with some magic', function(t) {
+ t.plan(2)
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+})
diff --git a/source/node_modules/globule/node_modules/glob/test/pause-resume.js b/source/node_modules/globule/node_modules/glob/test/pause-resume.js
new file mode 100644
index 000000000..e1ffbab1c
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/pause-resume.js
@@ -0,0 +1,73 @@
+// show that no match events happen while paused.
+var tap = require("tap")
+, child_process = require("child_process")
+// just some gnarly pattern with lots of matches
+, pattern = "test/a/!(symlink)/**"
+, bashResults = require("./bash-results.json")
+, patterns = Object.keys(bashResults)
+, glob = require("../")
+, Glob = glob.Glob
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+var globResults = []
+tap.test("use a Glob object, and pause/resume it", function (t) {
+ var g = new Glob(pattern)
+ , paused = false
+ , res = []
+ , expect = bashResults[pattern]
+
+ g.on("pause", function () {
+ console.error("pause")
+ })
+
+ g.on("resume", function () {
+ console.error("resume")
+ })
+
+ g.on("match", function (m) {
+ t.notOk(g.paused, "must not be paused")
+ globResults.push(m)
+ g.pause()
+ t.ok(g.paused, "must be paused")
+ setTimeout(g.resume.bind(g), 10)
+ })
+
+ g.on("end", function (matches) {
+ t.pass("reached glob end")
+ globResults = cleanResults(globResults)
+ matches = cleanResults(matches)
+ t.deepEqual(matches, globResults,
+ "end event matches should be the same as match events")
+
+ t.deepEqual(matches, expect,
+ "glob matches should be the same as bash results")
+
+ t.end()
+ })
+})
+
diff --git a/source/node_modules/globule/node_modules/glob/test/root-nomount.js b/source/node_modules/globule/node_modules/glob/test/root-nomount.js
new file mode 100644
index 000000000..3ac5979b0
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/root-nomount.js
@@ -0,0 +1,39 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
diff --git a/source/node_modules/globule/node_modules/glob/test/root.js b/source/node_modules/globule/node_modules/glob/test/root.js
new file mode 100644
index 000000000..95c23f99c
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/root.js
@@ -0,0 +1,46 @@
+var t = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+var glob = require('../')
+var path = require('path')
+
+t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+})
+
+
+t.test('a', function (t) {
+ console.error("root=" + path.resolve('a'))
+ glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
+ t.ifError(er)
+ var wanted = [
+ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
+ ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ })
+
+ t.like(matches, wanted)
+ t.end()
+ })
+})
+
+t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ }))
+ t.end()
+ })
+})
+
+t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+})
diff --git a/source/node_modules/globule/node_modules/glob/test/zz-cleanup.js b/source/node_modules/globule/node_modules/glob/test/zz-cleanup.js
new file mode 100644
index 000000000..e085f0fa7
--- /dev/null
+++ b/source/node_modules/globule/node_modules/glob/test/zz-cleanup.js
@@ -0,0 +1,11 @@
+// remove the fixtures
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("cleanup fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "removed")
+ t.end()
+ })
+})
diff --git a/source/node_modules/globule/node_modules/graceful-fs/.npmignore b/source/node_modules/globule/node_modules/graceful-fs/.npmignore
new file mode 100644
index 000000000..c2658d7d1
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/.npmignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/source/node_modules/globule/node_modules/graceful-fs/LICENSE b/source/node_modules/globule/node_modules/graceful-fs/LICENSE
new file mode 100644
index 000000000..0c44ae716
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
diff --git a/source/node_modules/globule/node_modules/graceful-fs/README.md b/source/node_modules/globule/node_modules/graceful-fs/README.md
new file mode 100644
index 000000000..01af3d6b6
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/README.md
@@ -0,0 +1,33 @@
+# graceful-fs
+
+graceful-fs functions as a drop-in replacement for the fs module,
+making various improvements.
+
+The improvements are meant to normalize behavior across different
+platforms and environments, and to make filesystem access more
+resilient to errors.
+
+## Improvements over fs module
+
+graceful-fs:
+
+* keeps track of how many file descriptors are open, and by default
+ limits this to 1024. Any further requests to open a file are put in a
+ queue until new slots become available. If 1024 turns out to be too
+ much, it decreases the limit further.
+* fixes `lchmod` for Node versions prior to 0.6.2.
+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
+ `lchown` if the user isn't root.
+* makes `lchmod` and `lchown` become noops, if not available.
+* retries reading a file if `read` results in EAGAIN error.
+
+On Windows, it retries renaming a file for up to one second if `EACCESS`
+or `EPERM` error occurs, likely because antivirus software has locked
+the directory.
+
+## Configuration
+
+The maximum number of open file descriptors that graceful-fs manages may
+be adjusted by setting `fs.MAX_OPEN` to a different number. The default
+is 1024.
diff --git a/source/node_modules/globule/node_modules/graceful-fs/graceful-fs.js b/source/node_modules/globule/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 000000000..ca9115243
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,442 @@
+// this keeps a queue of opened file descriptors, and will make
+// fs operations wait until some have closed before trying to open more.
+
+var fs = exports = module.exports = {}
+fs._originalFs = require("fs")
+
+Object.getOwnPropertyNames(fs._originalFs).forEach(function(prop) {
+ var desc = Object.getOwnPropertyDescriptor(fs._originalFs, prop)
+ Object.defineProperty(fs, prop, desc)
+})
+
+var queue = []
+ , constants = require("constants")
+
+fs._curOpen = 0
+
+fs.MIN_MAX_OPEN = 64
+fs.MAX_OPEN = 1024
+
+// prevent EMFILE errors
+function OpenReq (path, flags, mode, cb) {
+ this.path = path
+ this.flags = flags
+ this.mode = mode
+ this.cb = cb
+}
+
+function noop () {}
+
+fs.open = gracefulOpen
+
+function gracefulOpen (path, flags, mode, cb) {
+ if (typeof mode === "function") cb = mode, mode = null
+ if (typeof cb !== "function") cb = noop
+
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new OpenReq(path, flags, mode, cb))
+ setTimeout(flush)
+ return
+ }
+ open(path, flags, mode, function (er, fd) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ // that was too many. reduce max, get back in queue.
+ // this should only happen once in a great while, and only
+ // if the ulimit -n is set lower than 1024.
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.open(path, flags, mode, cb)
+ }
+ cb(er, fd)
+ })
+}
+
+function open (path, flags, mode, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.open.call(fs, path, flags, mode, function (er, fd) {
+ if (er) onclose()
+ cb(er, fd)
+ })
+}
+
+fs.openSync = function (path, flags, mode) {
+ var ret
+ ret = fs._originalFs.openSync.call(fs, path, flags, mode)
+ fs._curOpen ++
+ return ret
+}
+
+function onclose () {
+ fs._curOpen --
+ flush()
+}
+
+function flush () {
+ while (fs._curOpen < fs.MAX_OPEN) {
+ var req = queue.shift()
+ if (!req) return
+ switch (req.constructor.name) {
+ case 'OpenReq':
+ open(req.path, req.flags || "r", req.mode || 0777, req.cb)
+ break
+ case 'ReaddirReq':
+ readdir(req.path, req.cb)
+ break
+ case 'ReadFileReq':
+ readFile(req.path, req.options, req.cb)
+ break
+ case 'WriteFileReq':
+ writeFile(req.path, req.data, req.options, req.cb)
+ break
+ default:
+ throw new Error('Unknown req type: ' + req.constructor.name)
+ }
+ }
+}
+
+fs.close = function (fd, cb) {
+ cb = cb || noop
+ fs._originalFs.close.call(fs, fd, function (er) {
+ onclose()
+ cb(er)
+ })
+}
+
+fs.closeSync = function (fd) {
+ try {
+ return fs._originalFs.closeSync.call(fs, fd)
+ } finally {
+ onclose()
+ }
+}
+
+
+// readdir takes a fd as well.
+// however, the sync version closes it right away, so
+// there's no need to wrap.
+// It would be nice to catch when it throws an EMFILE,
+// but that's relatively rare anyway.
+
+fs.readdir = gracefulReaddir
+
+function gracefulReaddir (path, cb) {
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new ReaddirReq(path, cb))
+ setTimeout(flush)
+ return
+ }
+
+ readdir(path, function (er, files) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.readdir(path, cb)
+ }
+ cb(er, files)
+ })
+}
+
+function readdir (path, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.readdir.call(fs, path, function (er, files) {
+ onclose()
+ cb(er, files)
+ })
+}
+
+function ReaddirReq (path, cb) {
+ this.path = path
+ this.cb = cb
+}
+
+
+fs.readFile = gracefulReadFile
+
+function gracefulReadFile(path, options, cb) {
+ if (typeof options === "function") cb = options, options = null
+ if (typeof cb !== "function") cb = noop
+
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new ReadFileReq(path, options, cb))
+ setTimeout(flush)
+ return
+ }
+
+ readFile(path, options, function (er, data) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.readFile(path, options, cb)
+ }
+ cb(er, data)
+ })
+}
+
+function readFile (path, options, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.readFile.call(fs, path, options, function (er, data) {
+ onclose()
+ cb(er, data)
+ })
+}
+
+function ReadFileReq (path, options, cb) {
+ this.path = path
+ this.options = options
+ this.cb = cb
+}
+
+
+
+
+fs.writeFile = gracefulWriteFile
+
+function gracefulWriteFile(path, data, options, cb) {
+ if (typeof options === "function") cb = options, options = null
+ if (typeof cb !== "function") cb = noop
+
+ if (fs._curOpen >= fs.MAX_OPEN) {
+ queue.push(new WriteFileReq(path, data, options, cb))
+ setTimeout(flush)
+ return
+ }
+
+ writeFile(path, data, options, function (er) {
+ if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) {
+ fs.MAX_OPEN = fs._curOpen - 1
+ return fs.writeFile(path, data, options, cb)
+ }
+ cb(er)
+ })
+}
+
+function writeFile (path, data, options, cb) {
+ cb = cb || noop
+ fs._curOpen ++
+ fs._originalFs.writeFile.call(fs, path, data, options, function (er) {
+ onclose()
+ cb(er)
+ })
+}
+
+function WriteFileReq (path, data, options, cb) {
+ this.path = path
+ this.data = data
+ this.options = options
+ this.cb = cb
+}
+
+
+// (re-)implement some things that are known busted or missing.
+
+var constants = require("constants")
+
+// lchmod, broken prior to 0.6.2
+// back-port the fix here.
+if (constants.hasOwnProperty('O_SYMLINK') &&
+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+ fs.lchmod = function (path, mode, callback) {
+ callback = callback || noop
+ fs.open( path
+ , constants.O_WRONLY | constants.O_SYMLINK
+ , mode
+ , function (err, fd) {
+ if (err) {
+ callback(err)
+ return
+ }
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ fs.fchmod(fd, mode, function (err) {
+ fs.close(fd, function(err2) {
+ callback(err || err2)
+ })
+ })
+ })
+ }
+
+ fs.lchmodSync = function (path, mode) {
+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ var err, err2
+ try {
+ var ret = fs.fchmodSync(fd, mode)
+ } catch (er) {
+ err = er
+ }
+ try {
+ fs.closeSync(fd)
+ } catch (er) {
+ err2 = er
+ }
+ if (err || err2) throw (err || err2)
+ return ret
+ }
+}
+
+
+// lutimes implementation, or no-op
+if (!fs.lutimes) {
+ if (constants.hasOwnProperty("O_SYMLINK")) {
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
+ cb = cb || noop
+ if (er) return cb(er)
+ fs.futimes(fd, at, mt, function (er) {
+ fs.close(fd, function (er2) {
+ return cb(er || er2)
+ })
+ })
+ })
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ var fd = fs.openSync(path, constants.O_SYMLINK)
+ , err
+ , err2
+ , ret
+
+ try {
+ var ret = fs.futimesSync(fd, at, mt)
+ } catch (er) {
+ err = er
+ }
+ try {
+ fs.closeSync(fd)
+ } catch (er) {
+ err2 = er
+ }
+ if (err || err2) throw (err || err2)
+ return ret
+ }
+
+ } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
+ // maybe utimensat will be bound soonish?
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
+ }
+
+ } else {
+ fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+ fs.lutimesSync = function () {}
+ }
+}
+
+
+// https://github.com/isaacs/node-graceful-fs/issues/4
+// Chown should not fail on einval or eperm if non-root.
+
+fs.chown = chownFix(fs.chown)
+fs.fchown = chownFix(fs.fchown)
+fs.lchown = chownFix(fs.lchown)
+
+fs.chownSync = chownFixSync(fs.chownSync)
+fs.fchownSync = chownFixSync(fs.fchownSync)
+fs.lchownSync = chownFixSync(fs.lchownSync)
+
+function chownFix (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid, cb) {
+ return orig.call(fs, target, uid, gid, function (er, res) {
+ if (chownErOk(er)) er = null
+ cb(er, res)
+ })
+ }
+}
+
+function chownFixSync (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid) {
+ try {
+ return orig.call(fs, target, uid, gid)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+function chownErOk (er) {
+ // if there's no getuid, or if getuid() is something other than 0,
+ // and the error is EINVAL or EPERM, then just ignore it.
+ // This specific case is a silent failure in cp, install, tar,
+ // and most other unix tools that manage permissions.
+ // When running as root, or if other types of errors are encountered,
+ // then it's strict.
+ if (!er || (!process.getuid || process.getuid() !== 0)
+ && (er.code === "EINVAL" || er.code === "EPERM")) return true
+}
+
+
+// if lchmod/lchown do not exist, then make them no-ops
+if (!fs.lchmod) {
+ fs.lchmod = function (path, mode, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchmodSync = function () {}
+}
+if (!fs.lchown) {
+ fs.lchown = function (path, uid, gid, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchownSync = function () {}
+}
+
+
+
+// on Windows, A/V software can lock the directory, causing this
+// to fail with an EACCES or EPERM if the directory contains newly
+// created files. Try again on failure, for up to 1 second.
+if (process.platform === "win32") {
+ var rename_ = fs.rename
+ fs.rename = function rename (from, to, cb) {
+ var start = Date.now()
+ rename_(from, to, function CB (er) {
+ if (er
+ && (er.code === "EACCES" || er.code === "EPERM")
+ && Date.now() - start < 1000) {
+ return rename_(from, to, CB)
+ }
+ cb(er)
+ })
+ }
+}
+
+
+// if read() returns EAGAIN, then just try it again.
+var read = fs.read
+fs.read = function (fd, buffer, offset, length, position, callback_) {
+ var callback
+ if (callback_ && typeof callback_ === 'function') {
+ var eagCounter = 0
+ callback = function (er, _, __) {
+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ return read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+ callback_.apply(this, arguments)
+ }
+ }
+ return read.call(fs, fd, buffer, offset, length, position, callback)
+}
+
+var readSync = fs.readSync
+fs.readSync = function (fd, buffer, offset, length, position) {
+ var eagCounter = 0
+ while (true) {
+ try {
+ return readSync.call(fs, fd, buffer, offset, length, position)
+ } catch (er) {
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ continue
+ }
+ throw er
+ }
+ }
+}
diff --git a/source/node_modules/globule/node_modules/graceful-fs/package.json b/source/node_modules/globule/node_modules/graceful-fs/package.json
new file mode 100644
index 000000000..3abe5965b
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/package.json
@@ -0,0 +1,93 @@
+{
+ "_args": [
+ [
+ "graceful-fs@~1.2.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/globule/node_modules/glob"
+ ]
+ ],
+ "_from": "graceful-fs@>=1.2.0 <1.3.0",
+ "_id": "graceful-fs@1.2.3",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/globule/graceful-fs",
+ "_npmUser": {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ "_npmVersion": "1.3.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "graceful-fs",
+ "raw": "graceful-fs@~1.2.0",
+ "rawSpec": "~1.2.0",
+ "scope": null,
+ "spec": ">=1.2.0 <1.3.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+ "_shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364",
+ "_shrinkwrap": null,
+ "_spec": "graceful-fs@~1.2.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/globule/node_modules/glob",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-graceful-fs/issues"
+ },
+ "dependencies": {},
+ "deprecated": "graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.",
+ "description": "A drop-in replacement for fs, making various improvements.",
+ "devDependencies": {},
+ "directories": {
+ "test": "test"
+ },
+ "dist": {
+ "shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364",
+ "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
+ "keywords": [
+ "EACCESS",
+ "EAGAIN",
+ "EINVAL",
+ "EMFILE",
+ "EPERM",
+ "error",
+ "errors",
+ "fs",
+ "handling",
+ "module",
+ "queue",
+ "reading",
+ "retries",
+ "retry"
+ ],
+ "license": "BSD",
+ "main": "graceful-fs.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "graceful-fs",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-graceful-fs.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "1.2.3"
+}
diff --git a/source/node_modules/globule/node_modules/graceful-fs/test/open.js b/source/node_modules/globule/node_modules/graceful-fs/test/open.js
new file mode 100644
index 000000000..930d53257
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/test/open.js
@@ -0,0 +1,46 @@
+var test = require('tap').test
+var fs = require('../graceful-fs.js')
+
+test('graceful fs is not fs', function (t) {
+ t.notEqual(fs, require('fs'))
+ t.end()
+})
+
+test('open an existing file works', function (t) {
+ var start = fs._curOpen
+ var fd = fs.openSync(__filename, 'r')
+ t.equal(fs._curOpen, start + 1)
+ fs.closeSync(fd)
+ t.equal(fs._curOpen, start)
+ fs.open(__filename, 'r', function (er, fd) {
+ if (er) throw er
+ t.equal(fs._curOpen, start + 1)
+ fs.close(fd, function (er) {
+ if (er) throw er
+ t.equal(fs._curOpen, start)
+ t.end()
+ })
+ })
+})
+
+test('open a non-existing file throws', function (t) {
+ var start = fs._curOpen
+ var er
+ try {
+ var fd = fs.openSync('this file does not exist', 'r')
+ } catch (x) {
+ er = x
+ }
+ t.ok(er, 'should throw')
+ t.notOk(fd, 'should not get an fd')
+ t.equal(er.code, 'ENOENT')
+ t.equal(fs._curOpen, start)
+
+ fs.open('neither does this file', 'r', function (er, fd) {
+ t.ok(er, 'should throw')
+ t.notOk(fd, 'should not get an fd')
+ t.equal(er.code, 'ENOENT')
+ t.equal(fs._curOpen, start)
+ t.end()
+ })
+})
diff --git a/source/node_modules/globule/node_modules/graceful-fs/test/ulimit.js b/source/node_modules/globule/node_modules/graceful-fs/test/ulimit.js
new file mode 100644
index 000000000..8d0882d0c
--- /dev/null
+++ b/source/node_modules/globule/node_modules/graceful-fs/test/ulimit.js
@@ -0,0 +1,158 @@
+var test = require('tap').test
+
+// simulated ulimit
+// this is like graceful-fs, but in reverse
+var fs_ = require('fs')
+var fs = require('../graceful-fs.js')
+var files = fs.readdirSync(__dirname)
+
+// Ok, no more actual file reading!
+
+var fds = 0
+var nextFd = 60
+var limit = 8
+fs_.open = function (path, flags, mode, cb) {
+ process.nextTick(function() {
+ ++fds
+ if (fds >= limit) {
+ --fds
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ return cb(er)
+ } else {
+ cb(null, nextFd++)
+ }
+ })
+}
+
+fs_.openSync = function (path, flags, mode) {
+ if (fds >= limit) {
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ throw er
+ } else {
+ ++fds
+ return nextFd++
+ }
+}
+
+fs_.close = function (fd, cb) {
+ process.nextTick(function () {
+ --fds
+ cb()
+ })
+}
+
+fs_.closeSync = function (fd) {
+ --fds
+}
+
+fs_.readdir = function (path, cb) {
+ process.nextTick(function() {
+ if (fds >= limit) {
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ return cb(er)
+ } else {
+ ++fds
+ process.nextTick(function () {
+ --fds
+ cb(null, [__filename, "some-other-file.js"])
+ })
+ }
+ })
+}
+
+fs_.readdirSync = function (path) {
+ if (fds >= limit) {
+ var er = new Error('EMFILE Curses!')
+ er.code = 'EMFILE'
+ er.path = path
+ throw er
+ } else {
+ return [__filename, "some-other-file.js"]
+ }
+}
+
+
+test('open emfile autoreduce', function (t) {
+ fs.MIN_MAX_OPEN = 4
+ t.equal(fs.MAX_OPEN, 1024)
+
+ var max = 12
+ for (var i = 0; i < max; i++) {
+ fs.open(__filename, 'r', next(i))
+ }
+
+ var phase = 0
+
+ var expect =
+ [ [ 0, 60, null, 1024, 4, 12, 1 ],
+ [ 1, 61, null, 1024, 4, 12, 2 ],
+ [ 2, 62, null, 1024, 4, 12, 3 ],
+ [ 3, 63, null, 1024, 4, 12, 4 ],
+ [ 4, 64, null, 1024, 4, 12, 5 ],
+ [ 5, 65, null, 1024, 4, 12, 6 ],
+ [ 6, 66, null, 1024, 4, 12, 7 ],
+ [ 7, 67, null, 6, 4, 5, 1 ],
+ [ 8, 68, null, 6, 4, 5, 2 ],
+ [ 9, 69, null, 6, 4, 5, 3 ],
+ [ 10, 70, null, 6, 4, 5, 4 ],
+ [ 11, 71, null, 6, 4, 5, 5 ] ]
+
+ var actual = []
+
+ function next (i) { return function (er, fd) {
+ if (er)
+ throw er
+ actual.push([i, fd, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds])
+
+ if (i === max - 1) {
+ t.same(actual, expect)
+ t.ok(fs.MAX_OPEN < limit)
+ t.end()
+ }
+
+ fs.close(fd)
+ } }
+})
+
+test('readdir emfile autoreduce', function (t) {
+ fs.MAX_OPEN = 1024
+ var max = 12
+ for (var i = 0; i < max; i ++) {
+ fs.readdir(__dirname, next(i))
+ }
+
+ var expect =
+ [ [0,[__filename,"some-other-file.js"],null,7,4,7,7],
+ [1,[__filename,"some-other-file.js"],null,7,4,7,6],
+ [2,[__filename,"some-other-file.js"],null,7,4,7,5],
+ [3,[__filename,"some-other-file.js"],null,7,4,7,4],
+ [4,[__filename,"some-other-file.js"],null,7,4,7,3],
+ [5,[__filename,"some-other-file.js"],null,7,4,6,2],
+ [6,[__filename,"some-other-file.js"],null,7,4,5,1],
+ [7,[__filename,"some-other-file.js"],null,7,4,4,0],
+ [8,[__filename,"some-other-file.js"],null,7,4,3,3],
+ [9,[__filename,"some-other-file.js"],null,7,4,2,2],
+ [10,[__filename,"some-other-file.js"],null,7,4,1,1],
+ [11,[__filename,"some-other-file.js"],null,7,4,0,0] ]
+
+ var actual = []
+
+ function next (i) { return function (er, files) {
+ if (er)
+ throw er
+ var line = [i, files, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds ]
+ actual.push(line)
+
+ if (i === max - 1) {
+ t.ok(fs.MAX_OPEN < limit)
+ t.same(actual, expect)
+ t.end()
+ }
+ } }
+})
diff --git a/source/node_modules/globule/node_modules/inherits/LICENSE b/source/node_modules/globule/node_modules/inherits/LICENSE
new file mode 100644
index 000000000..dea3013d6
--- /dev/null
+++ b/source/node_modules/globule/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/source/node_modules/globule/node_modules/inherits/README.md b/source/node_modules/globule/node_modules/inherits/README.md
new file mode 100644
index 000000000..b2beaed93
--- /dev/null
+++ b/source/node_modules/globule/node_modules/inherits/README.md
@@ -0,0 +1,51 @@
+A dead simple way to do inheritance in JS.
+
+ var inherits = require("inherits")
+
+ function Animal () {
+ this.alive = true
+ }
+ Animal.prototype.say = function (what) {
+ console.log(what)
+ }
+
+ inherits(Dog, Animal)
+ function Dog () {
+ Dog.super.apply(this)
+ }
+ Dog.prototype.sniff = function () {
+ this.say("sniff sniff")
+ }
+ Dog.prototype.bark = function () {
+ this.say("woof woof")
+ }
+
+ inherits(Chihuahua, Dog)
+ function Chihuahua () {
+ Chihuahua.super.apply(this)
+ }
+ Chihuahua.prototype.bark = function () {
+ this.say("yip yip")
+ }
+
+ // also works
+ function Cat () {
+ Cat.super.apply(this)
+ }
+ Cat.prototype.hiss = function () {
+ this.say("CHSKKSS!!")
+ }
+ inherits(Cat, Animal, {
+ meow: function () { this.say("miao miao") }
+ })
+ Cat.prototype.purr = function () {
+ this.say("purr purr")
+ }
+
+
+ var c = new Chihuahua
+ assert(c instanceof Chihuahua)
+ assert(c instanceof Dog)
+ assert(c instanceof Animal)
+
+The actual function is laughably small. 10-lines small.
diff --git a/source/node_modules/globule/node_modules/inherits/inherits.js b/source/node_modules/globule/node_modules/inherits/inherits.js
new file mode 100644
index 000000000..061b39620
--- /dev/null
+++ b/source/node_modules/globule/node_modules/inherits/inherits.js
@@ -0,0 +1,29 @@
+module.exports = inherits
+
+function inherits (c, p, proto) {
+ proto = proto || {}
+ var e = {}
+ ;[c.prototype, proto].forEach(function (s) {
+ Object.getOwnPropertyNames(s).forEach(function (k) {
+ e[k] = Object.getOwnPropertyDescriptor(s, k)
+ })
+ })
+ c.prototype = Object.create(p.prototype, e)
+ c.super = p
+}
+
+//function Child () {
+// Child.super.call(this)
+// console.error([this
+// ,this.constructor
+// ,this.constructor === Child
+// ,this.constructor.super === Parent
+// ,Object.getPrototypeOf(this) === Child.prototype
+// ,Object.getPrototypeOf(Object.getPrototypeOf(this))
+// === Parent.prototype
+// ,this instanceof Child
+// ,this instanceof Parent])
+//}
+//function Parent () {}
+//inherits(Child, Parent)
+//new Child
diff --git a/source/node_modules/globule/node_modules/inherits/package.json b/source/node_modules/globule/node_modules/inherits/package.json
new file mode 100644
index 000000000..f497d6429
--- /dev/null
+++ b/source/node_modules/globule/node_modules/inherits/package.json
@@ -0,0 +1,76 @@
+{
+ "_args": [
+ [
+ "inherits@1",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/globule/node_modules/glob"
+ ]
+ ],
+ "_from": "inherits@>=1.0.0 <2.0.0",
+ "_id": "inherits@1.0.2",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/globule/inherits",
+ "_nodeVersion": "2.2.1",
+ "_npmUser": {
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
+ },
+ "_npmVersion": "3.2.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "inherits",
+ "raw": "inherits@1",
+ "rawSpec": "1",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/globule/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+ "_shasum": "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b",
+ "_shrinkwrap": null,
+ "_spec": "inherits@1",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/globule/node_modules/glob",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "dependencies": {},
+ "description": "A tiny simple way to do classic inheritance in js",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b",
+ "tarball": "http://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz"
+ },
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "keywords": [
+ "class",
+ "inheritance",
+ "klass",
+ "object-oriented",
+ "oop"
+ ],
+ "main": "./inherits.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "inherits",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/inherits.git"
+ },
+ "scripts": {},
+ "version": "1.0.2"
+}
diff --git a/source/node_modules/globule/package.json b/source/node_modules/globule/package.json
new file mode 100644
index 000000000..18b77681d
--- /dev/null
+++ b/source/node_modules/globule/package.json
@@ -0,0 +1,101 @@
+{
+ "_args": [
+ [
+ "globule@~0.1.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gaze"
+ ]
+ ],
+ "_from": "globule@>=0.1.0 <0.2.0",
+ "_id": "globule@0.1.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/globule",
+ "_npmUser": {
+ "email": "cowboy@rj3.net",
+ "name": "cowboy"
+ },
+ "_npmVersion": "1.1.70",
+ "_phantomChildren": {
+ "minimatch": "0.2.14"
+ },
+ "_requested": {
+ "name": "globule",
+ "raw": "globule@~0.1.0",
+ "rawSpec": "~0.1.0",
+ "scope": null,
+ "spec": ">=0.1.0 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gaze"
+ ],
+ "_resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+ "_shasum": "d9c8edde1da79d125a151b79533b978676346ae5",
+ "_shrinkwrap": null,
+ "_spec": "globule@~0.1.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gaze",
+ "author": {
+ "name": "\"Cowboy\" Ben Alman",
+ "url": "http://benalman.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/cowboy/node-globule/issues"
+ },
+ "dependencies": {
+ "glob": "~3.1.21",
+ "lodash": "~1.0.1",
+ "minimatch": "~0.2.11"
+ },
+ "description": "An easy-to-use wildcard globbing library.",
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-contrib-jshint": "~0.1.1",
+ "grunt-contrib-nodeunit": "~0.1.2",
+ "grunt-contrib-watch": "~0.2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d9c8edde1da79d125a151b79533b978676346ae5",
+ "tarball": "http://registry.npmjs.org/globule/-/globule-0.1.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "homepage": "https://github.com/cowboy/node-globule",
+ "keywords": [
+ "awesome",
+ "expand",
+ "file",
+ "glob",
+ "mapping",
+ "match",
+ "pattern",
+ "sync",
+ "wildcard"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/cowboy/node-globule/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/globule",
+ "maintainers": [
+ {
+ "name": "cowboy",
+ "email": "cowboy@rj3.net"
+ }
+ ],
+ "name": "globule",
+ "optionalDependencies": {},
+ "readme": "# globule [](http://travis-ci.org/cowboy/node-globule)\n\nAn easy-to-use wildcard globbing library.\n\n## Getting Started\nInstall the module with: `npm install globule`\n\n```javascript\nvar globule = require('globule');\nvar filepaths = globule.find('**/*.js');\n```\n\n## Documentation\n\n### globule.find\nReturns a unique array of all file or directory paths that match the given globbing pattern(s). This method accepts either comma separated globbing patterns or an array of globbing patterns. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.\n\n```js\nglobule.find(patterns [, options])\n```\n\nThe `options` object supports all [glob][] library options, along with a few extras. These are the most commonly used:\n\n* `filter` Either a valid [fs.Stats method name](http://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats) or a function that will be passed the matched `src` filepath and `options` object as arguments. This function should return a `Boolean` value.\n* `nonull` Retain globbing patterns in result set even if they fail to match files.\n* `matchBase` Patterns without slashes will match just the basename part. Eg. this makes `*.js` work like `**/*.js`.\n* `srcBase` Patterns will be matched relative to the specified path instead of the current working directory. This is a synonym for `cwd`.\n* `prefixBase` Any specified `srcBase` will be prefixed to all returned filepaths.\n\n[glob]: https://github.com/isaacs/node-glob\n\n### globule.match\nMatch one or more globbing patterns against one or more file paths. Returns a uniqued array of all file paths that match any of the specified globbing patterns. Both the `patterns` and `filepaths` arguments can be a single string or array of strings. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.\n\n```js\ngrunt.file.match(patterns, filepaths [, options])\n```\n\n### globule.isMatch\nThis method contains the same signature and logic as the `globule.match` method, but returns `true` if any files were matched, otherwise `false`.\n\n```js\ngrunt.file.isMatch(patterns, filepaths [, options])\n```\n\n### globule.mapping\nGiven a set of source file paths, returns an array of src-dest file mapping objects. Both src and dest paths may be renamed, depending on the options specified.\n\n```js\nglobule.mapping(filepaths [, options])\n```\n\nIn addition to the options the `globule.find` method supports, the options object also supports these properties:\n\n* `srcBase` The directory from which patterns are matched. Any string specified as `srcBase` is effectively stripped from the beginning of all matched paths.\n* `destBase` The specified path is prefixed to all `dest` filepaths.\n* `ext` Remove anything after (and including) the first `.` in the destination path, then append this value.\n* `extDot` Change the behavior of `ext`, `\"first\"` and `\"last\"` will remove anything after the first or last `.` in the destination filename, respectively. Defaults to `\"first\"`.\n* `flatten` Remove the path component from all matched src files. The src file path is still joined to the specified destBase.\n* `rename` If specified, this function will be responsible for returning the final `dest` filepath. By default, it flattens paths (if specified), changes extensions (if specified) and joins the matched path to the `destBase`.\n\n### globule.findMapping\nThis method is a convenience wrapper around the `globule.find` and `globule.mapping` methods.\n\n```js\nglobule.findMapping(patterns [, options])\n```\n\n\n## Examples\n\nGiven the files `foo/a.js` and `foo/b.js`:\n\n### srcBase and destBase\n\n```js\nglobule.find(\"foo/*.js\")\n// [\"foo/a.js\", \"foo/b.js\"]\n\nglobule.find(\"*.js\", {srcBase: \"foo\"})\n// [\"a.js\", \"b.js\"]\n\nglobule.find(\"*.js\", {srcBase: \"foo\", prefixBase: true})\n// [\"foo/a.js\", \"foo/b.js\"]\n```\n\n```js\nglobule.findMapping(\"foo/*.js\")\n// [{src: \"foo/a.js\", dest: \"foo/a.js\"}, {src: \"foo/b.js\", dest: \"foo/b.js\"}]\n\nglobule.findMapping(\"foo/*.js\", {destBase: \"bar\"})\n// [{src: \"foo/a.js\", dest: \"bar/foo/a.js\"}, {src: \"foo/b.js\", dest: \"bar/foo/b.js\"}]\n\nglobule.findMapping(\"*.js\", {srcBase: \"foo\", destBase: \"bar\"})\n// [{src: \"foo/a.js\", dest: \"bar/a.js\"}, {src: \"foo/b.js\", dest: \"bar/b.js\"}]\n```\n\n```js\nglobule.mapping([\"foo/a.js\", \"foo/b.js\"])\n// [{src: \"foo/a.js\", dest: \"foo/a.js\"}, {src: \"foo/b.js\", dest: \"foo/b.js\"}]\n\nglobule.mapping([\"foo/a.js\", \"foo/b.js\"], {destBase: \"bar\"})\n// [{src: \"foo/a.js\", dest: \"bar/foo/a.js\"}, {src: \"foo/b.js\", dest: \"bar/foo/b.js\"}]\n\nglobule.mapping([\"a.js\", \"b.js\"], {srcBase: \"foo\", destBase: \"bar\"})\n// [{src: \"foo/a.js\", dest: \"bar/a.js\"}, {src: \"foo/b.js\", dest: \"bar/b.js\"}]\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n_(Nothing yet)_\n\n## License\nCopyright (c) 2013 \"Cowboy\" Ben Alman \nLicensed under the MIT license.\n",
+ "readmeFilename": "README.md",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/cowboy/node-globule.git"
+ },
+ "scripts": {
+ "test": "grunt nodeunit"
+ },
+ "version": "0.1.0"
+}
diff --git a/source/node_modules/globule/test/fixtures/expand/README.md b/source/node_modules/globule/test/fixtures/expand/README.md
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/css/baz.css b/source/node_modules/globule/test/fixtures/expand/css/baz.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/css/qux.css b/source/node_modules/globule/test/fixtures/expand/css/qux.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/deep/deep.txt b/source/node_modules/globule/test/fixtures/expand/deep/deep.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt b/source/node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt b/source/node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/js/bar.js b/source/node_modules/globule/test/fixtures/expand/js/bar.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/fixtures/expand/js/foo.js b/source/node_modules/globule/test/fixtures/expand/js/foo.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/node_modules/globule/test/globule_test.js b/source/node_modules/globule/test/globule_test.js
new file mode 100644
index 000000000..9b55b6b93
--- /dev/null
+++ b/source/node_modules/globule/test/globule_test.js
@@ -0,0 +1,486 @@
+'use strict';
+
+var path = require('path');
+
+var globule = require('../lib/globule.js');
+
+/*
+ ======== A Handy Little Nodeunit Reference ========
+ https://github.com/caolan/nodeunit
+
+ Test methods:
+ test.expect(numAssertions)
+ test.done()
+ Test assertions:
+ test.ok(value, [message])
+ test.equal(actual, expected, [message])
+ test.notEqual(actual, expected, [message])
+ test.deepEqual(actual, expected, [message])
+ test.notDeepEqual(actual, expected, [message])
+ test.strictEqual(actual, expected, [message])
+ test.notStrictEqual(actual, expected, [message])
+ test.throws(block, [error], [message])
+ test.doesNotThrow(block, [error], [message])
+ test.ifError(value)
+*/
+
+exports['match'] = {
+ 'empty set': function(test) {
+ test.expect(6);
+ // Should return empty set if a required argument is missing or an empty set.
+ test.deepEqual(globule.match(null, 'foo.js'), [], 'should return empty set.');
+ test.deepEqual(globule.match('*.js', null), [], 'should return empty set.');
+ test.deepEqual(globule.match([], 'foo.js'), [], 'should return empty set.');
+ test.deepEqual(globule.match('*.js', []), [], 'should return empty set.');
+ test.deepEqual(globule.match(null, ['foo.js']), [], 'should return empty set.');
+ test.deepEqual(globule.match(['*.js'], null), [], 'should return empty set.');
+ test.done();
+ },
+ 'basic matching': function(test) {
+ test.expect(6);
+ test.deepEqual(globule.match('*.js', 'foo.js'), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match('*.js', ['foo.js']), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match('*.js', ['foo.js', 'bar.css']), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match(['*.js', '*.css'], 'foo.js'), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match(['*.js', '*.css'], ['foo.js']), ['foo.js'], 'should match correctly.');
+ test.deepEqual(globule.match(['*.js', '*.css'], ['foo.js', 'bar.css']), ['foo.js', 'bar.css'], 'should match correctly.');
+ test.done();
+ },
+ 'no matches': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.match('*.js', 'foo.css'), [], 'should fail to match.');
+ test.deepEqual(globule.match('*.js', ['foo.css', 'bar.css']), [], 'should fail to match.');
+ test.done();
+ },
+ 'unique': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.match('*.js', ['foo.js', 'foo.js']), ['foo.js'], 'should return a uniqued set.');
+ test.deepEqual(globule.match(['*.js', '*.*'], ['foo.js', 'foo.js']), ['foo.js'], 'should return a uniqued set.');
+ test.done();
+ },
+ 'flatten': function(test) {
+ test.expect(1);
+ test.deepEqual(globule.match([['*.js', '*.css'], ['*.*', '*.js']], ['foo.js', 'bar.css']),
+ ['foo.js', 'bar.css'],
+ 'should process nested pattern arrays correctly.');
+ test.done();
+ },
+ 'exclusion': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.match(['!*.js'], ['foo.js', 'bar.js']), [], 'solitary exclusion should match nothing');
+ test.deepEqual(globule.match(['*.js', '!*.js'], ['foo.js', 'bar.js']), [], 'exclusion should cancel match');
+ test.deepEqual(globule.match(['*.js', '!f*.js'], ['foo.js', 'bar.js', 'baz.js']),
+ ['bar.js', 'baz.js'],
+ 'partial exclusion should partially cancel match');
+ test.deepEqual(globule.match(['*.js', '!*.js', 'b*.js'], ['foo.js', 'bar.js', 'baz.js']),
+ ['bar.js', 'baz.js'],
+ 'inclusion / exclusion order matters');
+ test.deepEqual(globule.match(['*.js', '!f*.js', '*.js'], ['foo.js', 'bar.js', 'baz.js']),
+ ['bar.js', 'baz.js', 'foo.js'],
+ 'inclusion / exclusion order matters');
+ test.done();
+ },
+ 'options.matchBase': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.match('*.js', ['foo.js', 'bar', 'baz/xyz.js'], {matchBase: true}),
+ ['foo.js', 'baz/xyz.js'],
+ 'should matchBase (minimatch) when specified.');
+ test.deepEqual(globule.match('*.js', ['foo.js', 'bar', 'baz/xyz.js']),
+ ['foo.js'],
+ 'should not matchBase (minimatch) by default.');
+ test.done();
+ },
+};
+
+exports['isMatch'] = {
+ 'basic matching': function(test) {
+ test.expect(6);
+ test.ok(globule.isMatch('*.js', 'foo.js'), 'should match correctly.');
+ test.ok(globule.isMatch('*.js', ['foo.js']), 'should match correctly.');
+ test.ok(globule.isMatch('*.js', ['foo.js', 'bar.css']), 'should match correctly.');
+ test.ok(globule.isMatch(['*.js', '*.css'], 'foo.js'), 'should match correctly.');
+ test.ok(globule.isMatch(['*.js', '*.css'], ['foo.js']), 'should match correctly.');
+ test.ok(globule.isMatch(['*.js', '*.css'], ['foo.js', 'bar.css']), 'should match correctly.');
+ test.done();
+ },
+ 'no matches': function(test) {
+ test.expect(6);
+ test.ok(!globule.isMatch('*.js', 'foo.css'), 'should fail to match.');
+ test.ok(!globule.isMatch('*.js', ['foo.css', 'bar.css']), 'should fail to match.');
+ test.ok(!globule.isMatch(null, 'foo.css'), 'should fail to match.');
+ test.ok(!globule.isMatch('*.js', null), 'should fail to match.');
+ test.ok(!globule.isMatch([], 'foo.css'), 'should fail to match.');
+ test.ok(!globule.isMatch('*.js', []), 'should fail to match.');
+ test.done();
+ },
+ 'options.matchBase': function(test) {
+ test.expect(2);
+ test.ok(globule.isMatch('*.js', ['baz/xyz.js'], {matchBase: true}), 'should matchBase (minimatch) when specified.');
+ test.ok(!globule.isMatch('*.js', ['baz/xyz.js']), 'should not matchBase (minimatch) by default.');
+ test.done();
+ },
+};
+
+exports['find'] = {
+ setUp: function(done) {
+ this.cwd = process.cwd();
+ process.chdir('test/fixtures/expand');
+ done();
+ },
+ tearDown: function(done) {
+ process.chdir(this.cwd);
+ done();
+ },
+ 'basic matching': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.find('**/*.js'), ['js/bar.js', 'js/foo.js'], 'single pattern argument should match.');
+ test.deepEqual(globule.find('**/*.js', '**/*.css'),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'multiple pattern arguments should match.');
+ test.deepEqual(globule.find(['**/*.js', '**/*.css']),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'array of patterns should match.');
+ test.deepEqual(globule.find([['**/*.js'], [['**/*.css', 'js/*.js']]]),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'array of arrays of patterns should be flattened.');
+ test.deepEqual(globule.find('*.xyz'), [], 'bad pattern should fail to match.');
+ test.done();
+ },
+ 'unique': function(test) {
+ test.expect(4);
+ test.deepEqual(globule.find('**/*.js', 'js/*.js'),
+ ['js/bar.js', 'js/foo.js'],
+ 'file list should be uniqed.');
+ test.deepEqual(globule.find('**/*.js', '**/*.css', 'js/*.js'), ['js/bar.js', 'js/foo.js',
+ 'css/baz.css', 'css/qux.css'],
+ 'file list should be uniqed.');
+ test.deepEqual(globule.find('js', 'js/'),
+ ['js', 'js/'],
+ 'mixed non-ending-/ and ending-/ dirs will not be uniqed by default.');
+ test.deepEqual(globule.find('js', 'js/', {mark: true}),
+ ['js/'],
+ 'mixed non-ending-/ and ending-/ dirs will be uniqed when "mark" is specified.');
+ test.done();
+ },
+ 'file order': function(test) {
+ test.expect(5);
+ var actual = globule.find('**/*.{js,css}');
+ var expected = ['css/baz.css', 'css/qux.css', 'js/bar.js', 'js/foo.js'];
+ test.deepEqual(actual, expected, 'should select 4 files in this order, by default.');
+
+ actual = globule.find('js/foo.js', 'js/bar.js', '**/*.{js,css}');
+ expected = ['js/foo.js', 'js/bar.js', 'css/baz.css', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'specifically-specified-up-front file order should be maintained.');
+
+ actual = globule.find('js/bar.js', 'js/foo.js', '**/*.{js,css}');
+ expected = ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'specifically-specified-up-front file order should be maintained.');
+
+ actual = globule.find('**/*.{js,css}', '!css/qux.css', 'css/qux.css');
+ expected = ['css/baz.css', 'js/bar.js', 'js/foo.js', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'if a file is excluded and then re-added, it should be added at the end.');
+
+ actual = globule.find('js/foo.js', '**/*.{js,css}', '!css/qux.css', 'css/qux.css');
+ expected = ['js/foo.js', 'css/baz.css', 'js/bar.js', 'css/qux.css'];
+ test.deepEqual(actual, expected, 'should be able to combine specified-up-front and excluded/added-at-end.');
+ test.done();
+ },
+ 'exclusion': function(test) {
+ test.expect(8);
+ test.deepEqual(globule.find(['!js/*.js']), [], 'solitary exclusion should match nothing');
+ test.deepEqual(globule.find(['js/bar.js','!js/bar.js']), [], 'exclusion should negate match');
+ test.deepEqual(globule.find(['**/*.js', '!js/foo.js']),
+ ['js/bar.js'],
+ 'should omit single file from matched set');
+ test.deepEqual(globule.find(['!js/foo.js', '**/*.js']),
+ ['js/bar.js', 'js/foo.js'],
+ 'inclusion / exclusion order matters');
+ test.deepEqual(globule.find(['**/*.js', '**/*.css', '!js/bar.js', '!css/baz.css']),
+ ['js/foo.js','css/qux.css'],
+ 'multiple exclusions should be removed from the set');
+ test.deepEqual(globule.find(['**/*.js', '**/*.css', '!**/*.css']),
+ ['js/bar.js', 'js/foo.js'],
+ 'excluded wildcards should be removed from the matched set');
+ test.deepEqual(globule.find(['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css', '!**/b*.*']),
+ ['js/foo.js', 'css/qux.css'],
+ 'different pattern for exclusion should still work');
+ test.deepEqual(globule.find(['js/bar.js', '!**/b*.*', 'js/foo.js', 'css/baz.css', 'css/qux.css']),
+ ['js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'inclusion / exclusion order matters');
+ test.done();
+ },
+ 'options.mark': function(test) {
+ test.expect(4);
+ test.deepEqual(globule.find('**d*/**'), [
+ 'deep',
+ 'deep/deep.txt',
+ 'deep/deeper',
+ 'deep/deeper/deeper.txt',
+ 'deep/deeper/deepest',
+ 'deep/deeper/deepest/deepest.txt'], 'should match files and directories.');
+ test.deepEqual(globule.find('**d*/**/'), [
+ 'deep/',
+ 'deep/deeper/',
+ 'deep/deeper/deepest/'], 'trailing / in pattern should match directories only, matches end in /.');
+ test.deepEqual(globule.find('**d*/**', {mark: true}), [
+ 'deep/',
+ 'deep/deep.txt',
+ 'deep/deeper/',
+ 'deep/deeper/deeper.txt',
+ 'deep/deeper/deepest/',
+ 'deep/deeper/deepest/deepest.txt'], 'the minimatch "mark" option ensures directories end in /.');
+ test.deepEqual(globule.find('**d*/**/', {mark: true}), [
+ 'deep/',
+ 'deep/deeper/',
+ 'deep/deeper/deepest/'], 'the minimatch "mark" option should not remove trailing / from matched paths.');
+ test.done();
+ },
+ 'options.filter': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.find('**d*/**', {filter: 'isFile'}), [
+ 'deep/deep.txt',
+ 'deep/deeper/deeper.txt',
+ 'deep/deeper/deepest/deepest.txt'
+ ], 'should match files only.');
+ test.deepEqual(globule.find('**d*/**', {filter: 'isDirectory'}), [
+ 'deep',
+ 'deep/deeper',
+ 'deep/deeper/deepest'
+ ], 'should match directories only.');
+ test.deepEqual(globule.find('**', {
+ arbitraryProp: /deepest/,
+ filter: function(filepath, options) {
+ return options.arbitraryProp.test(filepath);
+ }
+ }), [
+ 'deep/deeper/deepest',
+ 'deep/deeper/deepest/deepest.txt',
+ ], 'should filter arbitrarily.');
+ test.deepEqual(globule.find('js', 'css', {filter: 'isFile'}), [], 'should fail to match.');
+ test.deepEqual(globule.find('**/*.js', {filter: 'isDirectory'}), [], 'should fail to match.');
+ test.done();
+ },
+ 'options.matchBase': function(test) {
+ test.expect(3);
+ test.deepEqual(globule.find('*.js'), [], 'should not matchBase (minimatch) by default.');
+ test.deepEqual(globule.find('*.js', {matchBase: true}),
+ ['js/bar.js', 'js/foo.js'],
+ 'matchBase option should be passed through to minimatch.');
+ test.deepEqual(globule.find('*.js', '*.css', {matchBase: true}),
+ ['js/bar.js', 'js/foo.js', 'css/baz.css', 'css/qux.css'],
+ 'matchBase option should be passed through to minimatch.');
+ test.done();
+ },
+ 'options.srcBase': function(test) {
+ test.expect(5);
+ test.deepEqual(globule.find(['**/deep*.txt'], {srcBase: 'deep'}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'should find paths matching pattern relative to srcBase.');
+ test.deepEqual(globule.find(['**/deep*.txt'], {cwd: 'deep'}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'cwd and srcBase should do the same thing.');
+ test.deepEqual(globule.find(['**/deep*'], {srcBase: 'deep', filter: 'isFile'}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'srcBase should not prevent filtering.');
+ test.deepEqual(globule.find(['**/deep*'], {srcBase: 'deep', filter: 'isDirectory'}),
+ ['deeper', 'deeper/deepest'],
+ 'srcBase should not prevent filtering.');
+ test.deepEqual(globule.find(['**/deep*.txt', '!**/deeper**'], {srcBase: 'deep'}),
+ ['deep.txt', 'deeper/deepest/deepest.txt'],
+ 'srcBase should not prevent exclusions.');
+ test.done();
+ },
+ 'options.prefixBase': function(test) {
+ test.expect(2);
+ test.deepEqual(globule.find(['**/deep*.txt'], {srcBase: 'deep', prefixBase: false}),
+ ['deep.txt', 'deeper/deeper.txt', 'deeper/deepest/deepest.txt'],
+ 'should not prefix srcBase to returned paths.');
+ test.deepEqual(globule.find(['**/deep*.txt'], {srcBase: 'deep', prefixBase: true}),
+ ['deep/deep.txt', 'deep/deeper/deeper.txt', 'deep/deeper/deepest/deepest.txt'],
+ 'should prefix srcBase to returned paths.');
+ test.done();
+ },
+ 'options.nonull': function(test) {
+ test.expect(3);
+ test.deepEqual(globule.find(['*omg*'], {nonull: true}),
+ ['*omg*'],
+ 'non-matching patterns should be returned in result set.');
+ test.deepEqual(globule.find(['js/a*', 'js/b*', 'js/c*'], {nonull: true}),
+ ['js/a*', 'js/bar.js', 'js/c*'],
+ 'non-matching patterns should be returned in result set.');
+ test.deepEqual(globule.find(['js/foo.js', 'js/bar.js', 'js/nonexistent.js'], {nonull: true}),
+ ['js/foo.js', 'js/bar.js', 'js/nonexistent.js'],
+ 'non-matching filenames should be returned in result set.');
+ test.done();
+ },
+};
+
+exports['mapping'] = {
+ 'basic mapping': function(test) {
+ test.expect(1);
+
+ var actual = globule.mapping(['a.txt', 'b.txt', 'c.txt']);
+ var expected = [
+ {dest: 'a.txt', src: ['a.txt']},
+ {dest: 'b.txt', src: ['b.txt']},
+ {dest: 'c.txt', src: ['c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'default options should create same-to-same src-dest mappings.');
+
+ test.done();
+ },
+ 'options.srcBase': function(test) {
+ test.expect(2);
+ var actual, expected;
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {srcBase: 'foo'});
+ expected = [
+ {dest: 'a.txt', src: ['foo/a.txt']},
+ {dest: 'bar/b.txt', src: ['foo/bar/b.txt']},
+ {dest: 'bar/baz/c.txt', src: ['foo/bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'srcBase should be prefixed to src paths (no trailing /).');
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {srcBase: 'foo/'});
+ test.deepEqual(actual, expected, 'srcBase should be prefixed to src paths (trailing /).');
+
+ test.done();
+ },
+ 'options.destBase': function(test) {
+ test.expect(2);
+ var actual, expected;
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {destBase: 'dest'});
+ expected = [
+ {dest: 'dest/a.txt', src: ['a.txt']},
+ {dest: 'dest/bar/b.txt', src: ['bar/b.txt']},
+ {dest: 'dest/bar/baz/c.txt', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'destBase should be prefixed to dest paths (no trailing /).');
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {destBase: 'dest/'});
+ test.deepEqual(actual, expected, 'destBase should be prefixed to dest paths (trailing /).');
+
+ test.done();
+ },
+ 'options.flatten': function(test) {
+ test.expect(1);
+ var actual, expected;
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {flatten: true});
+ expected = [
+ {dest: 'a.txt', src: ['a.txt']},
+ {dest: 'b.txt', src: ['bar/b.txt']},
+ {dest: 'c.txt', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'flatten should remove all src path parts from dest.');
+
+ test.done();
+ },
+ 'options.flatten + options.destBase': function(test) {
+ test.expect(1);
+ var actual, expected;
+
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {destBase: 'dest', flatten: true});
+ expected = [
+ {dest: 'dest/a.txt', src: ['a.txt']},
+ {dest: 'dest/b.txt', src: ['bar/b.txt']},
+ {dest: 'dest/c.txt', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'flatten and destBase should work together.');
+
+ test.done();
+ },
+ 'options.ext': function(test) {
+ test.expect(1);
+ var actual, expected;
+
+ actual = globule.mapping(['x/a.js', 'x.y/b.min.js', 'x.y/z.z/c'], {ext: '.foo'});
+ expected = [
+ {dest: 'x/a.foo', src: ['x/a.js']},
+ {dest: 'x.y/b.foo', src: ['x.y/b.min.js']},
+ {dest: 'x.y/z.z/c.foo', src: ['x.y/z.z/c']},
+ ];
+ test.deepEqual(actual, expected, 'by default, ext should replace everything after the first dot in the filename.');
+
+ test.done();
+ },
+ 'options.extDot': function(test) {
+ test.expect(2);
+ var actual, expected;
+
+ actual = globule.mapping(['x/a.js', 'x.y/b.bbb.min.js', 'x.y/z.z/c'], {ext: '.foo', extDot: 'first'});
+ expected = [
+ {dest: 'x/a.foo', src: ['x/a.js']},
+ {dest: 'x.y/b.foo', src: ['x.y/b.bbb.min.js']},
+ {dest: 'x.y/z.z/c.foo', src: ['x.y/z.z/c']},
+ ];
+ test.deepEqual(actual, expected, 'extDot of "first" should replace everything after the first dot in the filename.');
+
+ actual = globule.mapping(['x/a.js', 'x.y/b.bbb.min.js', 'x.y/z.z/c'], {ext: '.foo', extDot: 'last'});
+ expected = [
+ {dest: 'x/a.foo', src: ['x/a.js']},
+ {dest: 'x.y/b.bbb.min.foo', src: ['x.y/b.bbb.min.js']},
+ {dest: 'x.y/z.z/c.foo', src: ['x.y/z.z/c']},
+ ];
+ test.deepEqual(actual, expected, 'extDot of "last" should replace everything after the last dot in the filename.');
+
+ test.done();
+ },
+ 'options.rename': function(test) {
+ test.expect(1);
+ var actual, expected;
+ actual = globule.mapping(['a.txt', 'bar/b.txt', 'bar/baz/c.txt'], {
+ arbitraryProp: 'FOO',
+ rename: function(dest, options) {
+ return path.join(options.arbitraryProp, dest.toUpperCase());
+ }
+ });
+ expected = [
+ {dest: 'FOO/A.TXT', src: ['a.txt']},
+ {dest: 'FOO/BAR/B.TXT', src: ['bar/b.txt']},
+ {dest: 'FOO/BAR/BAZ/C.TXT', src: ['bar/baz/c.txt']},
+ ];
+ test.deepEqual(actual, expected, 'allow arbitrary renaming of files.');
+
+ test.done();
+ },
+};
+
+exports['findMapping'] = {
+ setUp: function(done) {
+ this.cwd = process.cwd();
+ process.chdir('test/fixtures');
+ done();
+ },
+ tearDown: function(done) {
+ process.chdir(this.cwd);
+ done();
+ },
+ 'basic matching': function(test) {
+ test.expect(2);
+
+ var actual = globule.findMapping(['expand/**/*.txt']);
+ var expected = [
+ {dest: 'expand/deep/deep.txt', src: ['expand/deep/deep.txt']},
+ {dest: 'expand/deep/deeper/deeper.txt', src: ['expand/deep/deeper/deeper.txt']},
+ {dest: 'expand/deep/deeper/deepest/deepest.txt', src: ['expand/deep/deeper/deepest/deepest.txt']},
+ ];
+ test.deepEqual(actual, expected, 'default options');
+
+ expected = globule.mapping(globule.find(['expand/**/*.txt']));
+ test.deepEqual(actual, expected, 'this is what it\'s doing under the hood, anwyays.');
+
+ test.done();
+ },
+ 'options.srcBase': function(test) {
+ test.expect(1);
+ var actual = globule.findMapping(['**/*.txt'], {destBase: 'dest', srcBase: 'expand/deep'});
+ var expected = [
+ {dest: 'dest/deep.txt', src: ['expand/deep/deep.txt']},
+ {dest: 'dest/deeper/deeper.txt', src: ['expand/deep/deeper/deeper.txt']},
+ {dest: 'dest/deeper/deepest/deepest.txt', src: ['expand/deep/deeper/deepest/deepest.txt']},
+ ];
+ test.deepEqual(actual, expected, 'srcBase should be stripped from front of destPath, pre-destBase+destPath join');
+ test.done();
+ },
+};
diff --git a/source/node_modules/glogg/LICENSE b/source/node_modules/glogg/LICENSE
new file mode 100644
index 000000000..2d92a2b7f
--- /dev/null
+++ b/source/node_modules/glogg/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Blaine Bublitz
+
+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.
+
diff --git a/source/node_modules/glogg/README.md b/source/node_modules/glogg/README.md
new file mode 100644
index 000000000..319f03e48
--- /dev/null
+++ b/source/node_modules/glogg/README.md
@@ -0,0 +1,92 @@
+# glogg
+
+[](https://travis-ci.org/undertakerjs/glogg)
+
+Global logging utility
+
+## Usage
+
+```js
+var getLogger = require('glogg');
+
+var logger = getLogger('my-namespace');
+
+// logs strings
+logger.debug('The MOST verbose!');
+logger.info('Some important info');
+logger.warn('All the warnings to you');
+logger.error('OH NO! SOMETHING HAPPENED!');
+
+// supports util.format!
+logger.info('%s style!', 'printf');
+
+// log anything
+logger.debug({ my: 'obj' });
+logger.info([1, 2, 3]);
+
+// somewhere else
+logger.on('info', function(msg){
+ // do something with msg
+});
+
+// must be handled to avoid crashing process
+logger.on('error', function(msg){
+ // now it won't crash
+});
+```
+
+## API
+
+__Note: This module makes no assumptions about the log levels and they will always
+be emitted. If you are looking to filter some out, your listeners will need to have
+extra logic.__
+
+### getLogger([namespace])
+
+Create a new logger at the given namespace (or the default if no namespace is provided).
+Returns an augmented [`sparkles`](https://github.com/phated/sparkles) EventEmitter object
+with 4 methods: `debug()`, `info()`, `warn()` and `error()`. When called, these methods emit
+an event with the same name. If the first argument is a string, the arguments
+are passed through node's `util.format()` before being emitted. Other parts
+of a node program can get the logger by namespace and listen for the events to
+be emitted.
+
+#### logger.debug(msg)
+
+Emits a `debug` event with the given `msg`.
+
+If the first argument is a string, all arguments are passed to node's
+`util.format()` before being emitted.
+
+#### logger.info(msg)
+
+Emits a `info` event with the given `msg`.
+
+If the first argument is a string, all arguments are passed to node's
+`util.format()` before being emitted.
+
+#### logger.warn(msg)
+
+Emits a `warn` event with the given `msg`.
+
+If the first argument is a string, all arguments are passed to node's
+`util.format()` before being emitted.
+
+#### logger.error(msg)
+
+Emits a `error` event with the given `msg`.
+
+If the first argument is a string, all arguments are passed to node's
+`util.format()` before being emitted.
+
+__Note: You must handle this event in some way or the node process will crash
+when an `error` event is emitted.__
+
+#### logger.on(event, fn)
+
+Standard API from node's `EventEmitter`. Use this to listen for events from
+the logger methods.
+
+## License
+
+MIT
diff --git a/source/node_modules/glogg/index.js b/source/node_modules/glogg/index.js
new file mode 100644
index 000000000..9d0b16d7e
--- /dev/null
+++ b/source/node_modules/glogg/index.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var format = require('util').format;
+
+var sparkles = require('sparkles');
+
+var levels = [
+ 'debug',
+ 'info',
+ 'warn',
+ 'error'
+];
+
+function getLogger(namespace){
+ var logger = sparkles(namespace);
+
+ levels.forEach(function(level){
+ logger[level] = makeLogLevel(level);
+ });
+
+ return logger;
+}
+
+function makeLogLevel(level){
+ return function(msg){
+ if(typeof msg === 'string'){
+ msg = format.apply(null, arguments);
+ }
+
+ this.emit(level, msg);
+ };
+}
+
+module.exports = getLogger;
diff --git a/source/node_modules/glogg/package.json b/source/node_modules/glogg/package.json
new file mode 100644
index 000000000..7701ed3a4
--- /dev/null
+++ b/source/node_modules/glogg/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ "glogg@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulplog"
+ ]
+ ],
+ "_from": "glogg@>=1.0.0 <2.0.0",
+ "_id": "glogg@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/glogg",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "email": "blaine@iceddev.com",
+ "name": "phated"
+ },
+ "_npmVersion": "2.8.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "glogg",
+ "raw": "glogg@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulplog"
+ ],
+ "_resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz",
+ "_shasum": "7fe0f199f57ac906cf512feead8f90ee4a284fc5",
+ "_shrinkwrap": null,
+ "_spec": "glogg@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulplog",
+ "author": {
+ "email": "blaine@iceddev.com",
+ "name": "Blaine Bublitz",
+ "url": "http://iceddev.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/undertakerjs/glogg/issues"
+ },
+ "contributors": [],
+ "dependencies": {
+ "sparkles": "^1.0.0"
+ },
+ "description": "Global logging utility",
+ "devDependencies": {
+ "@phated/eslint-config-iceddev": "^0.2.1",
+ "code": "^1.5.0",
+ "eslint": "^1.3.1",
+ "eslint-plugin-mocha": "^0.5.1",
+ "eslint-plugin-react": "^3.3.2",
+ "lab": "^5.16.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "7fe0f199f57ac906cf512feead8f90ee4a284fc5",
+ "tarball": "http://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "gitHead": "2683314c5bb5473e0d492418974b111f366168db",
+ "homepage": "https://github.com/undertakerjs/glogg#readme",
+ "keywords": [
+ "global",
+ "log",
+ "logger",
+ "logging",
+ "shared"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "name": "glogg",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/undertakerjs/glogg.git"
+ },
+ "scripts": {
+ "test": "lab -cvL --globals store@sparkles"
+ },
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/graceful-fs/LICENSE b/source/node_modules/graceful-fs/LICENSE
new file mode 100644
index 000000000..9d2c80369
--- /dev/null
+++ b/source/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/graceful-fs/README.md b/source/node_modules/graceful-fs/README.md
new file mode 100644
index 000000000..d920aaac9
--- /dev/null
+++ b/source/node_modules/graceful-fs/README.md
@@ -0,0 +1,53 @@
+# graceful-fs
+
+graceful-fs functions as a drop-in replacement for the fs module,
+making various improvements.
+
+The improvements are meant to normalize behavior across different
+platforms and environments, and to make filesystem access more
+resilient to errors.
+
+## Improvements over [fs module](http://api.nodejs.org/fs.html)
+
+graceful-fs:
+
+* Queues up `open` and `readdir` calls, and retries them once
+ something closes if there is an EMFILE error from too many file
+ descriptors.
+* fixes `lchmod` for Node versions prior to 0.6.2.
+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
+ `lchown` if the user isn't root.
+* makes `lchmod` and `lchown` become noops, if not available.
+* retries reading a file if `read` results in EAGAIN error.
+
+On Windows, it retries renaming a file for up to one second if `EACCESS`
+or `EPERM` error occurs, likely because antivirus software has locked
+the directory.
+
+## USAGE
+
+```javascript
+// use just like fs
+var fs = require('graceful-fs')
+
+// now go and do stuff with it...
+fs.readFileSync('some-file-or-whatever')
+```
+
+## Global Patching
+
+If you want to patch the global fs module (or any other fs-like
+module) you can do this:
+
+```javascript
+// Make sure to read the caveat below.
+var realFs = require('fs')
+var gracefulFs = require('graceful-fs')
+gracefulFs.gracefulify(realFs)
+```
+
+This should only ever be done at the top-level application layer, in
+order to delay on EMFILE errors from any fs-using dependencies. You
+should **not** do this in a library, because it can cause unexpected
+delays in other parts of the program.
diff --git a/source/node_modules/graceful-fs/fs.js b/source/node_modules/graceful-fs/fs.js
new file mode 100644
index 000000000..8ad4a3839
--- /dev/null
+++ b/source/node_modules/graceful-fs/fs.js
@@ -0,0 +1,21 @@
+'use strict'
+
+var fs = require('fs')
+
+module.exports = clone(fs)
+
+function clone (obj) {
+ if (obj === null || typeof obj !== 'object')
+ return obj
+
+ if (obj instanceof Object)
+ var copy = { __proto__: obj.__proto__ }
+ else
+ var copy = Object.create(null)
+
+ Object.getOwnPropertyNames(obj).forEach(function (key) {
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
+ })
+
+ return copy
+}
diff --git a/source/node_modules/graceful-fs/graceful-fs.js b/source/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 000000000..9bf803e68
--- /dev/null
+++ b/source/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,253 @@
+var fs = require('fs')
+var polyfills = require('./polyfills.js')
+var legacy = require('./legacy-streams.js')
+var queue = []
+
+var util = require('util')
+
+function noop () {}
+
+var debug = noop
+if (util.debuglog)
+ debug = util.debuglog('gfs4')
+else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
+ debug = function() {
+ var m = util.format.apply(util, arguments)
+ m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
+ console.error(m)
+ }
+
+if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
+ process.on('exit', function() {
+ debug(queue)
+ require('assert').equal(queue.length, 0)
+ })
+}
+
+module.exports = patch(require('./fs.js'))
+if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) {
+ module.exports = patch(fs)
+}
+
+// Always patch fs.close/closeSync, because we want to
+// retry() whenever a close happens *anywhere* in the program.
+// This is essential when multiple graceful-fs instances are
+// in play at the same time.
+module.exports.close =
+fs.close = (function (fs$close) { return function (fd, cb) {
+ return fs$close.call(fs, fd, function (err) {
+ if (!err)
+ retry()
+
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ })
+}})(fs.close)
+
+module.exports.closeSync =
+fs.closeSync = (function (fs$closeSync) { return function (fd) {
+ // Note that graceful-fs also retries when fs.closeSync() fails.
+ // Looks like a bug to me, although it's probably a harmless one.
+ var rval = fs$closeSync.apply(fs, arguments)
+ retry()
+ return rval
+}})(fs.closeSync)
+
+function patch (fs) {
+ // Everything that references the open() function needs to be in here
+ polyfills(fs)
+ fs.gracefulify = patch
+ fs.FileReadStream = ReadStream; // Legacy name.
+ fs.FileWriteStream = WriteStream; // Legacy name.
+ fs.createReadStream = createReadStream
+ fs.createWriteStream = createWriteStream
+ var fs$readFile = fs.readFile
+ fs.readFile = readFile
+ function readFile (path, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$readFile(path, options, cb)
+
+ function go$readFile (path, options, cb) {
+ return fs$readFile(path, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readFile, [path, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$writeFile = fs.writeFile
+ fs.writeFile = writeFile
+ function writeFile (path, data, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$writeFile(path, data, options, cb)
+
+ function go$writeFile (path, data, options, cb) {
+ return fs$writeFile(path, data, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$writeFile, [path, data, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$appendFile = fs.appendFile
+ if (fs$appendFile)
+ fs.appendFile = appendFile
+ function appendFile (path, data, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$appendFile(path, data, options, cb)
+
+ function go$appendFile (path, data, options, cb) {
+ return fs$appendFile(path, data, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$appendFile, [path, data, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$readdir = fs.readdir
+ fs.readdir = readdir
+ function readdir (path, cb) {
+ return go$readdir(path, cb)
+
+ function go$readdir () {
+ return fs$readdir(path, function (err, files) {
+ if (files && files.sort)
+ files.sort(); // Backwards compatibility with graceful-fs.
+
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readdir, [path, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+
+ if (process.version.substr(0, 4) === 'v0.8') {
+ var legStreams = legacy(fs)
+ ReadStream = legStreams.ReadStream
+ WriteStream = legStreams.WriteStream
+ }
+
+ var fs$ReadStream = fs.ReadStream
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype)
+ ReadStream.prototype.open = ReadStream$open
+
+ var fs$WriteStream = fs.WriteStream
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype)
+ WriteStream.prototype.open = WriteStream$open
+
+ fs.ReadStream = ReadStream
+ fs.WriteStream = WriteStream
+
+ function ReadStream (path, options) {
+ if (this instanceof ReadStream)
+ return fs$ReadStream.apply(this, arguments), this
+ else
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
+ }
+
+ function ReadStream$open () {
+ var that = this
+ open(that.path, that.flags, that.mode, function (err, fd) {
+ if (err) {
+ if (that.autoClose)
+ that.destroy()
+
+ that.emit('error', err)
+ } else {
+ that.fd = fd
+ that.emit('open', fd)
+ that.read()
+ }
+ })
+ }
+
+ function WriteStream (path, options) {
+ if (this instanceof WriteStream)
+ return fs$WriteStream.apply(this, arguments), this
+ else
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
+ }
+
+ function WriteStream$open () {
+ var that = this
+ open(that.path, that.flags, that.mode, function (err, fd) {
+ if (err) {
+ that.destroy()
+ that.emit('error', err)
+ } else {
+ that.fd = fd
+ that.emit('open', fd)
+ }
+ })
+ }
+
+ function createReadStream (path, options) {
+ return new ReadStream(path, options)
+ }
+
+ function createWriteStream (path, options) {
+ return new WriteStream(path, options)
+ }
+
+ var fs$open = fs.open
+ fs.open = open
+ function open (path, flags, mode, cb) {
+ if (typeof mode === 'function')
+ cb = mode, mode = null
+
+ return go$open(path, flags, mode, cb)
+
+ function go$open (path, flags, mode, cb) {
+ return fs$open(path, flags, mode, function (err, fd) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$open, [path, flags, mode, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ return fs
+}
+
+function enqueue (elem) {
+ debug('ENQUEUE', elem[0].name, elem[1])
+ queue.push(elem)
+}
+
+function retry () {
+ var elem = queue.shift()
+ if (elem) {
+ debug('RETRY', elem[0].name, elem[1])
+ elem[0].apply(null, elem[1])
+ }
+}
diff --git a/source/node_modules/graceful-fs/legacy-streams.js b/source/node_modules/graceful-fs/legacy-streams.js
new file mode 100644
index 000000000..d617b50fc
--- /dev/null
+++ b/source/node_modules/graceful-fs/legacy-streams.js
@@ -0,0 +1,118 @@
+var Stream = require('stream').Stream
+
+module.exports = legacy
+
+function legacy (fs) {
+ return {
+ ReadStream: ReadStream,
+ WriteStream: WriteStream
+ }
+
+ function ReadStream (path, options) {
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
+
+ Stream.call(this);
+
+ var self = this;
+
+ this.path = path;
+ this.fd = null;
+ this.readable = true;
+ this.paused = false;
+
+ this.flags = 'r';
+ this.mode = 438; /*=0666*/
+ this.bufferSize = 64 * 1024;
+
+ options = options || {};
+
+ // Mixin options into this
+ var keys = Object.keys(options);
+ for (var index = 0, length = keys.length; index < length; index++) {
+ var key = keys[index];
+ this[key] = options[key];
+ }
+
+ if (this.encoding) this.setEncoding(this.encoding);
+
+ if (this.start !== undefined) {
+ if ('number' !== typeof this.start) {
+ throw TypeError('start must be a Number');
+ }
+ if (this.end === undefined) {
+ this.end = Infinity;
+ } else if ('number' !== typeof this.end) {
+ throw TypeError('end must be a Number');
+ }
+
+ if (this.start > this.end) {
+ throw new Error('start must be <= end');
+ }
+
+ this.pos = this.start;
+ }
+
+ if (this.fd !== null) {
+ process.nextTick(function() {
+ self._read();
+ });
+ return;
+ }
+
+ fs.open(this.path, this.flags, this.mode, function (err, fd) {
+ if (err) {
+ self.emit('error', err);
+ self.readable = false;
+ return;
+ }
+
+ self.fd = fd;
+ self.emit('open', fd);
+ self._read();
+ })
+ }
+
+ function WriteStream (path, options) {
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
+
+ Stream.call(this);
+
+ this.path = path;
+ this.fd = null;
+ this.writable = true;
+
+ this.flags = 'w';
+ this.encoding = 'binary';
+ this.mode = 438; /*=0666*/
+ this.bytesWritten = 0;
+
+ options = options || {};
+
+ // Mixin options into this
+ var keys = Object.keys(options);
+ for (var index = 0, length = keys.length; index < length; index++) {
+ var key = keys[index];
+ this[key] = options[key];
+ }
+
+ if (this.start !== undefined) {
+ if ('number' !== typeof this.start) {
+ throw TypeError('start must be a Number');
+ }
+ if (this.start < 0) {
+ throw new Error('start must be >= zero');
+ }
+
+ this.pos = this.start;
+ }
+
+ this.busy = false;
+ this._queue = [];
+
+ if (this.fd === null) {
+ this._open = fs.open;
+ this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
+ this.flush();
+ }
+ }
+}
diff --git a/source/node_modules/graceful-fs/package.json b/source/node_modules/graceful-fs/package.json
new file mode 100644
index 000000000..2addcbb7d
--- /dev/null
+++ b/source/node_modules/graceful-fs/package.json
@@ -0,0 +1,106 @@
+{
+ "_args": [
+ [
+ "graceful-fs@^4.1.2",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/load-json-file"
+ ]
+ ],
+ "_from": "graceful-fs@>=4.1.2 <5.0.0",
+ "_id": "graceful-fs@4.1.3",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/graceful-fs",
+ "_nodeVersion": "4.0.0",
+ "_npmOperationalInternal": {
+ "host": "packages-6-west.internal.npmjs.com",
+ "tmp": "tmp/graceful-fs-4.1.3.tgz_1454449326495_0.943017533281818"
+ },
+ "_npmUser": {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ "_npmVersion": "3.7.0",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "graceful-fs",
+ "raw": "graceful-fs@^4.1.2",
+ "rawSpec": "^4.1.2",
+ "scope": null,
+ "spec": ">=4.1.2 <5.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/fstream",
+ "/load-json-file",
+ "/node-gyp",
+ "/path-type"
+ ],
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz",
+ "_shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c",
+ "_shrinkwrap": null,
+ "_spec": "graceful-fs@^4.1.2",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/load-json-file",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-graceful-fs/issues"
+ },
+ "dependencies": {},
+ "description": "A drop-in replacement for fs, making various improvements.",
+ "devDependencies": {
+ "mkdirp": "^0.5.0",
+ "rimraf": "^2.2.8",
+ "tap": "^5.4.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "dist": {
+ "shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c",
+ "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "files": [
+ "fs.js",
+ "graceful-fs.js",
+ "legacy-streams.js",
+ "polyfills.js"
+ ],
+ "gitHead": "694c56f3aed4aee62d6df169be123d3984f61b85",
+ "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
+ "keywords": [
+ "EACCESS",
+ "EAGAIN",
+ "EINVAL",
+ "EMFILE",
+ "EPERM",
+ "error",
+ "errors",
+ "fs",
+ "handling",
+ "module",
+ "queue",
+ "reading",
+ "retries",
+ "retry"
+ ],
+ "license": "ISC",
+ "main": "graceful-fs.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "name": "graceful-fs",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/node-graceful-fs.git"
+ },
+ "scripts": {
+ "test": "node test.js | tap -"
+ },
+ "version": "4.1.3"
+}
diff --git a/source/node_modules/graceful-fs/polyfills.js b/source/node_modules/graceful-fs/polyfills.js
new file mode 100644
index 000000000..5e4f48046
--- /dev/null
+++ b/source/node_modules/graceful-fs/polyfills.js
@@ -0,0 +1,252 @@
+var fs = require('./fs.js')
+var constants = require('constants')
+
+var origCwd = process.cwd
+var cwd = null
+process.cwd = function() {
+ if (!cwd)
+ cwd = origCwd.call(process)
+ return cwd
+}
+try {
+ process.cwd()
+} catch (er) {}
+
+var chdir = process.chdir
+process.chdir = function(d) {
+ cwd = null
+ chdir.call(process, d)
+}
+
+module.exports = patch
+
+function patch (fs) {
+ // (re-)implement some things that are known busted or missing.
+
+ // lchmod, broken prior to 0.6.2
+ // back-port the fix here.
+ if (constants.hasOwnProperty('O_SYMLINK') &&
+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+ patchLchmod(fs)
+ }
+
+ // lutimes implementation, or no-op
+ if (!fs.lutimes) {
+ patchLutimes(fs)
+ }
+
+ // https://github.com/isaacs/node-graceful-fs/issues/4
+ // Chown should not fail on einval or eperm if non-root.
+ // It should not fail on enosys ever, as this just indicates
+ // that a fs doesn't support the intended operation.
+
+ fs.chown = chownFix(fs.chown)
+ fs.fchown = chownFix(fs.fchown)
+ fs.lchown = chownFix(fs.lchown)
+
+ fs.chmod = chownFix(fs.chmod)
+ fs.fchmod = chownFix(fs.fchmod)
+ fs.lchmod = chownFix(fs.lchmod)
+
+ fs.chownSync = chownFixSync(fs.chownSync)
+ fs.fchownSync = chownFixSync(fs.fchownSync)
+ fs.lchownSync = chownFixSync(fs.lchownSync)
+
+ fs.chmodSync = chownFix(fs.chmodSync)
+ fs.fchmodSync = chownFix(fs.fchmodSync)
+ fs.lchmodSync = chownFix(fs.lchmodSync)
+
+ // if lchmod/lchown do not exist, then make them no-ops
+ if (!fs.lchmod) {
+ fs.lchmod = function (path, mode, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchmodSync = function () {}
+ }
+ if (!fs.lchown) {
+ fs.lchown = function (path, uid, gid, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchownSync = function () {}
+ }
+
+ // on Windows, A/V software can lock the directory, causing this
+ // to fail with an EACCES or EPERM if the directory contains newly
+ // created files. Try again on failure, for up to 1 second.
+ if (process.platform === "win32") {
+ fs.rename = (function (fs$rename) { return function (from, to, cb) {
+ var start = Date.now()
+ fs$rename(from, to, function CB (er) {
+ if (er
+ && (er.code === "EACCES" || er.code === "EPERM")
+ && Date.now() - start < 1000) {
+ return fs$rename(from, to, CB)
+ }
+ if (cb) cb(er)
+ })
+ }})(fs.rename)
+ }
+
+ // if read() returns EAGAIN, then just try it again.
+ fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) {
+ var callback
+ if (callback_ && typeof callback_ === 'function') {
+ var eagCounter = 0
+ callback = function (er, _, __) {
+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+ callback_.apply(this, arguments)
+ }
+ }
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+ }})(fs.read)
+
+ fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
+ var eagCounter = 0
+ while (true) {
+ try {
+ return fs$readSync.call(fs, fd, buffer, offset, length, position)
+ } catch (er) {
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ continue
+ }
+ throw er
+ }
+ }
+ }})(fs.readSync)
+}
+
+function patchLchmod (fs) {
+ fs.lchmod = function (path, mode, callback) {
+ callback = callback || noop
+ fs.open( path
+ , constants.O_WRONLY | constants.O_SYMLINK
+ , mode
+ , function (err, fd) {
+ if (err) {
+ callback(err)
+ return
+ }
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ fs.fchmod(fd, mode, function (err) {
+ fs.close(fd, function(err2) {
+ callback(err || err2)
+ })
+ })
+ })
+ }
+
+ fs.lchmodSync = function (path, mode) {
+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ var threw = true
+ var ret
+ try {
+ ret = fs.fchmodSync(fd, mode)
+ threw = false
+ } finally {
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ } else {
+ fs.closeSync(fd)
+ }
+ }
+ return ret
+ }
+}
+
+function patchLutimes (fs) {
+ if (constants.hasOwnProperty("O_SYMLINK")) {
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
+ cb = cb || noop
+ if (er) return cb(er)
+ fs.futimes(fd, at, mt, function (er) {
+ fs.close(fd, function (er2) {
+ return cb(er || er2)
+ })
+ })
+ })
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ var fd = fs.openSync(path, constants.O_SYMLINK)
+ var ret
+ var threw = true
+ try {
+ ret = fs.futimesSync(fd, at, mt)
+ threw = false
+ } finally {
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ } else {
+ fs.closeSync(fd)
+ }
+ }
+ return ret
+ }
+
+ } else {
+ fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+ fs.lutimesSync = function () {}
+ }
+}
+
+function chownFix (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid, cb) {
+ return orig.call(fs, target, uid, gid, function (er, res) {
+ if (chownErOk(er)) er = null
+ cb(er, res)
+ })
+ }
+}
+
+function chownFixSync (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid) {
+ try {
+ return orig.call(fs, target, uid, gid)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+// ENOSYS means that the fs doesn't support the op. Just ignore
+// that, because it doesn't matter.
+//
+// if there's no getuid, or if getuid() is something other
+// than 0, and the error is EINVAL or EPERM, then just ignore
+// it.
+//
+// This specific case is a silent failure in cp, install, tar,
+// and most other unix tools that manage permissions.
+//
+// When running as root, or if other types of errors are
+// encountered, then it's strict.
+function chownErOk (er) {
+ if (!er)
+ return true
+
+ if (er.code === "ENOSYS")
+ return true
+
+ var nonroot = !process.getuid || process.getuid() !== 0
+ if (nonroot) {
+ if (er.code === "EINVAL" || er.code === "EPERM")
+ return true
+ }
+
+ return false
+}
diff --git a/source/node_modules/graceful-readlink/.npmignore b/source/node_modules/graceful-readlink/.npmignore
new file mode 100644
index 000000000..3ac7d16c6
--- /dev/null
+++ b/source/node_modules/graceful-readlink/.npmignore
@@ -0,0 +1,3 @@
+.idea/
+.DS_Store
+node_modules/
diff --git a/source/node_modules/graceful-readlink/.travis.yml b/source/node_modules/graceful-readlink/.travis.yml
new file mode 100644
index 000000000..baf9be7f6
--- /dev/null
+++ b/source/node_modules/graceful-readlink/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "io.js"
diff --git a/source/node_modules/graceful-readlink/LICENSE b/source/node_modules/graceful-readlink/LICENSE
new file mode 100644
index 000000000..d1f842f0b
--- /dev/null
+++ b/source/node_modules/graceful-readlink/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Zhiye Li
+
+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.
+
diff --git a/source/node_modules/graceful-readlink/README.md b/source/node_modules/graceful-readlink/README.md
new file mode 100644
index 000000000..fc63b505a
--- /dev/null
+++ b/source/node_modules/graceful-readlink/README.md
@@ -0,0 +1,17 @@
+# graceful-readlink
+[](https://www.npmjs.org/package/graceful-readlink)
+[](https://www.npmjs.org/package/graceful-readlink)
+
+
+## Usage
+
+```js
+var readlinkSync = require('graceful-readlink').readlinkSync;
+console.log(readlinkSync(f));
+// output
+// the file pointed to when `f` is a symbolic link
+// the `f` itself when `f` is not a symbolic link
+```
+## Licence
+
+MIT License
diff --git a/source/node_modules/graceful-readlink/index.js b/source/node_modules/graceful-readlink/index.js
new file mode 100644
index 000000000..7e9fc70f0
--- /dev/null
+++ b/source/node_modules/graceful-readlink/index.js
@@ -0,0 +1,12 @@
+var fs = require('fs')
+ , lstat = fs.lstatSync;
+
+exports.readlinkSync = function (p) {
+ if (lstat(p).isSymbolicLink()) {
+ return fs.readlinkSync(p);
+ } else {
+ return p;
+ }
+};
+
+
diff --git a/source/node_modules/graceful-readlink/package.json b/source/node_modules/graceful-readlink/package.json
new file mode 100644
index 000000000..be2121f93
--- /dev/null
+++ b/source/node_modules/graceful-readlink/package.json
@@ -0,0 +1,75 @@
+{
+ "_args": [
+ [
+ "graceful-readlink@>= 1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/commander"
+ ]
+ ],
+ "_from": "graceful-readlink@>=1.0.0",
+ "_id": "graceful-readlink@1.0.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/graceful-readlink",
+ "_nodeVersion": "0.11.14",
+ "_npmUser": {
+ "email": "zhiyelee@gmail.com",
+ "name": "zhiyelee"
+ },
+ "_npmVersion": "2.1.17",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "graceful-readlink",
+ "raw": "graceful-readlink@>= 1.0.0",
+ "rawSpec": ">= 1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/commander"
+ ],
+ "_resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
+ "_shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725",
+ "_shrinkwrap": null,
+ "_spec": "graceful-readlink@>= 1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/commander",
+ "author": {
+ "name": "zhiyelee"
+ },
+ "bugs": {
+ "url": "https://github.com/zhiyelee/graceful-readlink/issues"
+ },
+ "dependencies": {},
+ "description": "graceful fs.readlink",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725",
+ "tarball": "http://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
+ },
+ "gitHead": "f6655275bebef706fb63fd01b5f062a7052419a5",
+ "homepage": "https://github.com/zhiyelee/graceful-readlink",
+ "keywords": [
+ "fs.readlink",
+ "readlink"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "zhiyelee",
+ "email": "zhiyelee@gmail.com"
+ }
+ ],
+ "name": "graceful-readlink",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/zhiyelee/graceful-readlink.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.0.1"
+}
diff --git a/source/node_modules/gulp-sass/.editorconfig b/source/node_modules/gulp-sass/.editorconfig
new file mode 100644
index 000000000..c2cdfb8ad
--- /dev/null
+++ b/source/node_modules/gulp-sass/.editorconfig
@@ -0,0 +1,21 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/source/node_modules/gulp-sass/.eslintrc b/source/node_modules/gulp-sass/.eslintrc
new file mode 100644
index 000000000..3f8097025
--- /dev/null
+++ b/source/node_modules/gulp-sass/.eslintrc
@@ -0,0 +1,160 @@
+env:
+ mocha: true
+ node: true
+
+# globals:
+ #########################
+ ## Only add globals if you're absolutely certain they need to be globals
+ ##########################
+ # console: true
+
+#########################
+## set to 0 to allow
+## set to 1 to disallow as warning
+## set to 2 to disallow as error
+#########################
+rules:
+ #########################
+ ## Optional Rules
+ #########################
+ # Disallow use of `console`
+ no-console: 2
+
+ # Disallow warning comments
+ no-warning-comments:
+ - 1
+ - terms:
+ - todo
+ - fixme
+ location: anywhere
+
+ # Warns when variables are defined but never used
+ no-unused-vars: 1
+
+ # Enforces comma style (first or last)
+ comma-style:
+ - 2
+ - last
+
+ # Enforces one true `this` variable
+ consistent-this:
+ - 2
+ - self
+ # Allows dangling underscores in identifiers
+ no-underscore-dangle: 2
+
+ # Enforces function expressions to have a name
+ func-names: 0
+
+ # Set maximum depth of nested callbacks
+ max-nested-callbacks:
+ - 1
+ - 3
+
+ #########################
+ ## Core Rules
+ ##########################
+ # Enforces camel case names
+ camelcase: 2
+
+ # Prohibit use of == and != in favor of === and !==
+ eqeqeq: 2
+
+ # Suppresses warnings about == null comparisons
+ no-eq-null: 2
+
+ # No mixing tabs and spaces, with 2 spaces only
+ no-mixed-spaces-and-tabs: 2
+
+ # Prohibits use of a variable before it is defined
+ no-use-before-define: 2
+
+ # Requires capitalized names for constructor functions
+ new-cap: 2
+
+ # Prohibits use of explicitly undeclared variables
+ no-undef: 2
+
+ # Enforces Use Strict at the top of function scope
+ strict:
+ - 2
+ - global
+
+ # Requires variable declarations to be at the top
+ vars-on-top: 2
+
+ # Enforce curly braces around blocks in loops and conditionals
+ curly: 2
+
+ # Prohibits the use of immediate function invocations w/o wrapping in parentheses
+ wrap-iife: 2
+
+ # Prohibits `argument.caller` and `argument.callee`
+ no-caller: 2
+
+ # Requires all `for in` loops to filter object's items
+ guard-for-in: 2
+
+ # Prohibits comparing a variable against itself
+ no-self-compare: 2
+
+ # Prohibits use of `undefined` variable
+ no-undefined: 0
+
+ # Prohibits nested ternaries
+ no-nested-ternary: 2
+
+ # Enforces a space before blocks
+ space-before-blocks:
+ - 2
+ - always
+
+ # Enforces spaces following keywords
+ space-after-keywords:
+ - 2
+ - always
+
+ # Enforces quoted property names
+ quote-props:
+ - 2
+ - always
+
+ # Enforces padded blocks
+ padded-blocks:
+ - 1
+ - never
+
+ # Enforce functions as expressions
+ func-style:
+ - 2
+ - expression
+
+ # Require brace style
+ brace-style:
+ - 2
+ - stroustrup
+
+ # Prohibits Yoda conditions
+ yoda:
+ - 2
+ - never
+
+ # Enforce use of single quotation marks for strings.
+ quotes:
+ - 2
+ - single
+
+ # Disallow or enforce spaces inside of curly braces in objects.
+ object-curly-spacing:
+ - 2
+ - always
+
+ # Disallow or enforce spaces inside of brackets.
+ array-bracket-spacing:
+ - 2
+ - never
+
+ # Disallow or enforce spaces inside of computed properties.
+ computed-property-spacing:
+ - 2
+ - never
diff --git a/source/node_modules/gulp-sass/.npmignore b/source/node_modules/gulp-sass/.npmignore
new file mode 100644
index 000000000..9daeafb98
--- /dev/null
+++ b/source/node_modules/gulp-sass/.npmignore
@@ -0,0 +1 @@
+test
diff --git a/source/node_modules/gulp-sass/.travis.yml b/source/node_modules/gulp-sass/.travis.yml
new file mode 100644
index 000000000..52b912812
--- /dev/null
+++ b/source/node_modules/gulp-sass/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - node
+ - iojs
+sudo: false
diff --git a/source/node_modules/gulp-sass/CHANGELOG.md b/source/node_modules/gulp-sass/CHANGELOG.md
new file mode 100644
index 000000000..b65d4673a
--- /dev/null
+++ b/source/node_modules/gulp-sass/CHANGELOG.md
@@ -0,0 +1,65 @@
+# Gulp Sass Changelog
+
+## v2.1.0-beta
+**September 21, 2015**
+
+* **Change** :arrow_up: Bump to Node Sass 3.4.0-beta1
+
+## v2.0.4
+**July 15, 2015**
+
+* **Fix** Relative file path now uses `file.relative` instead of arcane `split('/').pop` magic. Resolves lots of issues with source map paths.
+
+* **Fix** Empty partials no longer copied to CSS folder
+
+## v2.0.3
+**June 27, 2015**
+
+* **Fix** Empty partials no longer copied to CSS folder
+
+## v2.0.2
+**June 25, 2015**
+
+* **Fix** Error in watch stream preventing watch from continuing
+
+## v2.0.1
+**May 13, 2015**
+
+* **Fix** Source maps now work as expected with Autoprefixer
+* **Fix** Current file directory `unshift` onto includePaths stack so it's checked first
+* **Fix** Error message returned is unformatted so as to not break other error handling (*i.e.* `gulp-notify`)
+
+## v2.0.0
+**May 6, 2015**
+
+* **Change** :arrow_up: Bump to Node Sass 3.0.0
+
+## v2.0.0-alpha.1
+**March 26, 2015**
+
+* **New** Added `renderSync` option that can be used through `sass.sync()`
+
+### March 24, 2015
+* **Change** Updated to `node-sass` 3.0.0-alpha.1
+* **New** Added support for `gulp-sourcemaps` including tests
+* **New** Added `.editorconfig` for development consistency
+* **New** Added linting and test for said linting
+* **Change** Updated the README
+* **New** `logError` function to make streaming errors possible instead of breaking the stream
+
+### 1.3.3
+
+* updated to node-sass 2.0 (final)
+* should now work with node 0.12 and io.js
+
+### 1.3.2
+
+* fixed errLogToConsole
+
+### 1.3.1
+
+* bug fix
+
+## Version 1.3.0
+
+* Supports node-sass 2.0 (thanks laurelnaiad!)
diff --git a/source/node_modules/gulp-sass/CONTRIBUTING.md b/source/node_modules/gulp-sass/CONTRIBUTING.md
new file mode 100644
index 000000000..b4649a1c5
--- /dev/null
+++ b/source/node_modules/gulp-sass/CONTRIBUTING.md
@@ -0,0 +1,63 @@
+# Contributing to Gulp Sass
+
+Gulp Sass is a very light-weight [Gulp](https://github.com/gulpjs/gulp) wrapper for [`node-sass`](https://github.com/sass/node-sass), which in turn is a Node binding for [`libsass`](https://github.com/sass/libsass), which in turn is a port of [`Sass`](https://github.com/sass/sass).
+
+## Submitting Issues
+
+* Before creating a new issue, perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=repo%3Adlmanning%2Fgulp-sass+repo%3Asass%2Fnode-sass+repo%3Asass%2Flibsass+repo%3Asass%2Fsass+repo%3Asass-eyeglass%2Feyeglass) in the Gulp Sass, Node Sass, Libsass, and main Sass repos to see if a similar issue has already been submitted. Please also refer to our [Common Issues and Their Fixes](https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes) page for some basic troubleshooting.
+* You can create an issue [here](https://github.com/dlmanning/gulp-sass/issues). Please include as many details as possible in your report.
+* Issue titles should be descriptive, explaining at the high level what it is about.
+* Please include the version of `gulp-sass`, Node, and NPM you are using, as well as what operating system you are having a problem on.
+* _Do not open a [pull request](#pull-requests) to resolve an issue without first receiving feedback from a `collaborator` or `owner` and having them agree on a solution forward_.
+* Include screenshots and animated GIFs whenever possible; they are immensely helpful.
+* Issues that have a number of sub-items that need to be complete should use [task lists](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments) to track the sub-items in the main issue comment.
+
+
+## Pull Requests
+
+* **DO NOT ISSUE A PULL REQUEST WITHOUT FIRST [SUBMITTING AN ISSUE](#submitting-issues)**
+* Pull requests should reference their related issues. If the pull request closes an issue, [please reference its closing in your commit messages](https://help.github.com/articles/closing-issues-via-commit-messages/). Pull requests not referencing any issues will be closed.
+* Pull request titles should be descriptive, explaining at the high level what it is doing, and should be written in the same style as [Git commit messages](#git-commit-messages).
+* Update the `CHANGELOG` with the changes made by your pull request, making sure to use the proper [Emoji](#emoji-cheatsheet).
+* Follow our JavaScript styleguides. Tests will fail if you do not.
+* Ensure that you have [EditorConfig](http://editorconfig.org/) installed in your editor of choice and that it is functioning properly.
+* Do not squash or rebase your commits when submitting a Pull Request. It makes it much harder to follow your work and make incremental changes.
+* Update the [CHANGELOG](#maintaining-thechangelog) with your changes.
+* Branches should be made off of the most current `master` branch from `git@github.com:dlmanning/gulp-sass.git`
+* Pull requests should be made into our [master](https://github.com/dlmanning/gulp-sass/tree/master) branch.
+
+### Git Commit Messages
+
+* Use the present tense (`"Add feature"` not `"Added Feature"`)
+* Use the imperative mood (`"Move cursor to…"` not `"Moves cursor to…"`)
+* Limit the first line to 72 characters or less
+* Consider including relevant Emoji from our [Emoji cheatsheet](#emoji-cheatsheet)
+
+## Creating a New Version
+
+Versioning is done through [SEMVER](http://semver.org/). When creating a new version, create new release branch off of `master` with the version's name, and create a new tag with `v` prefixed with the version's name from that branch.
+
+For instance, if you are creating version `1.1.0`, you would create a branch `release/1.1.0` from `master` and create a tag `v1.1.0` from branch `release/1.1.0`.
+
+### Maintaining the Changelog
+
+The Changelog should have a list of changes made for each version. They should be organized so additions come first, changes come second, and deletions come third. Version numbers should be 2nd level headers with the `v` in front (like a tag) and the date of the version's most recent update should be underneath in italics.
+
+Changelog messages do not need to cover each individual commit made, but rather should have individual summaries of the changes made. Changelog messages should be written in the same style as [Git commit messages](#git-commit-messages).
+
+## Emoji Cheatsheet
+
+When creating creating commits or updating the CHANGELOG, please **start** the commit message or update with one of the following applicable Emoji. Emoji should not be used at the start of issue or pull request titles.
+
+* :art: `:art:` when improving the format/structure of the code
+* :racehorse: `:racehorse:` when improving performance
+* :memo: `:memo:` when writing long-form text (documentation, guidelines, principles, etc…)
+* :bug: `:bug:` when fixing a bug
+* :fire: `:fire:` when removing code or files
+* :green_heart: `:green_heart:` when fixing the CI build
+* :white_check_mark: `:white_check_mark:` when adding tests
+* :lock: `:lock:` when dealing with security
+* :arrow_up: `:arrow_up:` when upgrading dependencies
+* :arrow_down: `:arrow_down:` when downgrading dependencies
+* :shirt: `:shirt:` when removing linter warnings
+* :shipit: `:shipit:` when creating a new release
diff --git a/source/node_modules/gulp-sass/LICENSE b/source/node_modules/gulp-sass/LICENSE
new file mode 100644
index 000000000..33ef8c128
--- /dev/null
+++ b/source/node_modules/gulp-sass/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 David Manning
+
+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.
diff --git a/source/node_modules/gulp-sass/README.md b/source/node_modules/gulp-sass/README.md
new file mode 100644
index 000000000..33f3e808c
--- /dev/null
+++ b/source/node_modules/gulp-sass/README.md
@@ -0,0 +1,104 @@
+# gulp-sass [](https://travis-ci.org/dlmanning/gulp-sass) [](https://gitter.im/dlmanning/gulp-sass?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](http://badge.fury.io/js/gulp-sass)
+
+Sass plugin for [Gulp](https://github.com/gulpjs/gulp).
+
+**_Before filing an issue, please make sure you have [Updated to the latest Gulp Sass](https://github.com/dlmanning/gulp-sass/wiki/Update-to-the-latest-Gulp-Sass) and have gone through our [Common Issues and Their Fixes](https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes) section._**
+
+# Install
+
+```
+npm install gulp-sass --save-dev
+```
+
+# Basic Usage
+
+Something like this will compile your Sass files:
+
+```javascript
+'use strict';
+
+var gulp = require('gulp');
+var sass = require('gulp-sass');
+
+gulp.task('sass', function () {
+ return gulp.src('./sass/**/*.scss')
+ .pipe(sass().on('error', sass.logError))
+ .pipe(gulp.dest('./css'));
+});
+
+gulp.task('sass:watch', function () {
+ gulp.watch('./sass/**/*.scss', ['sass']);
+});
+```
+
+You can also compile synchronously, doing something like this:
+
+```javascript
+'use strict';
+
+var gulp = require('gulp');
+var sass = require('gulp-sass');
+
+gulp.task('sass', function () {
+ return gulp.src('./sass/**/*.scss')
+ .pipe(sass.sync().on('error', sass.logError))
+ .pipe(gulp.dest('./css'));
+});
+
+gulp.task('sass:watch', function () {
+ gulp.watch('./sass/**/*.scss', ['sass']);
+});
+```
+
+## Options
+
+Pass in options just like you would for [`node-sass`](https://github.com/sass/node-sass#options); they will be passed along just as if you were using `node-sass`.
+
+For example:
+
+```javascript
+gulp.task('sass', function () {
+ return gulp.src('./sass/**/*.scss')
+ .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
+ .pipe(gulp.dest('./css'));
+});
+```
+
+## Source Maps
+
+`gulp-sass` can be used in tandem with [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) to generate source maps for the Sass to CSS compilation. You will need to initialize [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) prior to running `gulp-sass` and write the source maps after.
+
+```javascript
+var sourcemaps = require('gulp-sourcemaps');
+
+gulp.task('sass', function () {
+ return gulp.src('./sass/**/*.scss')
+ .pipe(sourcemaps.init())
+ .pipe(sass().on('error', sass.logError))
+ .pipe(sourcemaps.write())
+ .pipe(gulp.dest('./css'));
+});
+```
+
+By default, [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) writes the source maps inline in the compiled CSS files. To write them to a separate file, specify a path relative to the `gulp.dest()` destination in the `sourcemaps.write()` function.
+
+```javascript
+var sourcemaps = require('gulp-sourcemaps');
+gulp.task('sass', function () {
+ return gulp.src('./sass/**/*.scss')
+ .pipe(sourcemaps.init())
+ .pipe(sass().on('error', sass.logError))
+ .pipe(sourcemaps.write('./maps'))
+ .pipe(gulp.dest('./css'));
+});
+```
+
+# Issues
+
+`gulp-sass` is a very light-weight wrapper around [`node-sass`](https://github.com/sass/node-sass), which in turn is a Node binding for [`libsass`](https://github.com/sass/libsass), which in turn is a port of [`Sass`](https://github.com/sass/sass). Because of this, the issue you're having likely isn't a `gulp-sass` issue, but an issue with one of those three projects.
+
+If you have a feature request/question how Sass works/concerns on how your Sass gets compiled/errors in your compiling, it's likely a `libsass` or `Sass` issue and you should file your issue with one of those projects.
+
+If you're having problems with the options you're passing in, it's likely a `node-sass` or `libsass` issue and you should file your issue with one of those projects.
+
+We may, in the course of resolving issues, direct you to one of these other projects. If we do so, please follow up by searching that project's issue queue (both open and closed) for your problem and, if it doesn't exist, filing an issue with them.
diff --git a/source/node_modules/gulp-sass/index.js b/source/node_modules/gulp-sass/index.js
new file mode 100644
index 000000000..ba25ec554
--- /dev/null
+++ b/source/node_modules/gulp-sass/index.js
@@ -0,0 +1,188 @@
+'use strict';
+
+var gutil = require('gulp-util');
+var through = require('through2');
+var assign = require('object-assign');
+var path = require('path');
+var applySourceMap = require('vinyl-sourcemaps-apply');
+
+var PLUGIN_NAME = 'gulp-sass';
+
+//////////////////////////////
+// Main Gulp Sass function
+//////////////////////////////
+var gulpSass = function gulpSass(options, sync) {
+ return through.obj(function(file, enc, cb) {
+ var opts,
+ filePush,
+ errorM,
+ callback,
+ result;
+
+ if (file.isNull()) {
+ return cb(null, file);
+ }
+ if (file.isStream()) {
+ return cb(new gutil.PluginError(PLUGIN_NAME, 'Streaming not supported'));
+ }
+ if (path.basename(file.path).indexOf('_') === 0) {
+ return cb();
+ }
+ if (!file.contents.length) {
+ file.path = gutil.replaceExtension(file.path, '.css');
+ return cb(null, file);
+ }
+
+
+ opts = assign({}, options);
+ opts.data = file.contents.toString();
+
+ // Ensure `indentedSyntax` is true if a `.sass` file
+ if (path.extname(file.path) === '.sass') {
+ opts.indentedSyntax = true;
+ }
+
+ // Ensure file's parent directory in the include path
+ if (opts.includePaths) {
+ if (typeof opts.includePaths === 'string') {
+ opts.includePaths = [opts.includePaths];
+ }
+ }
+ else {
+ opts.includePaths = [];
+ }
+
+ opts.includePaths.unshift(path.dirname(file.path));
+
+ // Generate Source Maps if plugin source-map present
+ if (file.sourceMap) {
+ opts.sourceMap = file.path;
+ opts.omitSourceMapUrl = true;
+ opts.sourceMapContents = true;
+ }
+
+ //////////////////////////////
+ // Handles returning the file to the stream
+ //////////////////////////////
+ filePush = function filePush(sassObj) {
+ var sassMap,
+ sassMapFile,
+ sassFileSrc,
+ sassFileSrcPath,
+ sourceFileIndex,
+ filteredSources;
+
+ // Build Source Maps!
+ if (sassObj.map) {
+ // Transform map into JSON
+ sassMap = JSON.parse(sassObj.map.toString());
+ // Grab the stdout and transform it into stdin
+ sassMapFile = sassMap.file.replace('stdout', 'stdin');
+ // Grab the base file name that's being worked on
+ sassFileSrc = file.relative;
+ // Grab the path portion of the file that's being worked on
+ sassFileSrcPath = path.dirname(sassFileSrc);
+ if (sassFileSrcPath) {
+ //Prepend the path to all files in the sources array except the file that's being worked on
+ for (sourceFileIndex = 0; sourceFileIndex < sassMap.sources.length; sourceFileIndex++) {
+ if (sourceFileIndex !== sassMap.sources.indexOf(sassMapFile)) {
+ sassMap.sources[sourceFileIndex] = path.join(sassFileSrcPath, sassMap.sources[sourceFileIndex]);
+ }
+ }
+ }
+ // Remove 'stdin' from souces and replace with filenames!
+ filteredSources = sassMap.sources.filter(function(src) {
+ if (src.indexOf('stdin') === -1) {
+ return src;
+ }
+ });
+ sassMap.sources = filteredSources;
+ sassMap.sources.unshift(sassFileSrc);
+ // Replace the map file with the original file name (but new extension)
+ sassMap.file = gutil.replaceExtension(sassFileSrc, '.css');
+ // Apply the map
+ applySourceMap(file, sassMap);
+ }
+
+ file.contents = sassObj.css;
+ file.path = gutil.replaceExtension(file.path, '.css');
+
+ cb(null, file);
+ };
+
+ //////////////////////////////
+ // Handles error message
+ //////////////////////////////
+ errorM = function errorM(error) {
+ var relativePath = '',
+ filePath = error.file === 'stdin' ? file.path : error.file,
+ message = '';
+
+ filePath = filePath ? filePath : file.path;
+ relativePath = path.relative(process.cwd(), filePath);
+
+ message += gutil.colors.underline(relativePath) + '\n';
+ message += error.formatted;
+
+ error.messageFormatted = message;
+ error.messageOriginal = error.message;
+ error.message = gutil.colors.stripColor(message);
+
+ error.relativePath = relativePath;
+
+ return cb(new gutil.PluginError(
+ PLUGIN_NAME, error
+ ));
+ };
+
+ if (sync !== true) {
+ //////////////////////////////
+ // Async Sass render
+ //////////////////////////////
+ callback = function(error, obj) {
+ if (error) {
+ return errorM(error);
+ }
+ filePush(obj);
+ };
+
+ gulpSass.compiler.render(opts, callback);
+ }
+ else {
+ //////////////////////////////
+ // Sync Sass render
+ //////////////////////////////
+ try {
+ result = gulpSass.compiler.renderSync(opts);
+
+ filePush(result);
+ }
+ catch (error) {
+ return errorM(error);
+ }
+ }
+ });
+};
+
+//////////////////////////////
+// Sync Sass render
+//////////////////////////////
+gulpSass.sync = function sync(options) {
+ return gulpSass(options, true);
+};
+
+//////////////////////////////
+// Log errors nicely
+//////////////////////////////
+gulpSass.logError = function logError(error) {
+ var message = new gutil.PluginError('sass', error.messageFormatted).toString();
+ process.stderr.write(message + '\n');
+ this.emit('end');
+};
+
+//////////////////////////////
+// Store compiler in a prop
+//////////////////////////////
+gulpSass.compiler = require('node-sass');
+
+module.exports = gulpSass;
diff --git a/source/node_modules/gulp-sass/package.json b/source/node_modules/gulp-sass/package.json
new file mode 100644
index 000000000..cafe3fdb4
--- /dev/null
+++ b/source/node_modules/gulp-sass/package.json
@@ -0,0 +1,105 @@
+{
+ "_args": [
+ [
+ "gulp-sass",
+ "/Users/laura.vecchio/Sites/patternlab-php/source"
+ ]
+ ],
+ "_from": "gulp-sass@*",
+ "_id": "gulp-sass@2.2.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gulp-sass",
+ "_nodeVersion": "2.5.0",
+ "_npmOperationalInternal": {
+ "host": "packages-5-east.internal.npmjs.com",
+ "tmp": "tmp/gulp-sass-2.2.0.tgz_1454585742634_0.3176706349477172"
+ },
+ "_npmUser": {
+ "email": "xzyfer@gmail.com",
+ "name": "xzyfer"
+ },
+ "_npmVersion": "2.13.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "gulp-sass",
+ "raw": "gulp-sass",
+ "rawSpec": "",
+ "scope": null,
+ "spec": "*",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "#DEV:/"
+ ],
+ "_resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-2.2.0.tgz",
+ "_shasum": "ac7fb33112443ee4fd2df7468ed966a14a72476f",
+ "_shrinkwrap": null,
+ "_spec": "gulp-sass",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source",
+ "author": {
+ "name": "David Manning"
+ },
+ "bugs": {
+ "url": "https://github.com/dlmanning/gulp-sass/issues"
+ },
+ "dependencies": {
+ "gulp-util": "^3.0",
+ "node-sass": "^3.4.1",
+ "object-assign": "^4.0.1",
+ "through2": "^2.0.0",
+ "vinyl-sourcemaps-apply": "^0.2.0"
+ },
+ "description": "Gulp plugin for sass",
+ "devDependencies": {
+ "autoprefixer-core": "^5.2.1",
+ "eslint": "^1.6.0",
+ "globule": "^0.2.0",
+ "gulp": "^3.8.11",
+ "gulp-postcss": "^5.1.10",
+ "gulp-sourcemaps": "^1.5.2",
+ "gulp-tap": "^0.1.3",
+ "mocha": "^2.2.1",
+ "rimraf": "^2.4.3",
+ "should": "^7.1.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "ac7fb33112443ee4fd2df7468ed966a14a72476f",
+ "tarball": "http://registry.npmjs.org/gulp-sass/-/gulp-sass-2.2.0.tgz"
+ },
+ "gitHead": "1888f3561f7db25c016dbc17ace4fcfd4456e940",
+ "homepage": "https://github.com/dlmanning/gulp-sass#readme",
+ "keywords": [
+ "gulp",
+ "gulpplugin",
+ "sass"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "dlmanning",
+ "email": "dlmanning@me.com"
+ },
+ {
+ "name": "snugug",
+ "email": "sam@snug.ug"
+ },
+ {
+ "name": "xzyfer",
+ "email": "xzyfer@gmail.com"
+ }
+ ],
+ "name": "gulp-sass",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/dlmanning/gulp-sass.git"
+ },
+ "scripts": {
+ "test": "mocha test"
+ },
+ "version": "2.2.0"
+}
diff --git a/source/node_modules/gulp-util/LICENSE b/source/node_modules/gulp-util/LICENSE
new file mode 100755
index 000000000..7cbe012c6
--- /dev/null
+++ b/source/node_modules/gulp-util/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2014 Fractal
+
+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.
diff --git a/source/node_modules/gulp-util/README.md b/source/node_modules/gulp-util/README.md
new file mode 100644
index 000000000..8c25a4d62
--- /dev/null
+++ b/source/node_modules/gulp-util/README.md
@@ -0,0 +1,146 @@
+# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
+
+## Information
+
+
+
+Package gulp-util
+
+
+Description
+Utility functions for gulp plugins
+
+
+Node Version
+>= 0.10
+
+
+
+## Usage
+
+```javascript
+var gutil = require('gulp-util');
+
+gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
+gutil.beep();
+
+gutil.replaceExtension('file.coffee', '.js'); // file.js
+
+var opt = {
+ name: 'todd',
+ file: someGulpFile
+};
+gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
+```
+
+### log(msg...)
+
+Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
+
+The default gulp coloring using gutil.colors.:
+```
+values (files, module names, etc.) = cyan
+numbers (times, counts, etc) = magenta
+```
+
+### colors
+
+Is an instance of [chalk](https://github.com/sindresorhus/chalk).
+
+### replaceExtension(path, newExtension)
+
+Replaces a file extension in a path. Returns the new path.
+
+### isStream(obj)
+
+Returns true or false if an object is a stream.
+
+### isBuffer(obj)
+
+Returns true or false if an object is a Buffer.
+
+### template(string[, data])
+
+This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
+
+## new File(obj)
+
+This is just [vinyl](https://github.com/wearefractal/vinyl)
+
+```javascript
+var file = new gutil.File({
+ base: path.join(__dirname, './fixtures/'),
+ cwd: __dirname,
+ path: path.join(__dirname, './fixtures/test.coffee')
+});
+```
+
+## noop()
+
+Returns a stream that does nothing but pass data straight through.
+
+```javascript
+// gulp should be called like this :
+// $ gulp --type production
+gulp.task('scripts', function() {
+ gulp.src('src/**/*.js')
+ .pipe(concat('script.js'))
+ .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
+ .pipe(gulp.dest('dist/'));
+});
+```
+
+## buffer(cb)
+
+This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
+
+Returns a stream that can be piped to.
+
+The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
+
+Callback is optional and receives two arguments: error and data
+
+```javascript
+gulp.src('stuff/*.js')
+ .pipe(gutil.buffer(function(err, files) {
+
+ }));
+```
+
+## new PluginError(pluginName, message[, options])
+
+- pluginName should be the module name of your plugin
+- message can be a string or an existing error
+- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
+- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
+- Note that if you pass in a custom stack string you need to include the message along with that.
+- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
+
+These are all acceptable forms of instantiation:
+
+```javascript
+var err = new gutil.PluginError('test', {
+ message: 'something broke'
+});
+
+var err = new gutil.PluginError({
+ plugin: 'test',
+ message: 'something broke'
+});
+
+var err = new gutil.PluginError('test', 'something broke');
+
+var err = new gutil.PluginError('test', 'something broke', {showStack: true});
+
+var existingError = new Error('OMG');
+var err = new gutil.PluginError('test', existingError, {showStack: true});
+```
+
+[npm-url]: https://www.npmjs.com/package/gulp-util
+[npm-image]: https://badge.fury.io/js/gulp-util.svg
+[travis-url]: https://travis-ci.org/gulpjs/gulp-util
+[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
+[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
+[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
+[depstat-url]: https://david-dm.org/gulpjs/gulp-util
+[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/source/node_modules/gulp-util/index.js b/source/node_modules/gulp-util/index.js
new file mode 100644
index 000000000..199713c94
--- /dev/null
+++ b/source/node_modules/gulp-util/index.js
@@ -0,0 +1,18 @@
+module.exports = {
+ File: require('vinyl'),
+ replaceExtension: require('replace-ext'),
+ colors: require('chalk'),
+ date: require('dateformat'),
+ log: require('./lib/log'),
+ template: require('./lib/template'),
+ env: require('./lib/env'),
+ beep: require('beeper'),
+ noop: require('./lib/noop'),
+ isStream: require('./lib/isStream'),
+ isBuffer: require('./lib/isBuffer'),
+ isNull: require('./lib/isNull'),
+ linefeed: '\n',
+ combine: require('./lib/combine'),
+ buffer: require('./lib/buffer'),
+ PluginError: require('./lib/PluginError')
+};
diff --git a/source/node_modules/gulp-util/lib/PluginError.js b/source/node_modules/gulp-util/lib/PluginError.js
new file mode 100644
index 000000000..d60159ab1
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/PluginError.js
@@ -0,0 +1,130 @@
+var util = require('util');
+var arrayDiffer = require('array-differ');
+var arrayUniq = require('array-uniq');
+var chalk = require('chalk');
+var objectAssign = require('object-assign');
+
+var nonEnumberableProperties = ['name', 'message', 'stack'];
+var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
+
+// wow what a clusterfuck
+var parseOptions = function(plugin, message, opt) {
+ opt = opt || {};
+ if (typeof plugin === 'object') {
+ opt = plugin;
+ } else {
+ if (message instanceof Error) {
+ opt.error = message;
+ } else if (typeof message === 'object') {
+ opt = message;
+ } else {
+ opt.message = message;
+ }
+ opt.plugin = plugin;
+ }
+
+ return objectAssign({
+ showStack: false,
+ showProperties: true
+ }, opt);
+};
+
+function PluginError(plugin, message, opt) {
+ if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
+
+ Error.call(this);
+
+ var options = parseOptions(plugin, message, opt);
+ var self = this;
+
+ // if options has an error, grab details from it
+ if (options.error) {
+ // These properties are not enumerable, so we have to add them explicitly.
+ arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
+ .forEach(function(prop) {
+ self[prop] = options.error[prop];
+ });
+ }
+
+ var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
+
+ // options object can override
+ properties.forEach(function(prop) {
+ if (prop in options) this[prop] = options[prop];
+ }, this);
+
+ // defaults
+ if (!this.name) this.name = 'Error';
+
+ if (!this.stack) {
+ // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
+ // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
+ // safety object, then we'll get stack overflow problems.
+ var safety = {
+ toString: function() {
+ return this._messageWithDetails() + '\nStack:';
+ }.bind(this)
+ };
+ Error.captureStackTrace(safety, arguments.callee || this.constructor);
+ this.__safety = safety;
+ }
+
+ if (!this.plugin) throw new Error('Missing plugin name');
+ if (!this.message) throw new Error('Missing error message');
+}
+
+util.inherits(PluginError, Error);
+
+PluginError.prototype._messageWithDetails = function() {
+ var messageWithDetails = 'Message:\n ' + this.message;
+ var details = this._messageDetails();
+
+ if (details !== '') {
+ messageWithDetails += '\n' + details;
+ }
+
+ return messageWithDetails;
+};
+
+PluginError.prototype._messageDetails = function() {
+ if (!this.showProperties) {
+ return '';
+ }
+
+ var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
+
+ if (properties.length === 0) {
+ return '';
+ }
+
+ var self = this;
+ properties = properties.map(function stringifyProperty(prop) {
+ return ' ' + prop + ': ' + self[prop];
+ });
+
+ return 'Details:\n' + properties.join('\n');
+};
+
+PluginError.prototype.toString = function () {
+ var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
+ var detailsWithStack = function(stack) {
+ return this._messageWithDetails() + '\nStack:\n' + stack;
+ }.bind(this);
+
+ var msg;
+ if (this.showStack) {
+ if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
+ msg = this.__safety.stack;
+ } else if (this._stack) {
+ msg = detailsWithStack(this._stack);
+ } else { // Stack from wrapped error
+ msg = detailsWithStack(this.stack);
+ }
+ } else {
+ msg = this._messageWithDetails();
+ }
+
+ return sig + '\n' + msg;
+};
+
+module.exports = PluginError;
diff --git a/source/node_modules/gulp-util/lib/buffer.js b/source/node_modules/gulp-util/lib/buffer.js
new file mode 100644
index 000000000..26c940db1
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/buffer.js
@@ -0,0 +1,15 @@
+var through = require('through2');
+
+module.exports = function(fn) {
+ var buf = [];
+ var end = function(cb) {
+ this.push(buf);
+ cb();
+ if(fn) fn(null, buf);
+ };
+ var push = function(data, enc, cb) {
+ buf.push(data);
+ cb();
+ };
+ return through.obj(push, end);
+};
diff --git a/source/node_modules/gulp-util/lib/combine.js b/source/node_modules/gulp-util/lib/combine.js
new file mode 100644
index 000000000..f20712d20
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/combine.js
@@ -0,0 +1,11 @@
+var pipeline = require('multipipe');
+
+module.exports = function(){
+ var args = arguments;
+ if (args.length === 1 && Array.isArray(args[0])) {
+ args = args[0];
+ }
+ return function(){
+ return pipeline.apply(pipeline, args);
+ };
+};
diff --git a/source/node_modules/gulp-util/lib/env.js b/source/node_modules/gulp-util/lib/env.js
new file mode 100644
index 000000000..ee17c0e30
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/env.js
@@ -0,0 +1,4 @@
+var parseArgs = require('minimist');
+var argv = parseArgs(process.argv.slice(2));
+
+module.exports = argv;
diff --git a/source/node_modules/gulp-util/lib/isBuffer.js b/source/node_modules/gulp-util/lib/isBuffer.js
new file mode 100644
index 000000000..7c52f78c9
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/isBuffer.js
@@ -0,0 +1,7 @@
+var buf = require('buffer');
+var Buffer = buf.Buffer;
+
+// could use Buffer.isBuffer but this is the same exact thing...
+module.exports = function(o) {
+ return typeof o === 'object' && o instanceof Buffer;
+};
diff --git a/source/node_modules/gulp-util/lib/isNull.js b/source/node_modules/gulp-util/lib/isNull.js
new file mode 100644
index 000000000..7f22c63ae
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/isNull.js
@@ -0,0 +1,3 @@
+module.exports = function(v) {
+ return v === null;
+};
diff --git a/source/node_modules/gulp-util/lib/isStream.js b/source/node_modules/gulp-util/lib/isStream.js
new file mode 100644
index 000000000..6b54e123b
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/isStream.js
@@ -0,0 +1,5 @@
+var Stream = require('stream').Stream;
+
+module.exports = function(o) {
+ return !!o && o instanceof Stream;
+};
diff --git a/source/node_modules/gulp-util/lib/log.js b/source/node_modules/gulp-util/lib/log.js
new file mode 100644
index 000000000..bb843beef
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/log.js
@@ -0,0 +1,14 @@
+var hasGulplog = require('has-gulplog');
+
+module.exports = function(){
+ if(hasGulplog()){
+ // specifically deferring loading here to keep from registering it globally
+ var gulplog = require('gulplog');
+ gulplog.info.apply(gulplog, arguments);
+ } else {
+ // specifically defering loading because it might not be used
+ var fancylog = require('fancy-log');
+ fancylog.apply(null, arguments);
+ }
+ return this;
+};
diff --git a/source/node_modules/gulp-util/lib/noop.js b/source/node_modules/gulp-util/lib/noop.js
new file mode 100644
index 000000000..7862cb161
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/noop.js
@@ -0,0 +1,5 @@
+var through = require('through2');
+
+module.exports = function () {
+ return through.obj();
+};
diff --git a/source/node_modules/gulp-util/lib/template.js b/source/node_modules/gulp-util/lib/template.js
new file mode 100644
index 000000000..eef3bb376
--- /dev/null
+++ b/source/node_modules/gulp-util/lib/template.js
@@ -0,0 +1,23 @@
+var template = require('lodash.template');
+var reEscape = require('lodash._reescape');
+var reEvaluate = require('lodash._reevaluate');
+var reInterpolate = require('lodash._reinterpolate');
+
+var forcedSettings = {
+ escape: reEscape,
+ evaluate: reEvaluate,
+ interpolate: reInterpolate
+};
+
+module.exports = function(tmpl, data) {
+ var fn = template(tmpl, forcedSettings);
+
+ var wrapped = function(o) {
+ if (typeof o === 'undefined' || typeof o.file === 'undefined') {
+ throw new Error('Failed to provide the current file as "file" to the template');
+ }
+ return fn(o);
+ };
+
+ return (data ? wrapped(data) : wrapped);
+};
diff --git a/source/node_modules/gulp-util/node_modules/object-assign/index.js b/source/node_modules/gulp-util/node_modules/object-assign/index.js
new file mode 100644
index 000000000..2164f93df
--- /dev/null
+++ b/source/node_modules/gulp-util/node_modules/object-assign/index.js
@@ -0,0 +1,39 @@
+'use strict';
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function ToObject(val) {
+ if (val == null) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function ownEnumerableKeys(obj) {
+ var keys = Object.getOwnPropertyNames(obj);
+
+ if (Object.getOwnPropertySymbols) {
+ keys = keys.concat(Object.getOwnPropertySymbols(obj));
+ }
+
+ return keys.filter(function (key) {
+ return propIsEnumerable.call(obj, key);
+ });
+}
+
+module.exports = Object.assign || function (target, source) {
+ var from;
+ var keys;
+ var to = ToObject(target);
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = arguments[s];
+ keys = ownEnumerableKeys(Object(from));
+
+ for (var i = 0; i < keys.length; i++) {
+ to[keys[i]] = from[keys[i]];
+ }
+ }
+
+ return to;
+};
diff --git a/source/node_modules/gulp-util/node_modules/object-assign/license b/source/node_modules/gulp-util/node_modules/object-assign/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/source/node_modules/gulp-util/node_modules/object-assign/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/gulp-util/node_modules/object-assign/package.json b/source/node_modules/gulp-util/node_modules/object-assign/package.json
new file mode 100644
index 000000000..519b6c25a
--- /dev/null
+++ b/source/node_modules/gulp-util/node_modules/object-assign/package.json
@@ -0,0 +1,94 @@
+{
+ "_args": [
+ [
+ "object-assign@^3.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "object-assign@>=3.0.0 <4.0.0",
+ "_id": "object-assign@3.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gulp-util/object-assign",
+ "_nodeVersion": "0.12.4",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.10.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "object-assign",
+ "raw": "object-assign@^3.0.0",
+ "rawSpec": "^3.0.0",
+ "scope": null,
+ "spec": ">=3.0.0 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
+ "_shasum": "9bedd5ca0897949bca47e7ff408062d549f587f2",
+ "_shrinkwrap": null,
+ "_spec": "object-assign@^3.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/object-assign/issues"
+ },
+ "dependencies": {},
+ "description": "ES6 Object.assign() ponyfill",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9bedd5ca0897949bca47e7ff408062d549f587f2",
+ "tarball": "http://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "02622dcb0d82bd81a071ed0b04fedf5e5eea7059",
+ "homepage": "https://github.com/sindresorhus/object-assign",
+ "keywords": [
+ "assign",
+ "browser",
+ "ecmascript",
+ "es6",
+ "extend",
+ "harmony",
+ "object",
+ "polyfill",
+ "ponyfill",
+ "prollyfill",
+ "properties",
+ "shim"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "object-assign",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/object-assign.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "3.0.0"
+}
diff --git a/source/node_modules/gulp-util/node_modules/object-assign/readme.md b/source/node_modules/gulp-util/node_modules/object-assign/readme.md
new file mode 100644
index 000000000..aee51c12b
--- /dev/null
+++ b/source/node_modules/gulp-util/node_modules/object-assign/readme.md
@@ -0,0 +1,51 @@
+# object-assign [](https://travis-ci.org/sindresorhus/object-assign)
+
+> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
+
+> Ponyfill: A polyfill that doesn't overwrite the native method
+
+
+## Install
+
+```sh
+$ npm install --save object-assign
+```
+
+
+## Usage
+
+```js
+var objectAssign = require('object-assign');
+
+objectAssign({foo: 0}, {bar: 1});
+//=> {foo: 0, bar: 1}
+
+// multiple sources
+objectAssign({foo: 0}, {bar: 1}, {baz: 2});
+//=> {foo: 0, bar: 1, baz: 2}
+
+// overwrites equal keys
+objectAssign({foo: 0}, {foo: 1}, {foo: 2});
+//=> {foo: 2}
+
+// ignores null and undefined sources
+objectAssign({foo: 0}, null, {bar: 1}, undefined);
+//=> {foo: 0, bar: 1}
+```
+
+
+## API
+
+### objectAssign(target, source, [source, ...])
+
+Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
+
+
+## Resources
+
+- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/gulp-util/package.json b/source/node_modules/gulp-util/package.json
new file mode 100644
index 000000000..e3b0dd481
--- /dev/null
+++ b/source/node_modules/gulp-util/package.json
@@ -0,0 +1,114 @@
+{
+ "_args": [
+ [
+ "gulp-util@^3.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-sass"
+ ]
+ ],
+ "_from": "gulp-util@>=3.0.0 <4.0.0",
+ "_id": "gulp-util@3.0.7",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gulp-util",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "email": "blaine@iceddev.com",
+ "name": "phated"
+ },
+ "_npmVersion": "2.14.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "gulp-util",
+ "raw": "gulp-util@^3.0",
+ "rawSpec": "^3.0",
+ "scope": null,
+ "spec": ">=3.0.0 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-sass"
+ ],
+ "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz",
+ "_shasum": "78925c4b8f8b49005ac01a011c557e6218941cbb",
+ "_shrinkwrap": null,
+ "_spec": "gulp-util@^3.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-sass",
+ "author": {
+ "email": "contact@wearefractal.com",
+ "name": "Fractal",
+ "url": "http://wearefractal.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/gulpjs/gulp-util/issues"
+ },
+ "dependencies": {
+ "array-differ": "^1.0.0",
+ "array-uniq": "^1.0.2",
+ "beeper": "^1.0.0",
+ "chalk": "^1.0.0",
+ "dateformat": "^1.0.11",
+ "fancy-log": "^1.1.0",
+ "gulplog": "^1.0.0",
+ "has-gulplog": "^0.1.0",
+ "lodash._reescape": "^3.0.0",
+ "lodash._reevaluate": "^3.0.0",
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.template": "^3.0.0",
+ "minimist": "^1.1.0",
+ "multipipe": "^0.1.2",
+ "object-assign": "^3.0.0",
+ "replace-ext": "0.0.1",
+ "through2": "^2.0.0",
+ "vinyl": "^0.5.0"
+ },
+ "description": "Utility functions for gulp plugins",
+ "devDependencies": {
+ "buffer-equal": "^0.0.1",
+ "coveralls": "^2.11.2",
+ "event-stream": "^3.1.7",
+ "istanbul": "^0.3.5",
+ "istanbul-coveralls": "^1.0.1",
+ "jshint": "^2.5.11",
+ "lodash.templatesettings": "^3.0.0",
+ "mocha": "^2.0.1",
+ "rimraf": "^2.2.8",
+ "should": "^7.0.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "78925c4b8f8b49005ac01a011c557e6218941cbb",
+ "tarball": "http://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "gitHead": "b74a5ff121471ed00b84fb1e73a0e75488d33ccd",
+ "homepage": "https://github.com/gulpjs/gulp-util#readme",
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "fractal",
+ "email": "contact@wearefractal.com"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "name": "gulp-util",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gulpjs/gulp-util.git"
+ },
+ "scripts": {
+ "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls",
+ "test": "jshint *.js lib/*.js test/*.js && mocha"
+ },
+ "version": "3.0.7"
+}
diff --git a/source/node_modules/gulp/CHANGELOG.md b/source/node_modules/gulp/CHANGELOG.md
new file mode 100644
index 000000000..d9846eab7
--- /dev/null
+++ b/source/node_modules/gulp/CHANGELOG.md
@@ -0,0 +1,233 @@
+# gulp changelog
+
+## 3.9.0
+
+- add babel support
+- add transpiler fallback support
+- add support for some renamed transpilers (livescript, etc)
+- add JSCS
+- update dependecies (liftoff, interpret)
+- documentation tweaks
+
+## 3.8.11
+
+- fix node 0.12/iojs problems
+- add node 0.12 and iojs to travis
+- update dependencies (liftoff, v8flags)
+- documentation tweaks
+
+## 3.8.10
+
+- add link to spanish docs
+- update dependencies (archy, semver, mocha, etc)
+- documentation tweaks
+
+## 3.8.9
+
+- fix local version undefined output
+- add completion for fish shell
+- fix powershell completion line splitting
+- add support for arbitrary node flags (oops, should have been a minor bump)
+- add v8flags dependency
+- update dependencies (liftoff)
+- documentation tweaks
+
+## 3.8.8
+
+- update dependencies (minimist, tildify)
+- documentation tweaks
+
+## 3.8.7
+
+- handle errors a bit better
+- update dependencies (gulp-util, semver, etc)
+- documentation tweaks
+
+## 3.8.6
+
+- remove executable flag from LICENSE
+- update dependencies (chalk, minimist, liftoff, etc)
+- documentation tweaks
+
+## 3.8.5
+
+- simplify --silent and --tasks-simple
+- fix bug in autocomplete where errors would come out
+
+## 3.8.4
+
+- CLI will use exit code 1 on exit when any task fails during the lifetime of the process
+
+
+## 3.8.3
+
+- Tweak error formatting to work better with PluginErrors and strings
+
+## 3.8.2
+
+- add manpage generation
+
+## 3.8.1
+
+- the CLI now adds process.env.INIT_CWD which is the original cwd it was launched from
+
+## 3.8.0
+
+- update vinyl-fs
+ - gulp.src is now a writable passthrough, this means you can use it to add files to your pipeline at any point
+ - gulp.dest can now take a function to determine the folder
+
+This is now possible!
+
+```js
+gulp.src('lib/*.js')
+ .pipe(uglify())
+ .pipe(gulp.src('styles/*.css'))
+ .pipe(gulp.dest(function(file){
+ // I don't know, you can do something cool here
+ return 'build/whatever';
+ }));
+```
+
+## 3.7.0
+
+- update vinyl-fs to remove BOM from UTF8 files
+- add --tasks-simple flag for plaintext task listings
+- updated autocomplete scripts to be simpler and use new --tasks-simple flag
+- added support for transpilers via liftoff 0.11 and interpret
+ - just npm install your compiler (coffee-script for example) and it will work out of the box
+
+## 3.5.5
+
+- update deps
+- gulp.dest now support mode option, uses source file mode by default (file.stat.mode)
+- use chalk for colors in bin
+- update gulp.env deprecation msg to be more helpful
+
+
+## 3.5.2
+
+- add -V for version on CLI (unix standard)
+- -v is deprecated, use -V
+- add -T as an alias for --tasks
+- documentation
+
+## 3.5
+
+- added `gulp.watch(globs, tasksArray)` sugar
+- remove gulp.taskQueue
+- deprecate gulp.run
+- deprecate gulp.env
+- add engineStrict to prevent people with node < 0.9 from installing
+
+## 3.4
+
+- added `--tasks` that prints out the tree of tasks + deps
+- global cli + local install mismatch is no longer fatal
+- remove tests for fs stuff
+- switch core src, dest, and watch to vinyl-fs
+- internal cleaning
+
+## 3.3.4
+
+- `--base` is now `--cwd`
+
+## 3.3.3
+
+- support for `--base` CLI arg to change where the search for gulpfile/`--require`s starts
+- support for `--gulpfile` CLI arg to point to a gulpfile specifically
+
+## 3.3.0
+
+- file.contents streams are no longer paused coming out of src
+- dest now passes files through before they are empty to fix passing to multiple dests
+
+## 3.2.4
+
+- Bug fix - we didn't have any CLI tests
+
+## 3.2.3
+
+- Update dependencies for bug fixes
+- autocomplete stuff in the completion folder
+
+## 3.2
+
+- File object is now [vinyl](https://github.com/wearefractal/vinyl)
+- .watch() is now [glob-watcher](https://github.com/wearefractal/glob-watcher)
+- Fix CLI -v when no gulpfile found
+- gulp-util updated
+- Logging moved to CLI bin file
+ - Will cause double logging if you update global CLI to 3.2 but not local
+ - Will cause no logging if you update local to 3.1 but not global CLI
+- Drop support for < 0.9
+
+## 3.1.3
+
+- Move isStream and isBuffer to gulp-util
+
+## 3.1
+
+- Move file class to gulp-util
+
+## 3.0
+
+- Ability to pass multiple globs and glob negations to glob-stream
+- Breaking change to the way glob-stream works
+- File object is now a class
+- file.shortened changed to file.relative
+- file.cwd added
+- Break out getStats to avoid nesting
+- Major code reorganization
+
+## 2.7
+
+- Breaking change to the way options are passed to glob-stream
+- Introduce new File object to ease pain of computing shortened names (now a getter)
+
+## 2.4 - 2.6
+
+- Moved stuff to gulp-util
+- Quit exposing createGlobStream (just use the glob-stream module)
+- More logging
+- Prettier time durations
+- Tons of documentation changes
+- gulp.trigger(tasks...) as a through stream
+
+## 1.2-2.4 (11/12/13)
+
+- src buffer=false fixed for 0.8 and 0.9 (remember to .resume() on these versions before consuming)
+- CLI completely rewritten
+ - Colorful logging
+ - Uses local version of gulp to run tasks
+ - Uses findup to locate gulpfile (so you can run it anywhere in your project)
+ - chdir to gulpfile directory before loading it
+ - Correct exit codes on errors
+- silent flag added to gulp to disable logging
+- Fixes to task orchestration (3rd party)
+- Better support for globbed directories (thanks @robrich)
+
+## 1.2 (10/28/13)
+
+- Can specify buffer=false on src streams to make file.content a stream
+- Can specify read=false on src streams to disable file.content
+
+## 1.1 (10/21/13)
+
+- Can specify run callback
+- Can specify task dependencies
+- Tasks can accept callback or return promise
+- `gulp.verbose` exposes run-time internals
+
+## 1.0 (9/26/13)
+
+- Specify dependency versions
+- Updated docs
+
+## 0.2 (8/6/13)
+
+- Rename .files() to .src() and .folder() to .dest()
+
+## 0.1 (7/18/13)
+
+- Initial Release
diff --git a/source/node_modules/gulp/LICENSE b/source/node_modules/gulp/LICENSE
new file mode 100644
index 000000000..ee25a9095
--- /dev/null
+++ b/source/node_modules/gulp/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2016 Fractal
+
+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.
diff --git a/source/node_modules/gulp/README.md b/source/node_modules/gulp/README.md
new file mode 100644
index 000000000..b67798c75
--- /dev/null
+++ b/source/node_modules/gulp/README.md
@@ -0,0 +1,103 @@
+
+
+
+
+
The streaming build system
+
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+
+## What is gulp?
+
+- **Automation** - gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow.
+- **Platform-agnostic** - Integrations are built into all major IDEs and people are using gulp with PHP, .NET, Node.js, Java, and other platforms.
+- **Strong Ecosystem** - Use npm modules to do anything you want + over 2000 curated plugins for streaming file transformations
+- **Simple** - By providing only a minimal API surface, gulp is easy to learn and simple to use
+
+## Documentation
+
+For a Getting started guide, API docs, recipes, making a plugin, etc. check out or docs!
+
+- Need something reliable? Check out the [documentation for the current release](/docs/README.md)!
+- Want to help us test the latest and greatest? Check out the [documentation for the next release](https://github.com/gulpjs/gulp/tree/4.0)!
+
+## Sample `gulpfile.js`
+
+This file will give you a taste of what gulp does.
+
+```js
+var gulp = require('gulp');
+var coffee = require('gulp-coffee');
+var concat = require('gulp-concat');
+var uglify = require('gulp-uglify');
+var imagemin = require('gulp-imagemin');
+var sourcemaps = require('gulp-sourcemaps');
+var del = require('del');
+
+var paths = {
+ scripts: ['client/js/**/*.coffee', '!client/external/**/*.coffee'],
+ images: 'client/img/**/*'
+};
+
+// Not all tasks need to use streams
+// A gulpfile is just another node program and you can use any package available on npm
+gulp.task('clean', function() {
+ // You can use multiple globbing patterns as you would with `gulp.src`
+ return del(['build']);
+});
+
+gulp.task('scripts', ['clean'], function() {
+ // Minify and copy all JavaScript (except vendor scripts)
+ // with sourcemaps all the way down
+ return gulp.src(paths.scripts)
+ .pipe(sourcemaps.init())
+ .pipe(coffee())
+ .pipe(uglify())
+ .pipe(concat('all.min.js'))
+ .pipe(sourcemaps.write())
+ .pipe(gulp.dest('build/js'));
+});
+
+// Copy all static images
+gulp.task('images', ['clean'], function() {
+ return gulp.src(paths.images)
+ // Pass in options to the task
+ .pipe(imagemin({optimizationLevel: 5}))
+ .pipe(gulp.dest('build/img'));
+});
+
+// Rerun the task when a file changes
+gulp.task('watch', function() {
+ gulp.watch(paths.scripts, ['scripts']);
+ gulp.watch(paths.images, ['images']);
+});
+
+// The default task (called when you run `gulp` from cli)
+gulp.task('default', ['watch', 'scripts', 'images']);
+```
+
+## Incremental Builds
+
+We recommend these plugins:
+
+- [gulp-changed](https://github.com/sindresorhus/gulp-changed) - only pass through changed files
+- [gulp-cached](https://github.com/contra/gulp-cached) - in-memory file cache, not for operation on sets of files
+- [gulp-remember](https://github.com/ahaurw01/gulp-remember) - pairs nicely with gulp-cached
+- [gulp-newer](https://github.com/tschaub/gulp-newer) - pass through newer source files only, supports many:1 source:dest
+
+## Want to contribute?
+
+Anyone can help make this project better - check out our [Contributing guide](/CONTRIBUTING.md)!
+
+[downloads-image]: https://img.shields.io/npm/dm/gulp.svg
+[npm-url]: https://www.npmjs.com/package/gulp
+[npm-image]: https://img.shields.io/npm/v/gulp.svg
+
+[travis-url]: https://travis-ci.org/gulpjs/gulp
+[travis-image]: https://img.shields.io/travis/gulpjs/gulp.svg
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/gulp
+[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
diff --git a/source/node_modules/gulp/bin/gulp.js b/source/node_modules/gulp/bin/gulp.js
new file mode 100755
index 000000000..a5374c111
--- /dev/null
+++ b/source/node_modules/gulp/bin/gulp.js
@@ -0,0 +1,212 @@
+#!/usr/bin/env node
+
+'use strict';
+var gutil = require('gulp-util');
+var prettyTime = require('pretty-hrtime');
+var chalk = require('chalk');
+var semver = require('semver');
+var archy = require('archy');
+var Liftoff = require('liftoff');
+var tildify = require('tildify');
+var interpret = require('interpret');
+var v8flags = require('v8flags');
+var completion = require('../lib/completion');
+var argv = require('minimist')(process.argv.slice(2));
+var taskTree = require('../lib/taskTree');
+
+// Set env var for ORIGINAL cwd
+// before anything touches it
+process.env.INIT_CWD = process.cwd();
+
+var cli = new Liftoff({
+ name: 'gulp',
+ completions: completion,
+ extensions: interpret.jsVariants,
+ v8flags: v8flags,
+});
+
+// Exit with 0 or 1
+var failed = false;
+process.once('exit', function(code) {
+ if (code === 0 && failed) {
+ process.exit(1);
+ }
+});
+
+// Parse those args m8
+var cliPackage = require('../package');
+var versionFlag = argv.v || argv.version;
+var tasksFlag = argv.T || argv.tasks;
+var tasks = argv._;
+var toRun = tasks.length ? tasks : ['default'];
+
+// This is a hold-over until we have a better logging system
+// with log levels
+var simpleTasksFlag = argv['tasks-simple'];
+var shouldLog = !argv.silent && !simpleTasksFlag;
+
+if (!shouldLog) {
+ gutil.log = function() {};
+}
+
+cli.on('require', function(name) {
+ gutil.log('Requiring external module', chalk.magenta(name));
+});
+
+cli.on('requireFail', function(name) {
+ gutil.log(chalk.red('Failed to load external module'), chalk.magenta(name));
+});
+
+cli.on('respawn', function(flags, child) {
+ var nodeFlags = chalk.magenta(flags.join(', '));
+ var pid = chalk.magenta(child.pid);
+ gutil.log('Node flags detected:', nodeFlags);
+ gutil.log('Respawned to PID:', pid);
+});
+
+cli.launch({
+ cwd: argv.cwd,
+ configPath: argv.gulpfile,
+ require: argv.require,
+ completion: argv.completion,
+}, handleArguments);
+
+// The actual logic
+function handleArguments(env) {
+ if (versionFlag && tasks.length === 0) {
+ gutil.log('CLI version', cliPackage.version);
+ if (env.modulePackage && typeof env.modulePackage.version !== 'undefined') {
+ gutil.log('Local version', env.modulePackage.version);
+ }
+ process.exit(0);
+ }
+
+ if (!env.modulePath) {
+ gutil.log(
+ chalk.red('Local gulp not found in'),
+ chalk.magenta(tildify(env.cwd))
+ );
+ gutil.log(chalk.red('Try running: npm install gulp'));
+ process.exit(1);
+ }
+
+ if (!env.configPath) {
+ gutil.log(chalk.red('No gulpfile found'));
+ process.exit(1);
+ }
+
+ // Check for semver difference between cli and local installation
+ if (semver.gt(cliPackage.version, env.modulePackage.version)) {
+ gutil.log(chalk.red('Warning: gulp version mismatch:'));
+ gutil.log(chalk.red('Global gulp is', cliPackage.version));
+ gutil.log(chalk.red('Local gulp is', env.modulePackage.version));
+ }
+
+ // Chdir before requiring gulpfile to make sure
+ // we let them chdir as needed
+ if (process.cwd() !== env.cwd) {
+ process.chdir(env.cwd);
+ gutil.log(
+ 'Working directory changed to',
+ chalk.magenta(tildify(env.cwd))
+ );
+ }
+
+ // This is what actually loads up the gulpfile
+ require(env.configPath);
+ gutil.log('Using gulpfile', chalk.magenta(tildify(env.configPath)));
+
+ var gulpInst = require(env.modulePath);
+ logEvents(gulpInst);
+
+ process.nextTick(function() {
+ if (simpleTasksFlag) {
+ return logTasksSimple(env, gulpInst);
+ }
+ if (tasksFlag) {
+ return logTasks(env, gulpInst);
+ }
+ gulpInst.start.apply(gulpInst, toRun);
+ });
+}
+
+function logTasks(env, localGulp) {
+ var tree = taskTree(localGulp.tasks);
+ tree.label = 'Tasks for ' + chalk.magenta(tildify(env.configPath));
+ archy(tree)
+ .split('\n')
+ .forEach(function(v) {
+ if (v.trim().length === 0) {
+ return;
+ }
+ gutil.log(v);
+ });
+}
+
+function logTasksSimple(env, localGulp) {
+ console.log(Object.keys(localGulp.tasks)
+ .join('\n')
+ .trim());
+}
+
+// Format orchestrator errors
+function formatError(e) {
+ if (!e.err) {
+ return e.message;
+ }
+
+ // PluginError
+ if (typeof e.err.showStack === 'boolean') {
+ return e.err.toString();
+ }
+
+ // Normal error
+ if (e.err.stack) {
+ return e.err.stack;
+ }
+
+ // Unknown (string, number, etc.)
+ return new Error(String(e.err)).stack;
+}
+
+// Wire up logging events
+function logEvents(gulpInst) {
+
+ // Total hack due to poor error management in orchestrator
+ gulpInst.on('err', function() {
+ failed = true;
+ });
+
+ gulpInst.on('task_start', function(e) {
+ // TODO: batch these
+ // so when 5 tasks start at once it only logs one time with all 5
+ gutil.log('Starting', '\'' + chalk.cyan(e.task) + '\'...');
+ });
+
+ gulpInst.on('task_stop', function(e) {
+ var time = prettyTime(e.hrDuration);
+ gutil.log(
+ 'Finished', '\'' + chalk.cyan(e.task) + '\'',
+ 'after', chalk.magenta(time)
+ );
+ });
+
+ gulpInst.on('task_err', function(e) {
+ var msg = formatError(e);
+ var time = prettyTime(e.hrDuration);
+ gutil.log(
+ '\'' + chalk.cyan(e.task) + '\'',
+ chalk.red('errored after'),
+ chalk.magenta(time)
+ );
+ gutil.log(msg);
+ });
+
+ gulpInst.on('task_not_found', function(err) {
+ gutil.log(
+ chalk.red('Task \'' + err.task + '\' is not in your gulpfile')
+ );
+ gutil.log('Please check the documentation for proper gulpfile formatting');
+ process.exit(1);
+ });
+}
diff --git a/source/node_modules/gulp/completion/README.md b/source/node_modules/gulp/completion/README.md
new file mode 100644
index 000000000..c0e8c9133
--- /dev/null
+++ b/source/node_modules/gulp/completion/README.md
@@ -0,0 +1,20 @@
+# Completion for gulp
+> Thanks to grunt team and Tyler Kellen
+
+To enable tasks auto-completion in shell you should add `eval "$(gulp --completion=shell)"` in your `.shellrc` file.
+
+## Bash
+
+Add `eval "$(gulp --completion=bash)"` to `~/.bashrc`.
+
+## Zsh
+
+Add `eval "$(gulp --completion=zsh)"` to `~/.zshrc`.
+
+## Powershell
+
+Add `Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)` to `$PROFILE`.
+
+## Fish
+
+Add `gulp --completion=fish | source` to `~/.config/fish/config.fish`.
diff --git a/source/node_modules/gulp/completion/bash b/source/node_modules/gulp/completion/bash
new file mode 100644
index 000000000..704c27c13
--- /dev/null
+++ b/source/node_modules/gulp/completion/bash
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Borrowed from grunt-cli
+# http://gruntjs.com/
+#
+# Copyright (c) 2012 Tyler Kellen, contributors
+# Licensed under the MIT license.
+# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
+
+# Usage:
+#
+# To enable bash completion for gulp, add the following line (minus the
+# leading #, which is the bash comment character) to your ~/.bashrc file:
+#
+# eval "$(gulp --completion=bash)"
+
+# Enable bash autocompletion.
+function _gulp_completions() {
+ # The currently-being-completed word.
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ #Grab tasks
+ local compls=$(gulp --tasks-simple)
+ # Tell complete what stuff to show.
+ COMPREPLY=($(compgen -W "$compls" -- "$cur"))
+}
+
+complete -o default -F _gulp_completions gulp
diff --git a/source/node_modules/gulp/completion/fish b/source/node_modules/gulp/completion/fish
new file mode 100644
index 000000000..f27f2248b
--- /dev/null
+++ b/source/node_modules/gulp/completion/fish
@@ -0,0 +1,10 @@
+#!/usr/bin/env fish
+
+# Usage:
+#
+# To enable fish completion for gulp, add the following line to
+# your ~/.config/fish/config.fish file:
+#
+# gulp --completion=fish | source
+
+complete -c gulp -a "(gulp --tasks-simple)" -f
diff --git a/source/node_modules/gulp/completion/powershell b/source/node_modules/gulp/completion/powershell
new file mode 100644
index 000000000..08ec4382e
--- /dev/null
+++ b/source/node_modules/gulp/completion/powershell
@@ -0,0 +1,61 @@
+# Copyright (c) 2014 Jason Jarrett
+#
+# Tab completion for the `gulp`
+#
+# Usage:
+#
+# To enable powershell completion for gulp you need to be running
+# at least PowerShell v3 or greater and add the below to your $PROFILE
+#
+# Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)
+#
+#
+
+$gulp_completion_Process = {
+ param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
+
+
+ # Load up an assembly to read the gulpfile's sha1
+ if(-not $global:GulpSHA1Managed) {
+ [Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null
+ $global:GulpSHA1Managed = new-Object System.Security.Cryptography.SHA1Managed
+ }
+
+ # setup a global (in-memory) cache
+ if(-not $global:GulpfileShaCache) {
+ $global:GulpfileShaCache = @{};
+ }
+
+ $cache = $global:GulpfileShaCache;
+
+ # Get the gulpfile's sha1
+ $sha1gulpFile = (resolve-path gulpfile.js -ErrorAction Ignore | %{
+ $file = [System.IO.File]::Open($_.Path, "open", "read")
+ [string]::join('', ($global:GulpSHA1Managed.ComputeHash($file) | %{ $_.ToString("x2") }))
+ $file.Dispose()
+ })
+
+ # lookup the sha1 for previously cached task lists.
+ if($cache.ContainsKey($sha1gulpFile)){
+ $tasks = $cache[$sha1gulpFile];
+ } else {
+ $tasks = (gulp --tasks-simple).split("`n");
+ $cache[$sha1gulpFile] = $tasks;
+ }
+
+
+ $tasks |
+ where { $_.startswith($commandName) }
+ Sort-Object |
+ foreach { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', ('{0}' -f $_) }
+}
+
+if (-not $global:options) {
+ $global:options = @{
+ CustomArgumentCompleters = @{};
+ NativeArgumentCompleters = @{}
+ }
+}
+
+$global:options['NativeArgumentCompleters']['gulp'] = $gulp_completion_Process
+$function:tabexpansion2 = $function:tabexpansion2 -replace 'End\r\n{','End { if ($null -ne $options) { $options += $global:options} else {$options = $global:options}'
diff --git a/source/node_modules/gulp/completion/zsh b/source/node_modules/gulp/completion/zsh
new file mode 100644
index 000000000..8169b22d7
--- /dev/null
+++ b/source/node_modules/gulp/completion/zsh
@@ -0,0 +1,25 @@
+#!/bin/zsh
+
+# Borrowed from grunt-cli
+# http://gruntjs.com/
+#
+# Copyright (c) 2012 Tyler Kellen, contributors
+# Licensed under the MIT license.
+# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
+
+# Usage:
+#
+# To enable zsh completion for gulp, add the following line (minus the
+# leading #, which is the zsh comment character) to your ~/.zshrc file:
+#
+# eval "$(gulp --completion=zsh)"
+
+# Enable zsh autocompletion.
+function _gulp_completion() {
+ # Grab tasks
+ compls=$(gulp --tasks-simple)
+ completions=(${=compls})
+ compadd -- $completions
+}
+
+compdef _gulp_completion gulp
diff --git a/source/node_modules/gulp/gulp.1 b/source/node_modules/gulp/gulp.1
new file mode 100644
index 000000000..49ccc25e6
--- /dev/null
+++ b/source/node_modules/gulp/gulp.1
@@ -0,0 +1,40 @@
+.TH "GULP" "" "February 2016" "" ""
+.SH "NAME"
+\fBgulp\fR
+.SH gulp CLI docs
+.SS Flags
+.P
+gulp has very few flags to know about\. All other flags are for tasks to use if needed\.
+.RS 0
+.IP \(bu 2
+\fB\-v\fP or \fB\-\-version\fP will display the global and local gulp versions
+.IP \(bu 2
+\fB\-\-require \fP will require a module before running the gulpfile\. This is useful for transpilers but also has other applications\. You can use multiple \fB\-\-require\fP flags
+.IP \(bu 2
+\fB\-\-gulpfile \fP will manually set path of gulpfile\. Useful if you have multiple gulpfiles\. This will set the CWD to the gulpfile directory as well
+.IP \(bu 2
+\fB\-\-cwd \fP will manually set the CWD\. The search for the gulpfile, as well as the relativity of all requires will be from here
+.IP \(bu 2
+\fB\-T\fP or \fB\-\-tasks\fP will display the task dependency tree for the loaded gulpfile
+.IP \(bu 2
+\fB\-\-tasks\-simple\fP will display a plaintext list of tasks for the loaded gulpfile
+.IP \(bu 2
+\fB\-\-color\fP will force gulp and gulp plugins to display colors even when no color support is detected
+.IP \(bu 2
+\fB\-\-no\-color\fP will force gulp and gulp plugins to not display colors even when color support is detected
+.IP \(bu 2
+\fB\-\-silent\fP will disable all gulp logging
+
+.RE
+.P
+The CLI adds process\.env\.INIT_CWD which is the original cwd it was launched from\.
+.SS Task specific flags
+.P
+Refer to this StackOverflow \fIhttp://stackoverflow\.com/questions/23023650/is\-it\-possible\-to\-pass\-a\-flag\-to\-gulp\-to\-have\-it\-run\-tasks\-in\-different\-ways\fR link for how to add task specific flags
+.SS Tasks
+.P
+Tasks can be executed by running \fBgulp \fP\|\. Just running \fBgulp\fP will execute the task you registered called \fBdefault\fP\|\. If there is no \fBdefault\fP task gulp will error\.
+.SS Compilers
+.P
+You can find a list of supported languages at interpret \fIhttps://github\.com/tkellen/node\-interpret#jsvariants\fR\|\. If you would like to add support for a new language send pull request/open issues there\.
+
diff --git a/source/node_modules/gulp/index.js b/source/node_modules/gulp/index.js
new file mode 100644
index 000000000..42bc69b3d
--- /dev/null
+++ b/source/node_modules/gulp/index.js
@@ -0,0 +1,63 @@
+'use strict';
+
+var util = require('util');
+var Orchestrator = require('orchestrator');
+var gutil = require('gulp-util');
+var deprecated = require('deprecated');
+var vfs = require('vinyl-fs');
+
+function Gulp() {
+ Orchestrator.call(this);
+}
+util.inherits(Gulp, Orchestrator);
+
+Gulp.prototype.task = Gulp.prototype.add;
+Gulp.prototype.run = function() {
+ // `run()` is deprecated as of 3.5 and will be removed in 4.0
+ // Use task dependencies instead
+
+ // Impose our opinion of "default" tasks onto orchestrator
+ var tasks = arguments.length ? arguments : ['default'];
+
+ this.start.apply(this, tasks);
+};
+
+Gulp.prototype.src = vfs.src;
+Gulp.prototype.dest = vfs.dest;
+Gulp.prototype.watch = function(glob, opt, fn) {
+ if (typeof opt === 'function' || Array.isArray(opt)) {
+ fn = opt;
+ opt = null;
+ }
+
+ // Array of tasks given
+ if (Array.isArray(fn)) {
+ return vfs.watch(glob, opt, function() {
+ this.start.apply(this, fn);
+ }.bind(this));
+ }
+
+ return vfs.watch(glob, opt, fn);
+};
+
+// Let people use this class from our instance
+Gulp.prototype.Gulp = Gulp;
+
+// Deprecations
+deprecated.field('gulp.env has been deprecated. ' +
+ 'Use your own CLI parser instead. ' +
+ 'We recommend using yargs or minimist.',
+ console.warn,
+ Gulp.prototype,
+ 'env',
+ gutil.env
+);
+
+Gulp.prototype.run = deprecated.method('gulp.run() has been deprecated. ' +
+ 'Use task dependencies or gulp.watch task triggering instead.',
+ console.warn,
+ Gulp.prototype.run
+);
+
+var inst = new Gulp();
+module.exports = inst;
diff --git a/source/node_modules/gulp/lib/completion.js b/source/node_modules/gulp/lib/completion.js
new file mode 100644
index 000000000..7000250b4
--- /dev/null
+++ b/source/node_modules/gulp/lib/completion.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+
+module.exports = function(name) {
+ if (typeof name !== 'string') {
+ throw new Error('Missing completion type');
+ }
+ var file = path.join(__dirname, '../completion', name);
+ try {
+ console.log(fs.readFileSync(file, 'utf8'));
+ process.exit(0);
+ } catch (err) {
+ console.log(
+ 'echo "gulp autocompletion rules for',
+ '\'' + name + '\'',
+ 'not found"'
+ );
+ process.exit(5);
+ }
+};
diff --git a/source/node_modules/gulp/lib/taskTree.js b/source/node_modules/gulp/lib/taskTree.js
new file mode 100644
index 000000000..accb1a77f
--- /dev/null
+++ b/source/node_modules/gulp/lib/taskTree.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function(tasks) {
+ return Object.keys(tasks)
+ .reduce(function(prev, task) {
+ prev.nodes.push({
+ label: task,
+ nodes: tasks[task].dep,
+ });
+ return prev;
+ }, {
+ nodes: [],
+ });
+};
diff --git a/source/node_modules/gulp/node_modules/.bin/semver b/source/node_modules/gulp/node_modules/.bin/semver
new file mode 120000
index 000000000..317eb293d
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver
\ No newline at end of file
diff --git a/source/node_modules/gulp/node_modules/semver/.npmignore b/source/node_modules/gulp/node_modules/semver/.npmignore
new file mode 100644
index 000000000..534108e3f
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/.npmignore
@@ -0,0 +1,4 @@
+node_modules/
+coverage/
+.nyc_output/
+nyc_output/
diff --git a/source/node_modules/gulp/node_modules/semver/.travis.yml b/source/node_modules/gulp/node_modules/semver/.travis.yml
new file mode 100644
index 000000000..991d04b6e
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'iojs'
diff --git a/source/node_modules/gulp/node_modules/semver/LICENSE b/source/node_modules/gulp/node_modules/semver/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/gulp/node_modules/semver/Makefile b/source/node_modules/gulp/node_modules/semver/Makefile
new file mode 100644
index 000000000..71af0e975
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/Makefile
@@ -0,0 +1,24 @@
+files = semver.browser.js \
+ semver.min.js \
+ semver.browser.js.gz \
+ semver.min.js.gz
+
+all: $(files)
+
+clean:
+ rm -f $(files)
+
+semver.browser.js: head.js.txt semver.js foot.js.txt
+ ( cat head.js.txt; \
+ cat semver.js | \
+ egrep -v '^ *\/\* nomin \*\/' | \
+ perl -pi -e 's/debug\([^\)]+\)//g'; \
+ cat foot.js.txt ) > semver.browser.js
+
+semver.min.js: semver.browser.js
+ uglifyjs -m semver.min.js
+
+%.gz: %
+ gzip --stdout -9 <$< >$@
+
+.PHONY: all clean
diff --git a/source/node_modules/gulp/node_modules/semver/README.md b/source/node_modules/gulp/node_modules/semver/README.md
new file mode 100644
index 000000000..b5e35ff0b
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/README.md
@@ -0,0 +1,303 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Usage
+
+ $ npm install semver
+
+ semver.valid('1.2.3') // '1.2.3'
+ semver.valid('a.b.c') // null
+ semver.clean(' =v1.2.3 ') // '1.2.3'
+ semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+ semver.gt('1.2.3', '9.8.7') // false
+ semver.lt('1.2.3', '9.8.7') // true
+
+As a command-line utility:
+
+ $ semver -h
+
+ Usage: semver [ [...]] [-r | -i | --preid | -l | -rv]
+ Test if version(s) satisfy the supplied range(s), and sort them.
+
+ Multiple versions or ranges may be supplied, unless increment
+ option is specified. In that case, only a single version may
+ be used, and it is incremented by the specified level
+
+ Program exits successfully if any valid version satisfies
+ all supplied ranges, and prints all satisfying versions.
+
+ If no versions are valid, or ranges are not satisfied,
+ then exits failure.
+
+ Versions are printed in ascending order, so supplying
+ multiple versions to the utility will just sort them.
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+ .
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+> semver.inc('1.2.3', 'pre', 'beta')
+'1.2.4-beta.0'
+```
+
+command-line example:
+
+```shell
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```shell
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero digit in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+## Functions
+
+All methods and classes take a final `loose` boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
diff --git a/source/node_modules/gulp/node_modules/semver/bin/semver b/source/node_modules/gulp/node_modules/semver/bin/semver
new file mode 100755
index 000000000..c5f2e857e
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/bin/semver
@@ -0,0 +1,133 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+ , versions = []
+ , range = []
+ , gt = []
+ , lt = []
+ , eq = []
+ , inc = null
+ , version = require("../package.json").version
+ , loose = false
+ , identifier = undefined
+ , semver = require("../semver")
+ , reverse = false
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var i = a.indexOf('=')
+ if (i !== -1) {
+ a = a.slice(0, i)
+ argv.unshift(a.slice(i + 1))
+ }
+ switch (a) {
+ case "-rv": case "-rev": case "--rev": case "--reverse":
+ reverse = true
+ break
+ case "-l": case "--loose":
+ loose = true
+ break
+ case "-v": case "--version":
+ versions.push(argv.shift())
+ break
+ case "-i": case "--inc": case "--increment":
+ switch (argv[0]) {
+ case "major": case "minor": case "patch": case "prerelease":
+ case "premajor": case "preminor": case "prepatch":
+ inc = argv.shift()
+ break
+ default:
+ inc = "patch"
+ break
+ }
+ break
+ case "--preid":
+ identifier = argv.shift()
+ break
+ case "-r": case "--range":
+ range.push(argv.shift())
+ break
+ case "-h": case "--help": case "-?":
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ versions = versions.filter(function (v) {
+ return semver.valid(v, loose)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length))
+ return failInc()
+
+ for (var i = 0, l = range.length; i < l ; i ++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], loose)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error("--inc can only be used on a single version with no range")
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? "rcompare" : "compare"
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, loose)
+ }).map(function (v) {
+ return semver.clean(v, loose)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, loose, identifier) : v
+ }).forEach(function (v,i,_) { console.log(v) })
+}
+
+function help () {
+ console.log(["SemVer " + version
+ ,""
+ ,"A JavaScript implementation of the http://semver.org/ specification"
+ ,"Copyright Isaac Z. Schlueter"
+ ,""
+ ,"Usage: semver [options] [ [...]]"
+ ,"Prints valid versions sorted by SemVer precedence"
+ ,""
+ ,"Options:"
+ ,"-r --range "
+ ," Print versions that match the specified range."
+ ,""
+ ,"-i --increment []"
+ ," Increment a version by the specified level. Level can"
+ ," be one of: major, minor, patch, premajor, preminor,"
+ ," prepatch, or prerelease. Default level is 'patch'."
+ ," Only one version may be specified."
+ ,""
+ ,"--preid "
+ ," Identifier to be used to prefix premajor, preminor,"
+ ," prepatch or prerelease version increments."
+ ,""
+ ,"-l --loose"
+ ," Interpret versions and ranges loosely"
+ ,""
+ ,"Program exits successfully if any valid version satisfies"
+ ,"all supplied ranges, and prints all satisfying versions."
+ ,""
+ ,"If no satisfying versions are found, then exits failure."
+ ,""
+ ,"Versions are printed in ascending order, so supplying"
+ ,"multiple versions to the utility will just sort them."
+ ].join("\n"))
+}
diff --git a/source/node_modules/gulp/node_modules/semver/foot.js.txt b/source/node_modules/gulp/node_modules/semver/foot.js.txt
new file mode 100644
index 000000000..8f83c20f8
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/foot.js.txt
@@ -0,0 +1,6 @@
+
+})(
+ typeof exports === 'object' ? exports :
+ typeof define === 'function' && define.amd ? {} :
+ semver = {}
+);
diff --git a/source/node_modules/gulp/node_modules/semver/head.js.txt b/source/node_modules/gulp/node_modules/semver/head.js.txt
new file mode 100644
index 000000000..653686517
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/head.js.txt
@@ -0,0 +1,2 @@
+;(function(exports) {
+
diff --git a/source/node_modules/gulp/node_modules/semver/package.json b/source/node_modules/gulp/node_modules/semver/package.json
new file mode 100644
index 000000000..c49c20859
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/package.json
@@ -0,0 +1,81 @@
+{
+ "_args": [
+ [
+ "semver@^4.1.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp"
+ ]
+ ],
+ "_from": "semver@>=4.1.0 <5.0.0",
+ "_id": "semver@4.3.6",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gulp/semver",
+ "_nodeVersion": "2.0.1",
+ "_npmUser": {
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
+ },
+ "_npmVersion": "2.10.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "semver",
+ "raw": "semver@^4.1.0",
+ "rawSpec": "^4.1.0",
+ "scope": null,
+ "spec": ">=4.1.0 <5.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp"
+ ],
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
+ "_shasum": "300bc6e0e86374f7ba61068b5b1ecd57fc6532da",
+ "_shrinkwrap": null,
+ "_spec": "semver@^4.1.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp",
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "browser": "semver.browser.js",
+ "bugs": {
+ "url": "https://github.com/npm/node-semver/issues"
+ },
+ "dependencies": {},
+ "description": "The semantic version parser used by npm.",
+ "devDependencies": {
+ "tap": "^1.2.0",
+ "uglify-js": "~2.3.6"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "300bc6e0e86374f7ba61068b5b1ecd57fc6532da",
+ "tarball": "http://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
+ },
+ "gitHead": "63c48296ca5da3ba6a88c743bb8c92effc789811",
+ "homepage": "https://github.com/npm/node-semver#readme",
+ "license": "ISC",
+ "main": "semver.js",
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "min": "semver.min.js",
+ "name": "semver",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/npm/node-semver.git"
+ },
+ "scripts": {
+ "prepublish": "make",
+ "test": "tap test/*.js"
+ },
+ "version": "4.3.6"
+}
diff --git a/source/node_modules/gulp/node_modules/semver/semver.browser.js b/source/node_modules/gulp/node_modules/semver/semver.browser.js
new file mode 100644
index 000000000..4b0cfecf2
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/semver.browser.js
@@ -0,0 +1,1201 @@
+;(function(exports) {
+
+// export the class if we are in a Node-like system.
+if (typeof module === 'object' && module.exports === exports)
+ exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
+var tildeTrimReplace = '$1~';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++;
+src[LONECARET] = '(?:\\^)';
+
+var CARETTRIM = R++;
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
+var caretTrimReplace = '$1^';
+
+var CARET = R++;
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
+var CARETLOOSE = R++;
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+var comparatorTrimReplace = '$1$2$3';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ ;
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
+ var r = loose ? re[LOOSE] : re[FULL];
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
+
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ ;
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num
+ }
+ return id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ ;
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.length && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ ;
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
+ this.major++;
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0)
+ this.minor++;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0)
+ this.patch++;
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.diff = diff;
+function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ if (v1.prerelease.length || v2.prerelease.length) {
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return 'pre'+key;
+ }
+ }
+ }
+ return 'prerelease';
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return key;
+ }
+ }
+ }
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.major = major;
+function major(a, loose) {
+ return new SemVer(a, loose).major;
+}
+
+exports.minor = minor;
+function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+}
+
+exports.patch = patch;
+function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a === b;
+ break;
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a !== b;
+ break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ ;
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+
+ ;
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ if (this.operator === '=')
+ this.operator = '';
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else
+ this.semver = new SemVer(m[2], this.loose);
+};
+
+Comparator.prototype.inspect = function() {
+ return '';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ ;
+
+ if (this.semver === ANY)
+ return true;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ return cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ ;
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ ;
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ ;
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ ;
+ comp = replaceCarets(comp, loose);
+ ;
+ comp = replaceTildes(comp, loose);
+ ;
+ comp = replaceXRanges(comp, loose);
+ ;
+ comp = replaceStars(comp, loose);
+ ;
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ ;
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else if (pr) {
+ ;
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+
+ ;
+ return ret;
+ });
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceCaret(comp, loose);
+ }).join(' ');
+}
+
+function replaceCaret(comp, loose) {
+ ;
+ var r = loose ? re[CARETLOOSE] : re[CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ ;
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p)) {
+ if (M === '0')
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ } else if (pr) {
+ ;
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + (+M + 1) + '.0.0';
+ } else {
+ ;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0';
+ }
+
+ ;
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ ;
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ ;
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // replace X with 0
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm)
+ M = +M + 1
+ else
+ m = +m + 1
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ ;
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ ;
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+
+ if (version.prerelease.length) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (var i = 0; i < set.length; i++) {
+ ;
+ if (set[i].semver === ANY)
+ continue;
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch)
+ return true;
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false;
+ }
+
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return rcompare(a, b, loose);
+ })[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr;
+function ltr(version, range, loose) {
+ return outside(version, range, '<', loose);
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr;
+function gtr(version, range, loose) {
+ return outside(version, range, '>', loose);
+}
+
+exports.outside = outside;
+function outside(version, range, hilo, loose) {
+ version = new SemVer(version, loose);
+ range = new Range(range, loose);
+
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, loose)) {
+ return false;
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+
+ var high = null;
+ var low = null;
+
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, loose)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, loose)) {
+ low = comparator;
+ }
+ });
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+// Use the define() function if we're in AMD land
+if (typeof define === 'function' && define.amd)
+ define(exports);
+
+})(
+ typeof exports === 'object' ? exports :
+ typeof define === 'function' && define.amd ? {} :
+ semver = {}
+);
diff --git a/source/node_modules/gulp/node_modules/semver/semver.browser.js.gz b/source/node_modules/gulp/node_modules/semver/semver.browser.js.gz
new file mode 100644
index 000000000..d67009d8a
Binary files /dev/null and b/source/node_modules/gulp/node_modules/semver/semver.browser.js.gz differ
diff --git a/source/node_modules/gulp/node_modules/semver/semver.js b/source/node_modules/gulp/node_modules/semver/semver.js
new file mode 100644
index 000000000..cafcc006b
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/semver.js
@@ -0,0 +1,1205 @@
+// export the class if we are in a Node-like system.
+if (typeof module === 'object' && module.exports === exports)
+ exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
+var tildeTrimReplace = '$1~';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++;
+src[LONECARET] = '(?:\\^)';
+
+var CARETTRIM = R++;
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
+var caretTrimReplace = '$1^';
+
+var CARET = R++;
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
+var CARETLOOSE = R++;
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+var comparatorTrimReplace = '$1$2$3';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
+ var r = loose ? re[LOOSE] : re[FULL];
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
+
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num
+ }
+ return id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.length && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
+ this.major++;
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0)
+ this.minor++;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0)
+ this.patch++;
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.diff = diff;
+function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ if (v1.prerelease.length || v2.prerelease.length) {
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return 'pre'+key;
+ }
+ }
+ }
+ return 'prerelease';
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return key;
+ }
+ }
+ }
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.major = major;
+function major(a, loose) {
+ return new SemVer(a, loose).major;
+}
+
+exports.minor = minor;
+function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+}
+
+exports.patch = patch;
+function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a === b;
+ break;
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a !== b;
+ break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+
+ debug('comp', this);
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ if (this.operator === '=')
+ this.operator = '';
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else
+ this.semver = new SemVer(m[2], this.loose);
+};
+
+Comparator.prototype.inspect = function() {
+ return '';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+
+ if (this.semver === ANY)
+ return true;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ return cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range, re[COMPARATORTRIM]);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceCarets(comp, loose);
+ debug('caret', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceCaret(comp, loose);
+ }).join(' ');
+}
+
+function replaceCaret(comp, loose) {
+ debug('caret', comp, loose);
+ var r = loose ? re[CARETLOOSE] : re[CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p)) {
+ if (M === '0')
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ } else if (pr) {
+ debug('replaceCaret pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + (+M + 1) + '.0.0';
+ } else {
+ debug('no pr');
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0';
+ }
+
+ debug('caret return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // replace X with 0
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm)
+ M = +M + 1
+ else
+ m = +m + 1
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+
+ if (version.prerelease.length) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (var i = 0; i < set.length; i++) {
+ debug(set[i].semver);
+ if (set[i].semver === ANY)
+ continue;
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch)
+ return true;
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false;
+ }
+
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return rcompare(a, b, loose);
+ })[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr;
+function ltr(version, range, loose) {
+ return outside(version, range, '<', loose);
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr;
+function gtr(version, range, loose) {
+ return outside(version, range, '>', loose);
+}
+
+exports.outside = outside;
+function outside(version, range, hilo, loose) {
+ version = new SemVer(version, loose);
+ range = new Range(range, loose);
+
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, loose)) {
+ return false;
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+
+ var high = null;
+ var low = null;
+
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, loose)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, loose)) {
+ low = comparator;
+ }
+ });
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+// Use the define() function if we're in AMD land
+if (typeof define === 'function' && define.amd)
+ define(exports);
diff --git a/source/node_modules/gulp/node_modules/semver/semver.min.js b/source/node_modules/gulp/node_modules/semver/semver.min.js
new file mode 100644
index 000000000..dea027b11
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/semver.min.js
@@ -0,0 +1 @@
+(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=K;e.SEMVER_SPEC_VERSION="2.0.0";var r=256;var t=Number.MAX_SAFE_INTEGER||9007199254740991;var n=e.re=[];var i=e.src=[];var s=0;var o=s++;i[o]="0|[1-9]\\d*";var a=s++;i[a]="[0-9]+";var f=s++;i[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;i[u]="("+i[o]+")\\."+"("+i[o]+")\\."+"("+i[o]+")";var l=s++;i[l]="("+i[a]+")\\."+"("+i[a]+")\\."+"("+i[a]+")";var p=s++;i[p]="(?:"+i[o]+"|"+i[f]+")";var c=s++;i[c]="(?:"+i[a]+"|"+i[f]+")";var h=s++;i[h]="(?:-("+i[p]+"(?:\\."+i[p]+")*))";var v=s++;i[v]="(?:-?("+i[c]+"(?:\\."+i[c]+")*))";var m=s++;i[m]="[0-9A-Za-z-]+";var g=s++;i[g]="(?:\\+("+i[m]+"(?:\\."+i[m]+")*))";var w=s++;var y="v?"+i[u]+i[h]+"?"+i[g]+"?";i[w]="^"+y+"$";var d="[v=\\s]*"+i[l]+i[v]+"?"+i[g]+"?";var j=s++;i[j]="^"+d+"$";var b=s++;i[b]="((?:<|>)?=?)";var E=s++;i[E]=i[a]+"|x|X|\\*";var $=s++;i[$]=i[o]+"|x|X|\\*";var k=s++;i[k]="[v=\\s]*("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:"+i[h]+")?"+i[g]+"?"+")?)?";var R=s++;i[R]="[v=\\s]*("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:"+i[v]+")?"+i[g]+"?"+")?)?";var S=s++;i[S]="^"+i[b]+"\\s*"+i[k]+"$";var x=s++;i[x]="^"+i[b]+"\\s*"+i[R]+"$";var I=s++;i[I]="(?:~>?)";var T=s++;i[T]="(\\s*)"+i[I]+"\\s+";n[T]=new RegExp(i[T],"g");var V="$1~";var A=s++;i[A]="^"+i[I]+i[k]+"$";var C=s++;i[C]="^"+i[I]+i[R]+"$";var M=s++;i[M]="(?:\\^)";var N=s++;i[N]="(\\s*)"+i[M]+"\\s+";n[N]=new RegExp(i[N],"g");var _="$1^";var z=s++;i[z]="^"+i[M]+i[k]+"$";var P=s++;i[P]="^"+i[M]+i[R]+"$";var X=s++;i[X]="^"+i[b]+"\\s*("+d+")$|^$";var Z=s++;i[Z]="^"+i[b]+"\\s*("+y+")$|^$";var q=s++;i[q]="(\\s*)"+i[b]+"\\s*("+d+"|"+i[k]+")";n[q]=new RegExp(i[q],"g");var L="$1$2$3";var F=s++;i[F]="^\\s*("+i[k]+")"+"\\s+-\\s+"+"("+i[k]+")"+"\\s*$";var G=s++;i[G]="^\\s*("+i[R]+")"+"\\s+-\\s+"+"("+i[R]+")"+"\\s*$";var O=s++;i[O]="(<|>)?=?\\s*\\*";for(var B=0;Br)return null;var i=t?n[j]:n[w];if(!i.test(e))return null;try{return new K(e,t)}catch(s){return null}}e.valid=H;function H(e,r){var t=D(e,r);return t?t.version:null}e.clean=J;function J(e,r){var t=D(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}e.SemVer=K;function K(e,i){if(e instanceof K){if(e.loose===i)return e;else e=e.version}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof K))return new K(e,i);this.loose=i;var s=e.trim().match(i?n[j]:n[w]);if(!s)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>t||this.major<0)throw new TypeError("Invalid major version");if(this.minor>t||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>t||this.patch<0)throw new TypeError("Invalid patch version");if(!s[4])this.prerelease=[];else this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r'};K.prototype.toString=function(){return this.version};K.prototype.compare=function(e){if(!(e instanceof K))e=new K(e,this.loose);return this.compareMain(e)||this.comparePre(e)};K.prototype.compareMain=function(e){if(!(e instanceof K))e=new K(e,this.loose);return Y(this.major,e.major)||Y(this.minor,e.minor)||Y(this.patch,e.patch)};K.prototype.comparePre=function(e){if(!(e instanceof K))e=new K(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Y(t,n)}while(++r)};K.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",r);this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1)this.prerelease.push(0)}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1]))this.prerelease=[r,0]}else this.prerelease=[r,0]}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=Q;function Q(e,r,t,n){if(typeof t==="string"){n=t;t=undefined}try{return new K(e,t).inc(r,n).version}catch(i){return null}}e.diff=U;function U(e,r){if(pr(e,r)){return null}else{var t=D(e);var n=D(r);if(t.prerelease.length||n.prerelease.length){for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return"pre"+i}}}return"prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return i}}}}}e.compareIdentifiers=Y;var W=/^[0-9]+$/;function Y(e,r){var t=W.test(e);var n=W.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=er;function er(e,r){return Y(r,e)}e.major=rr;function rr(e,r){return new K(e,r).major}e.minor=tr;function tr(e,r){return new K(e,r).minor}e.patch=nr;function nr(e,r){return new K(e,r).patch}e.compare=ir;function ir(e,r,t){return new K(e,t).compare(r)}e.compareLoose=sr;function sr(e,r){return ir(e,r,true)}e.rcompare=or;function or(e,r,t){return ir(r,e,t)}e.sort=ar;function ar(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=fr;function fr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=ur;function ur(e,r,t){return ir(e,r,t)>0}e.lt=lr;function lr(e,r,t){return ir(e,r,t)<0}e.eq=pr;function pr(e,r,t){return ir(e,r,t)===0}e.neq=cr;function cr(e,r,t){return ir(e,r,t)!==0}e.gte=hr;function hr(e,r,t){return ir(e,r,t)>=0}e.lte=vr;function vr(e,r,t){return ir(e,r,t)<=0}e.cmp=mr;function mr(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=pr(e,t,n);break;case"!=":i=cr(e,t,n);break;case">":i=ur(e,t,n);break;case">=":i=hr(e,t,n);break;case"<":i=lr(e,t,n);break;case"<=":i=vr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=gr;function gr(e,r){if(e instanceof gr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof gr))return new gr(e,r);this.loose=r;this.parse(e);if(this.semver===wr)this.value="";else this.value=this.operator+this.semver.version}var wr={};gr.prototype.parse=function(e){var r=this.loose?n[X]:n[Z];var t=e.match(r);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=t[1];if(this.operator==="=")this.operator="";if(!t[2])this.semver=wr;else this.semver=new K(t[2],this.loose)};gr.prototype.inspect=function(){return''};gr.prototype.toString=function(){return this.value};gr.prototype.test=function(e){if(this.semver===wr)return true;if(typeof e==="string")e=new K(e,this.loose);return mr(e,this.operator,this.semver,this.loose)};e.Range=yr;function yr(e,r){if(e instanceof yr&&e.loose===r)return e;if(!(this instanceof yr))return new yr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}yr.prototype.inspect=function(){return''};yr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};yr.prototype.toString=function(){return this.range};yr.prototype.parseRange=function(e){var r=this.loose;e=e.trim();var t=r?n[G]:n[F];e=e.replace(t,Tr);e=e.replace(n[q],L);e=e.replace(n[T],V);e=e.replace(n[N],_);e=e.split(/\s+/).join(" ");var i=r?n[X]:n[Z];var s=e.split(" ").map(function(e){return jr(e,r)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new gr(e,r)});return s};e.toComparators=dr;function dr(e,r){return new yr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function jr(e,r){e=kr(e,r);e=Er(e,r);e=Sr(e,r);e=Ir(e,r);return e}function br(e){return!e||e.toLowerCase()==="x"||e==="*"}function Er(e,r){return e.trim().split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,r){var t=r?n[C]:n[A];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function kr(e,r){return e.trim().split(/\s+/).map(function(e){return Rr(e,r)}).join(" ")}function Rr(e,r){var t=r?n[P]:n[z];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function Sr(e,r){return e.split(/\s+/).map(function(e){return xr(e,r)}).join(" ")}function xr(e,r){e=e.trim();var t=r?n[x]:n[S];return e.replace(t,function(e,r,t,n,i,s){var o=br(t);var a=o||br(n);var f=a||br(i);var u=f;if(r==="="&&u)r="";if(o){if(r===">"||r==="<"){e="<0.0.0"}else{e="*"}}else if(r&&u){if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}else if(r==="<="){r="<";if(a)t=+t+1;else n=+n+1}e=r+t+"."+n+"."+i}else if(a){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function Ir(e,r){return e.trim().replace(n[O],"")}function Tr(e,r,t,n,i,s,o,a,f,u,l,p,c){if(br(t))r="";else if(br(n))r=">="+t+".0.0";else if(br(i))r=">="+t+"."+n+".0";else r=">="+r;if(br(f))a="";else if(br(u))a="<"+(+f+1)+".0.0";else if(br(l))a="<"+f+"."+(+u+1)+".0";else if(p)a="<="+f+"."+u+"."+l+"-"+p;else a="<="+a;return(r+" "+a).trim()}yr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new K(e,this.loose);for(var r=0;r0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=Ar;function Ar(e,r,t){try{r=new yr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Cr;function Cr(e,r,t){return e.filter(function(e){return Ar(e,r,t)}).sort(function(e,r){return or(e,r,t)})[0]||null}e.validRange=Mr;function Mr(e,r){try{return new yr(e,r).range||"*"}catch(t){return null}}e.ltr=Nr;function Nr(e,r,t){return zr(e,r,"<",t)}e.gtr=_r;function _r(e,r,t){return zr(e,r,">",t)}e.outside=zr;function zr(e,r,t,n){e=new K(e,n);r=new yr(r,n);var i,s,o,a,f;switch(t){case">":i=ur;s=vr;o=lr;a=">";f=">=";break;case"<":i=lr;s=hr;o=ur;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ar(e,r,n)){return false}for(var u=0;u=0.0.0")}p=p||e;c=c||e;if(i(e.semver,p.semver,n)){p=e}else if(o(e.semver,c.semver,n)){c=e}});if(p.operator===a||p.operator===f){return false}if((!c.operator||c.operator===a)&&s(e,c.semver)){return false}else if(c.operator===f&&o(e,c.semver)){return false}}return true}if(typeof define==="function"&&define.amd)define(e)})(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={});
\ No newline at end of file
diff --git a/source/node_modules/gulp/node_modules/semver/semver.min.js.gz b/source/node_modules/gulp/node_modules/semver/semver.min.js.gz
new file mode 100644
index 000000000..cbbc16188
Binary files /dev/null and b/source/node_modules/gulp/node_modules/semver/semver.min.js.gz differ
diff --git a/source/node_modules/gulp/node_modules/semver/test/amd.js b/source/node_modules/gulp/node_modules/semver/test/amd.js
new file mode 100644
index 000000000..a6041341b
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/amd.js
@@ -0,0 +1,15 @@
+var tap = require('tap');
+var test = tap.test;
+
+test('amd', function(t) {
+ global.define = define;
+ define.amd = true;
+ var defined = null;
+ function define(stuff) {
+ defined = stuff;
+ }
+ var fromRequire = require('../');
+ t.ok(defined, 'amd function called');
+ t.equal(fromRequire, defined, 'amd stuff same as require stuff');
+ t.end();
+});
diff --git a/source/node_modules/gulp/node_modules/semver/test/big-numbers.js b/source/node_modules/gulp/node_modules/semver/test/big-numbers.js
new file mode 100644
index 000000000..c051864bc
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/big-numbers.js
@@ -0,0 +1,31 @@
+var test = require('tap').test
+var semver = require('../')
+
+test('long version is too long', function (t) {
+ var v = '1.2.' + new Array(256).join('1')
+ t.throws(function () {
+ new semver.SemVer(v)
+ })
+ t.equal(semver.valid(v, false), null)
+ t.equal(semver.valid(v, true), null)
+ t.equal(semver.inc(v, 'patch'), null)
+ t.end()
+})
+
+test('big number is like too long version', function (t) {
+ var v = '1.2.' + new Array(100).join('1')
+ t.throws(function () {
+ new semver.SemVer(v)
+ })
+ t.equal(semver.valid(v, false), null)
+ t.equal(semver.valid(v, true), null)
+ t.equal(semver.inc(v, 'patch'), null)
+ t.end()
+})
+
+test('parsing null does not throw', function (t) {
+ t.equal(semver.parse(null), null)
+ t.equal(semver.parse({}), null)
+ t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
+ t.end()
+})
diff --git a/source/node_modules/gulp/node_modules/semver/test/clean.js b/source/node_modules/gulp/node_modules/semver/test/clean.js
new file mode 100644
index 000000000..9e268de95
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/clean.js
@@ -0,0 +1,29 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var clean = semver.clean;
+
+test('\nclean tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.2.3', '1.2.3'],
+ [' 1.2.3 ', '1.2.3'],
+ [' 1.2.3-4 ', '1.2.3-4'],
+ [' 1.2.3-pre ', '1.2.3-pre'],
+ [' =v1.2.3 ', '1.2.3'],
+ ['v1.2.3', '1.2.3'],
+ [' v1.2.3 ', '1.2.3'],
+ ['\t1.2.3', '1.2.3'],
+ ['>1.2.3', null],
+ ['~1.2.3', null],
+ ['<=1.2.3', null],
+ ['1.2.x', null]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var msg = 'clean(' + range + ') = ' + version;
+ t.equal(clean(range), version, msg);
+ });
+ t.end();
+});
diff --git a/source/node_modules/gulp/node_modules/semver/test/gtr.js b/source/node_modules/gulp/node_modules/semver/test/gtr.js
new file mode 100644
index 000000000..bbb87896c
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/gtr.js
@@ -0,0 +1,173 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var gtr = semver.gtr;
+
+test('\ngtr tests', function(t) {
+ // [range, version, loose]
+ // Version should be greater than range
+ [
+ ['~1.2.2', '1.3.0'],
+ ['~0.6.1-1', '0.7.1-1'],
+ ['1.0.0 - 2.0.0', '2.0.1'],
+ ['1.0.0', '1.0.1-beta1'],
+ ['1.0.0', '2.0.0'],
+ ['<=2.0.0', '2.1.1'],
+ ['<=2.0.0', '3.2.9'],
+ ['<2.0.0', '2.0.0'],
+ ['0.1.20 || 1.2.4', '1.2.5'],
+ ['2.x.x', '3.0.0'],
+ ['1.2.x', '1.3.0'],
+ ['1.2.x || 2.x', '3.0.0'],
+ ['2.*.*', '5.0.1'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '4.0.0'],
+ ['2', '3.0.0'],
+ ['2.3', '2.4.2'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.5.5'],
+ ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
+ ['~1', '2.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.4'],
+ ['~> 1', '3.2.3'],
+ ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '1.1.0'],
+ ['<1.2', '1.2.0'],
+ ['< 1.2', '1.2.1'],
+ ['1', '2.0.0beta', true],
+ ['~v0.5.4-pre', '0.6.0'],
+ ['~v0.5.4-pre', '0.6.1-pre'],
+ ['=0.7.x', '0.8.0'],
+ ['=0.7.x', '0.8.0-asdf'],
+ ['<0.7.x', '0.7.0'],
+ ['~1.2.2', '1.3.0'],
+ ['1.0.0 - 2.0.0', '2.2.3'],
+ ['1.0.0', '1.0.1'],
+ ['<=2.0.0', '3.0.0'],
+ ['<=2.0.0', '2.9999.9999'],
+ ['<=2.0.0', '2.2.9'],
+ ['<2.0.0', '2.9999.9999'],
+ ['<2.0.0', '2.2.9'],
+ ['2.x.x', '3.1.3'],
+ ['1.2.x', '1.3.3'],
+ ['1.2.x || 2.x', '3.1.3'],
+ ['2.*.*', '3.1.3'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '3.1.3'],
+ ['2', '3.1.2'],
+ ['2.3', '2.4.1'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
+ ['~1', '2.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.3'],
+ ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
+ ['<1', '1.0.0'],
+ ['1', '2.0.0beta', true],
+ ['<1', '1.0.0beta', true],
+ ['< 1', '1.0.0beta', true],
+ ['=0.7.x', '0.8.2'],
+ ['<0.7.x', '0.7.2']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
+ t.ok(gtr(version, range, loose), msg);
+ });
+ t.end();
+});
+
+test('\nnegative gtr tests', function(t) {
+ // [range, version, loose]
+ // Version should NOT be greater than range
+ [
+ ['~0.6.1-1', '0.6.1-1'],
+ ['1.0.0 - 2.0.0', '1.2.3'],
+ ['1.0.0 - 2.0.0', '0.9.9'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0', true],
+ ['*', '1.2.3'],
+ ['*', 'v1.2.3-foo'],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97'],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['0.1.20 || >1.2.4', '1.2.4'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['0.1.20 || 1.2.4', '0.1.20'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '1.0.2'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['1', '1.0.0beta', true],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['<=0.7.x', '0.6.2'],
+ ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
+ ['>=0.2.3 <=0.2.4', '0.2.4'],
+ ['1.0.0 - 2.0.0', '2.0.0'],
+ ['^1', '0.0.0-0'],
+ ['^3.0.0', '2.0.0'],
+ ['^1.0.0 || ~2.0.1', '2.0.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
+ ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
+ t.notOk(gtr(version, range, loose), msg);
+ });
+ t.end();
+});
diff --git a/source/node_modules/gulp/node_modules/semver/test/index.js b/source/node_modules/gulp/node_modules/semver/test/index.js
new file mode 100644
index 000000000..c256c7947
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/index.js
@@ -0,0 +1,685 @@
+'use strict';
+
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var eq = semver.eq;
+var gt = semver.gt;
+var lt = semver.lt;
+var neq = semver.neq;
+var cmp = semver.cmp;
+var gte = semver.gte;
+var lte = semver.lte;
+var satisfies = semver.satisfies;
+var validRange = semver.validRange;
+var inc = semver.inc;
+var diff = semver.diff;
+var replaceStars = semver.replaceStars;
+var toComparators = semver.toComparators;
+var SemVer = semver.SemVer;
+var Range = semver.Range;
+
+test('\ncomparison tests', function(t) {
+ // [version1, version2]
+ // version1 should be greater than version2
+ [['0.0.0', '0.0.0-foo'],
+ ['0.0.1', '0.0.0'],
+ ['1.0.0', '0.9.9'],
+ ['0.10.0', '0.9.0'],
+ ['0.99.0', '0.10.0'],
+ ['2.0.0', '1.2.3'],
+ ['v0.0.0', '0.0.0-foo', true],
+ ['v0.0.1', '0.0.0', true],
+ ['v1.0.0', '0.9.9', true],
+ ['v0.10.0', '0.9.0', true],
+ ['v0.99.0', '0.10.0', true],
+ ['v2.0.0', '1.2.3', true],
+ ['0.0.0', 'v0.0.0-foo', true],
+ ['0.0.1', 'v0.0.0', true],
+ ['1.0.0', 'v0.9.9', true],
+ ['0.10.0', 'v0.9.0', true],
+ ['0.99.0', 'v0.10.0', true],
+ ['2.0.0', 'v1.2.3', true],
+ ['1.2.3', '1.2.3-asdf'],
+ ['1.2.3', '1.2.3-4'],
+ ['1.2.3', '1.2.3-4-foo'],
+ ['1.2.3-5-foo', '1.2.3-5'],
+ ['1.2.3-5', '1.2.3-4'],
+ ['1.2.3-5-foo', '1.2.3-5-Foo'],
+ ['3.0.0', '2.7.2+asdf'],
+ ['1.2.3-a.10', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a'],
+ ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
+ ['1.2.3-r2', '1.2.3-r100'],
+ ['1.2.3-r100', '1.2.3-R2']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
+ t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
+ t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
+ t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
+ t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
+ t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
+ t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
+ t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
+ });
+ t.end();
+});
+
+test('\nequality tests', function(t) {
+ // [version1, version2]
+ // version1 should be equivalent to version2
+ [['1.2.3', 'v1.2.3', true],
+ ['1.2.3', '=1.2.3', true],
+ ['1.2.3', 'v 1.2.3', true],
+ ['1.2.3', '= 1.2.3', true],
+ ['1.2.3', ' v1.2.3', true],
+ ['1.2.3', ' =1.2.3', true],
+ ['1.2.3', ' v 1.2.3', true],
+ ['1.2.3', ' = 1.2.3', true],
+ ['1.2.3-0', 'v1.2.3-0', true],
+ ['1.2.3-0', '=1.2.3-0', true],
+ ['1.2.3-0', 'v 1.2.3-0', true],
+ ['1.2.3-0', '= 1.2.3-0', true],
+ ['1.2.3-0', ' v1.2.3-0', true],
+ ['1.2.3-0', ' =1.2.3-0', true],
+ ['1.2.3-0', ' v 1.2.3-0', true],
+ ['1.2.3-0', ' = 1.2.3-0', true],
+ ['1.2.3-1', 'v1.2.3-1', true],
+ ['1.2.3-1', '=1.2.3-1', true],
+ ['1.2.3-1', 'v 1.2.3-1', true],
+ ['1.2.3-1', '= 1.2.3-1', true],
+ ['1.2.3-1', ' v1.2.3-1', true],
+ ['1.2.3-1', ' =1.2.3-1', true],
+ ['1.2.3-1', ' v 1.2.3-1', true],
+ ['1.2.3-1', ' = 1.2.3-1', true],
+ ['1.2.3-beta', 'v1.2.3-beta', true],
+ ['1.2.3-beta', '=1.2.3-beta', true],
+ ['1.2.3-beta', 'v 1.2.3-beta', true],
+ ['1.2.3-beta', '= 1.2.3-beta', true],
+ ['1.2.3-beta', ' v1.2.3-beta', true],
+ ['1.2.3-beta', ' =1.2.3-beta', true],
+ ['1.2.3-beta', ' v 1.2.3-beta', true],
+ ['1.2.3-beta', ' = 1.2.3-beta', true],
+ ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
+ ['1.2.3+build', ' = 1.2.3+otherbuild', true],
+ ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
+ ['1.2.3+build', '1.2.3+otherbuild'],
+ [' v1.2.3+build', '1.2.3+otherbuild']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
+ t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
+ t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
+ t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
+ t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
+ t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
+ t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
+ });
+ t.end();
+});
+
+
+test('\nrange tests', function(t) {
+ // [range, version]
+ // version should be included by range
+ [['1.0.0 - 2.0.0', '1.2.3'],
+ ['^1.2.3+build', '1.2.3'],
+ ['^1.2.3+build', '1.3.0'],
+ ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
+ ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
+ ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
+ ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
+ ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
+ ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
+ ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0'],
+ ['*', '1.2.3'],
+ ['*', 'v1.2.3', true],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97', true],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
+ ['~ 1.0', '1.0.2'],
+ ['~ 1.0.3', '1.0.12'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.6.2'],
+ ['~1.2.1 >=1.2.3', '1.2.3'],
+ ['~1.2.1 =1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['>=1.2.1 1.2.3', '1.2.3'],
+ ['1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.1 >=1.2.3', '1.2.3'],
+ ['>=1.2', '1.2.8'],
+ ['^1.2.3', '1.8.1'],
+ ['^0.1.2', '0.1.2'],
+ ['^0.1', '0.1.2'],
+ ['^1.2', '1.4.2'],
+ ['^1.2 ^1', '1.4.2'],
+ ['^1.2.3-alpha', '1.2.3-pre'],
+ ['^1.2.0-alpha', '1.2.0-pre'],
+ ['^0.0.1-alpha', '0.0.1-beta']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
+ });
+ t.end();
+});
+
+test('\nnegative range tests', function(t) {
+ // [range, version]
+ // version should not be included by range
+ [['1.0.0 - 2.0.0', '2.2.3'],
+ ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
+ ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
+ ['^1.2.3+build', '2.0.0'],
+ ['^1.2.3+build', '1.2.0'],
+ ['^1.2.3', '1.2.3-pre'],
+ ['^1.2', '1.2.0-pre'],
+ ['>1.2', '1.3.0-beta'],
+ ['<=1.2.3', '1.2.3-beta'],
+ ['^1.2.3', '1.2.3-beta'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['1', '1.0.0beta', true],
+ ['<1', '1.0.0beta', true],
+ ['< 1', '1.0.0beta', true],
+ ['1.0.0', '1.0.1'],
+ ['>=1.0.0', '0.0.0'],
+ ['>=1.0.0', '0.0.1'],
+ ['>=1.0.0', '0.1.0'],
+ ['>1.0.0', '0.0.1'],
+ ['>1.0.0', '0.1.0'],
+ ['<=2.0.0', '3.0.0'],
+ ['<=2.0.0', '2.9999.9999'],
+ ['<=2.0.0', '2.2.9'],
+ ['<2.0.0', '2.9999.9999'],
+ ['<2.0.0', '2.2.9'],
+ ['>=0.1.97', 'v0.1.93', true],
+ ['>=0.1.97', '0.1.93'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.0.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.2'],
+ ['2.x.x', '1.1.3'],
+ ['2.x.x', '3.1.3'],
+ ['1.2.x', '1.3.3'],
+ ['1.2.x || 2.x', '3.1.3'],
+ ['1.2.x || 2.x', '1.1.3'],
+ ['2.*.*', '1.1.3'],
+ ['2.*.*', '3.1.3'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '3.1.3'],
+ ['1.2.* || 2.*', '1.1.3'],
+ ['2', '1.1.2'],
+ ['2.3', '2.4.1'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.3.9'],
+ ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
+ ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.3'],
+ ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
+ ['<1', '1.0.0'],
+ ['>=1.2', '1.1.1'],
+ ['1', '2.0.0beta', true],
+ ['~v0.5.4-beta', '0.5.4-alpha'],
+ ['=0.7.x', '0.8.2'],
+ ['>=0.7.x', '0.6.2'],
+ ['<0.7.x', '0.7.2'],
+ ['<1.2.3', '1.2.3-beta'],
+ ['=1.2.3', '1.2.3-beta'],
+ ['>1.2', '1.2.8'],
+ ['^1.2.3', '2.0.0-alpha'],
+ ['^1.2.3', '1.2.2'],
+ ['^1.2', '1.1.9'],
+ ['*', 'v1.2.3-foo', true],
+ // invalid ranges never satisfied!
+ ['blerg', '1.2.3'],
+ ['git+https://user:password0123@github.com/foo', '123.0.0', true],
+ ['^1.2.3', '2.0.0-pre']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ var found = satisfies(ver, range, loose);
+ t.ok(!found, ver + ' not satisfied by ' + range);
+ });
+ t.end();
+});
+
+test('\nincrement versions test', function(t) {
+// [version, inc, result, identifier]
+// inc(version, inc) -> result
+ [['1.2.3', 'major', '2.0.0'],
+ ['1.2.3', 'minor', '1.3.0'],
+ ['1.2.3', 'patch', '1.2.4'],
+ ['1.2.3tag', 'major', '2.0.0', true],
+ ['1.2.3-tag', 'major', '2.0.0'],
+ ['1.2.3', 'fake', null],
+ ['1.2.0-0', 'patch', '1.2.0'],
+ ['fake', 'major', null],
+ ['1.2.3-4', 'major', '2.0.0'],
+ ['1.2.3-4', 'minor', '1.3.0'],
+ ['1.2.3-4', 'patch', '1.2.3'],
+ ['1.2.3-alpha.0.beta', 'major', '2.0.0'],
+ ['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
+ ['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
+ ['1.2.4', 'prerelease', '1.2.5-0'],
+ ['1.2.3-0', 'prerelease', '1.2.3-1'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
+ ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
+ ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
+ ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
+ ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
+ ['1.2.0', 'prepatch', '1.2.1-0'],
+ ['1.2.0-1', 'prepatch', '1.2.1-0'],
+ ['1.2.0', 'preminor', '1.3.0-0'],
+ ['1.2.3-1', 'preminor', '1.3.0-0'],
+ ['1.2.0', 'premajor', '2.0.0-0'],
+ ['1.2.3-1', 'premajor', '2.0.0-0'],
+ ['1.2.0-1', 'minor', '1.2.0'],
+ ['1.0.0-1', 'major', '1.0.0'],
+
+ ['1.2.3', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3', 'patch', '1.2.4', false, 'dev'],
+ ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
+ ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3', 'fake', null, false, 'dev'],
+ ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
+ ['fake', 'major', null, false, 'dev'],
+ ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
+ ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
+ ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
+ ['1.2.0', 'prepatch', '1.2.1-dev.0', 'dev'],
+ ['1.2.0-1', 'prepatch', '1.2.1-dev.0', 'dev'],
+ ['1.2.0', 'preminor', '1.3.0-dev.0', 'dev'],
+ ['1.2.3-1', 'preminor', '1.3.0-dev.0', 'dev'],
+ ['1.2.0', 'premajor', '2.0.0-dev.0', 'dev'],
+ ['1.2.3-1', 'premajor', '2.0.0-dev.0', 'dev'],
+ ['1.2.0-1', 'minor', '1.2.0', 'dev'],
+ ['1.0.0-1', 'major', '1.0.0', 'dev'],
+ ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
+
+ ].forEach(function(v) {
+ var pre = v[0];
+ var what = v[1];
+ var wanted = v[2];
+ var loose = v[3];
+ var id = v[4];
+ var found = inc(pre, what, loose, id);
+ var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
+ t.equal(found, wanted, cmd + ' === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\ndiff versions test', function(t) {
+// [version1, version2, result]
+// diff(version1, version2) -> result
+ [['1.2.3', '0.2.3', 'major'],
+ ['1.4.5', '0.2.3', 'major'],
+ ['1.2.3', '2.0.0-pre', 'premajor'],
+ ['1.2.3', '1.3.3', 'minor'],
+ ['1.0.1', '1.1.0-pre', 'preminor'],
+ ['1.2.3', '1.2.4', 'patch'],
+ ['1.2.3', '1.2.4-pre', 'prepatch'],
+ ['0.0.1', '0.0.1-pre', 'prerelease'],
+ ['0.0.1', '0.0.1-pre-2', 'prerelease'],
+ ['1.1.0', '1.1.0-pre', 'prerelease'],
+ ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
+ ['1.0.0', '1.0.0', null]
+
+ ].forEach(function(v) {
+ var version1 = v[0];
+ var version2 = v[1];
+ var wanted = v[2];
+ var found = diff(version1, version2);
+ var cmd = 'diff(' + version1 + ', ' + version2 + ')';
+ t.equal(found, wanted, cmd + ' === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\nvalid range test', function(t) {
+ // [range, result]
+ // validRange(range) -> result
+ // translate ranges into their canonical form
+ [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '*'],
+ ['', '*'],
+ ['*', '*'],
+ ['*', '*'],
+ ['>=1.0.0', '>=1.0.0'],
+ ['>1.0.0', '>1.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['1', '>=1.0.0 <2.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<2.0.0', '<2.0.0'],
+ ['<2.0.0', '<2.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['< 2.0.0', '<2.0.0'],
+ ['< 2.0.0', '<2.0.0'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
+ ['||', '||'],
+ ['2.x.x', '>=2.0.0 <3.0.0'],
+ ['1.2.x', '>=1.2.0 <1.3.0'],
+ ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
+ ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
+ ['x', '*'],
+ ['2.*.*', '>=2.0.0 <3.0.0'],
+ ['1.2.*', '>=1.2.0 <1.3.0'],
+ ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
+ ['*', '*'],
+ ['2', '>=2.0.0 <3.0.0'],
+ ['2.3', '>=2.3.0 <2.4.0'],
+ ['~2.4', '>=2.4.0 <2.5.0'],
+ ['~2.4', '>=2.4.0 <2.5.0'],
+ ['~>3.2.1', '>=3.2.1 <3.3.0'],
+ ['~1', '>=1.0.0 <2.0.0'],
+ ['~>1', '>=1.0.0 <2.0.0'],
+ ['~> 1', '>=1.0.0 <2.0.0'],
+ ['~1.0', '>=1.0.0 <1.1.0'],
+ ['~ 1.0', '>=1.0.0 <1.1.0'],
+ ['^0', '>=0.0.0 <1.0.0'],
+ ['^ 1', '>=1.0.0 <2.0.0'],
+ ['^0.1', '>=0.1.0 <0.2.0'],
+ ['^1.0', '>=1.0.0 <2.0.0'],
+ ['^1.2', '>=1.2.0 <2.0.0'],
+ ['^0.0.1', '>=0.0.1 <0.0.2'],
+ ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
+ ['^0.1.2', '>=0.1.2 <0.2.0'],
+ ['^1.2.3', '>=1.2.3 <2.0.0'],
+ ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
+ ['<1', '<1.0.0'],
+ ['< 1', '<1.0.0'],
+ ['>=1', '>=1.0.0'],
+ ['>= 1', '>=1.0.0'],
+ ['<1.2', '<1.2.0'],
+ ['< 1.2', '<1.2.0'],
+ ['1', '>=1.0.0 <2.0.0'],
+ ['>01.02.03', '>1.2.3', true],
+ ['>01.02.03', null],
+ ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
+ ['~1.2.3beta', null],
+ ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var loose = v[2];
+ var found = validRange(pre, loose);
+
+ t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\ncomparators test', function(t) {
+ // [range, comparators]
+ // turn range into a set of individual comparators
+ [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
+ ['1.0.0', [['1.0.0']]],
+ ['>=*', [['']]],
+ ['', [['']]],
+ ['*', [['']]],
+ ['*', [['']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['1', [['>=1.0.0', '<2.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<2.0.0', [['<2.0.0']]],
+ ['<2.0.0', [['<2.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['< 2.0.0', [['<2.0.0']]],
+ ['<\t2.0.0', [['<2.0.0']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
+ ['||', [[''], ['']]],
+ ['2.x.x', [['>=2.0.0', '<3.0.0']]],
+ ['1.2.x', [['>=1.2.0', '<1.3.0']]],
+ ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['x', [['']]],
+ ['2.*.*', [['>=2.0.0', '<3.0.0']]],
+ ['1.2.*', [['>=1.2.0', '<1.3.0']]],
+ ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['*', [['']]],
+ ['2', [['>=2.0.0', '<3.0.0']]],
+ ['2.3', [['>=2.3.0', '<2.4.0']]],
+ ['~2.4', [['>=2.4.0', '<2.5.0']]],
+ ['~2.4', [['>=2.4.0', '<2.5.0']]],
+ ['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
+ ['~1', [['>=1.0.0', '<2.0.0']]],
+ ['~>1', [['>=1.0.0', '<2.0.0']]],
+ ['~> 1', [['>=1.0.0', '<2.0.0']]],
+ ['~1.0', [['>=1.0.0', '<1.1.0']]],
+ ['~ 1.0', [['>=1.0.0', '<1.1.0']]],
+ ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
+ ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
+ ['<1', [['<1.0.0']]],
+ ['< 1', [['<1.0.0']]],
+ ['>=1', [['>=1.0.0']]],
+ ['>= 1', [['>=1.0.0']]],
+ ['<1.2', [['<1.2.0']]],
+ ['< 1.2', [['<1.2.0']]],
+ ['1', [['>=1.0.0', '<2.0.0']]],
+ ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
+ ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
+ ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
+ ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
+ ['>*', [['<0.0.0']]],
+ ['<*', [['<0.0.0']]]
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var found = toComparators(v[0]);
+ var jw = JSON.stringify(wanted);
+ t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
+ });
+
+ t.end();
+});
+
+test('\ninvalid version numbers', function(t) {
+ ['1.2.3.4',
+ 'NOT VALID',
+ 1.2,
+ null,
+ 'Infinity.NaN.Infinity'
+ ].forEach(function(v) {
+ t.throws(function() {
+ new SemVer(v);
+ }, {name:'TypeError', message:'Invalid Version: ' + v});
+ });
+
+ t.end();
+});
+
+test('\nstrict vs loose version numbers', function(t) {
+ [['=1.2.3', '1.2.3'],
+ ['01.02.03', '1.2.3'],
+ ['1.2.3-beta.01', '1.2.3-beta.1'],
+ [' =1.2.3', '1.2.3'],
+ ['1.2.3foo', '1.2.3-foo']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var strict = v[1];
+ t.throws(function() {
+ new SemVer(loose);
+ });
+ var lv = new SemVer(loose, true);
+ t.equal(lv.version, strict);
+ t.ok(eq(loose, strict, true));
+ t.throws(function() {
+ eq(loose, strict);
+ });
+ t.throws(function() {
+ new SemVer(strict).compare(loose);
+ });
+ });
+ t.end();
+});
+
+test('\nstrict vs loose ranges', function(t) {
+ [['>=01.02.03', '>=1.2.3'],
+ ['~1.02.03beta', '>=1.2.3-beta <1.3.0']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var comps = v[1];
+ t.throws(function() {
+ new Range(loose);
+ });
+ t.equal(new Range(loose, true).range, comps);
+ });
+ t.end();
+});
+
+test('\nmax satisfying', function(t) {
+ [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
+ [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
+ [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
+ [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
+ ].forEach(function(v) {
+ var versions = v[0];
+ var range = v[1];
+ var expect = v[2];
+ var loose = v[3];
+ var actual = semver.maxSatisfying(versions, range, loose);
+ t.equal(actual, expect);
+ });
+ t.end();
+});
diff --git a/source/node_modules/gulp/node_modules/semver/test/ltr.js b/source/node_modules/gulp/node_modules/semver/test/ltr.js
new file mode 100644
index 000000000..0f7167d65
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/ltr.js
@@ -0,0 +1,181 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var ltr = semver.ltr;
+
+test('\nltr tests', function(t) {
+ // [range, version, loose]
+ // Version should be less than range
+ [
+ ['~1.2.2', '1.2.1'],
+ ['~0.6.1-1', '0.6.1-0'],
+ ['1.0.0 - 2.0.0', '0.0.1'],
+ ['1.0.0-beta.2', '1.0.0-beta.1'],
+ ['1.0.0', '0.0.0'],
+ ['>=2.0.0', '1.1.1'],
+ ['>=2.0.0', '1.2.9'],
+ ['>2.0.0', '2.0.0'],
+ ['0.1.20 || 1.2.4', '0.1.5'],
+ ['2.x.x', '1.0.0'],
+ ['1.2.x', '1.1.0'],
+ ['1.2.x || 2.x', '1.0.0'],
+ ['2.*.*', '1.0.1'],
+ ['1.2.*', '1.1.3'],
+ ['1.2.* || 2.*', '1.1.9999'],
+ ['2', '1.0.0'],
+ ['2.3', '2.2.2'],
+ ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.3.5'],
+ ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '0.2.4'],
+ ['~> 1', '0.2.3'],
+ ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '0.1.0'],
+ ['>1.2', '1.2.0'],
+ ['> 1.2', '1.2.1'],
+ ['1', '0.0.0beta', true],
+ ['~v0.5.4-pre', '0.5.4-alpha'],
+ ['~v0.5.4-pre', '0.5.4-alpha'],
+ ['=0.7.x', '0.6.0'],
+ ['=0.7.x', '0.6.0-asdf'],
+ ['>=0.7.x', '0.6.0'],
+ ['~1.2.2', '1.2.1'],
+ ['1.0.0 - 2.0.0', '0.2.3'],
+ ['1.0.0', '0.0.1'],
+ ['>=2.0.0', '1.0.0'],
+ ['>=2.0.0', '1.9999.9999'],
+ ['>=2.0.0', '1.2.9'],
+ ['>2.0.0', '2.0.0'],
+ ['>2.0.0', '1.2.9'],
+ ['2.x.x', '1.1.3'],
+ ['1.2.x', '1.1.3'],
+ ['1.2.x || 2.x', '1.1.3'],
+ ['2.*.*', '1.1.3'],
+ ['1.2.*', '1.1.3'],
+ ['1.2.* || 2.*', '1.1.3'],
+ ['2', '1.9999.9999'],
+ ['2.3', '2.2.1'],
+ ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
+ ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '0.2.3'],
+ ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
+ ['>1', '1.0.0'],
+ ['2', '1.0.0beta', true],
+ ['>1', '1.0.0beta', true],
+ ['> 1', '1.0.0beta', true],
+ ['=0.7.x', '0.6.2'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['^1', '1.0.0-0'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['1', '1.0.0beta', true],
+ ['>=0.7.x', '0.6.2'],
+ ['>1.2.3', '1.3.0-alpha']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
+ t.ok(ltr(version, range, loose), msg);
+ });
+ t.end();
+});
+
+test('\nnegative ltr tests', function(t) {
+ // [range, version, loose]
+ // Version should NOT be less than range
+ [
+ ['~ 1.0', '1.1.0'],
+ ['~0.6.1-1', '0.6.1-1'],
+ ['1.0.0 - 2.0.0', '1.2.3'],
+ ['1.0.0 - 2.0.0', '2.9.9'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0', true],
+ ['*', '1.2.3'],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97'],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['0.1.20 || >1.2.4', '1.2.4'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['0.1.20 || 1.2.4', '0.1.20'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '1.0.2'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.6.2'],
+ ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
+ ['>=0.2.3 <=0.2.4', '0.2.4'],
+ ['1.0.0 - 2.0.0', '2.0.0'],
+ ['^3.0.0', '4.0.0'],
+ ['^1.0.0 || ~2.0.1', '2.0.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
+ ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
+ ['^1.0.0alpha', '1.0.0beta', true],
+ ['~1.0.0alpha', '1.0.0beta', true],
+ ['^1.0.0-alpha', '1.0.0beta', true],
+ ['~1.0.0-alpha', '1.0.0beta', true],
+ ['^1.0.0-alpha', '1.0.0-beta'],
+ ['~1.0.0-alpha', '1.0.0-beta'],
+ ['=0.1.0', '1.0.0']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
+ t.notOk(ltr(version, range, loose), msg);
+ });
+ t.end();
+});
diff --git a/source/node_modules/gulp/node_modules/semver/test/major-minor-patch.js b/source/node_modules/gulp/node_modules/semver/test/major-minor-patch.js
new file mode 100644
index 000000000..e9d4039c8
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/major-minor-patch.js
@@ -0,0 +1,72 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+
+test('\nmajor tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.2.3', 1],
+ [' 1.2.3 ', 1],
+ [' 2.2.3-4 ', 2],
+ [' 3.2.3-pre ', 3],
+ ['v5.2.3', 5],
+ [' v8.2.3 ', 8],
+ ['\t13.2.3', 13],
+ ['=21.2.3', 21, true],
+ ['v=34.2.3', 34, true]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'major(' + range + ') = ' + version;
+ t.equal(semver.major(range, loose), version, msg);
+ });
+ t.end();
+});
+
+test('\nminor tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.1.3', 1],
+ [' 1.1.3 ', 1],
+ [' 1.2.3-4 ', 2],
+ [' 1.3.3-pre ', 3],
+ ['v1.5.3', 5],
+ [' v1.8.3 ', 8],
+ ['\t1.13.3', 13],
+ ['=1.21.3', 21, true],
+ ['v=1.34.3', 34, true]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'minor(' + range + ') = ' + version;
+ t.equal(semver.minor(range, loose), version, msg);
+ });
+ t.end();
+});
+
+test('\npatch tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.2.1', 1],
+ [' 1.2.1 ', 1],
+ [' 1.2.2-4 ', 2],
+ [' 1.2.3-pre ', 3],
+ ['v1.2.5', 5],
+ [' v1.2.8 ', 8],
+ ['\t1.2.13', 13],
+ ['=1.2.21', 21, true],
+ ['v=1.2.34', 34, true]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'patch(' + range + ') = ' + version;
+ t.equal(semver.patch(range, loose), version, msg);
+ });
+ t.end();
+});
diff --git a/source/node_modules/gulp/node_modules/semver/test/no-module.js b/source/node_modules/gulp/node_modules/semver/test/no-module.js
new file mode 100644
index 000000000..8b50873f1
--- /dev/null
+++ b/source/node_modules/gulp/node_modules/semver/test/no-module.js
@@ -0,0 +1,19 @@
+var tap = require('tap');
+var test = tap.test;
+
+test('no module system', function(t) {
+ var fs = require('fs');
+ var vm = require('vm');
+ var head = fs.readFileSync(require.resolve('../head.js.txt'), 'utf8');
+ var src = fs.readFileSync(require.resolve('../'), 'utf8');
+ var foot = fs.readFileSync(require.resolve('../foot.js.txt'), 'utf8');
+ vm.runInThisContext(head + src + foot, 'semver.js');
+
+ // just some basic poking to see if it did some stuff
+ t.type(global.semver, 'object');
+ t.type(global.semver.SemVer, 'function');
+ t.type(global.semver.Range, 'function');
+ t.ok(global.semver.satisfies('1.2.3', '1.2'));
+ t.end();
+});
+
diff --git a/source/node_modules/gulp/package.json b/source/node_modules/gulp/package.json
new file mode 100644
index 000000000..e2f4e2a47
--- /dev/null
+++ b/source/node_modules/gulp/package.json
@@ -0,0 +1,138 @@
+{
+ "_args": [
+ [
+ "gulp",
+ "/Users/laura.vecchio/Sites/patternlab-php/source"
+ ]
+ ],
+ "_from": "gulp@*",
+ "_id": "gulp@3.9.1",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gulp",
+ "_nodeVersion": "0.10.41",
+ "_npmOperationalInternal": {
+ "host": "packages-6-west.internal.npmjs.com",
+ "tmp": "tmp/gulp-3.9.1.tgz_1454957415500_0.15343931876122952"
+ },
+ "_npmUser": {
+ "email": "blaine@iceddev.com",
+ "name": "phated"
+ },
+ "_npmVersion": "2.14.14",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "gulp",
+ "raw": "gulp",
+ "rawSpec": "",
+ "scope": null,
+ "spec": "*",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "#DEV:/"
+ ],
+ "_resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz",
+ "_shasum": "571ce45928dd40af6514fc4011866016c13845b4",
+ "_shrinkwrap": null,
+ "_spec": "gulp",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source",
+ "author": {
+ "email": "contact@wearefractal.com",
+ "name": "Fractal",
+ "url": "http://wearefractal.com/"
+ },
+ "bin": {
+ "gulp": "./bin/gulp.js"
+ },
+ "bugs": {
+ "url": "https://github.com/gulpjs/gulp/issues"
+ },
+ "dependencies": {
+ "archy": "^1.0.0",
+ "chalk": "^1.0.0",
+ "deprecated": "^0.0.1",
+ "gulp-util": "^3.0.0",
+ "interpret": "^1.0.0",
+ "liftoff": "^2.1.0",
+ "minimist": "^1.1.0",
+ "orchestrator": "^0.3.0",
+ "pretty-hrtime": "^1.0.0",
+ "semver": "^4.1.0",
+ "tildify": "^1.0.0",
+ "v8flags": "^2.0.2",
+ "vinyl-fs": "^0.3.0"
+ },
+ "description": "The streaming build system",
+ "devDependencies": {
+ "coveralls": "^2.7.0",
+ "eslint": "^1.7.3",
+ "eslint-config-gulp": "^2.0.0",
+ "graceful-fs": "^3.0.0",
+ "istanbul": "^0.3.0",
+ "jscs": "^2.3.5",
+ "jscs-preset-gulp": "^1.0.0",
+ "marked-man": "^0.1.3",
+ "mkdirp": "^0.5.0",
+ "mocha": "^2.0.1",
+ "mocha-lcov-reporter": "^0.0.1",
+ "q": "^1.0.0",
+ "rimraf": "^2.2.5",
+ "should": "^5.0.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "571ce45928dd40af6514fc4011866016c13845b4",
+ "tarball": "http://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz"
+ },
+ "engines": {
+ "node": ">= 0.9"
+ },
+ "files": [
+ "bin",
+ "completion",
+ "gulp.1",
+ "index.js",
+ "lib"
+ ],
+ "gitHead": "9c14e3a13a73a32e424f144d62566671b2fcdbed",
+ "homepage": "http://gulpjs.com",
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "fractal",
+ "email": "contact@wearefractal.com"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "man": [
+ "gulp.1"
+ ],
+ "name": "gulp",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gulpjs/gulp.git"
+ },
+ "scripts": {
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
+ "lint": "eslint . && jscs *.js bin/ lib/ test/",
+ "prepublish": "marked-man --name gulp docs/CLI.md > gulp.1",
+ "pretest": "npm run lint",
+ "test": "mocha --reporter spec"
+ },
+ "tags": [
+ "asset",
+ "build",
+ "make",
+ "pipeline",
+ "stream",
+ "system",
+ "tool"
+ ],
+ "version": "3.9.1"
+}
diff --git a/source/node_modules/gulplog/CHANGELOG.md b/source/node_modules/gulplog/CHANGELOG.md
new file mode 100644
index 000000000..5f84e9bb5
--- /dev/null
+++ b/source/node_modules/gulplog/CHANGELOG.md
@@ -0,0 +1,10 @@
+# gulplog changelog
+
+## 1.0.0
+
+- Initial release
+- No implementation changed since initial commit
+
+## 0.0.0
+
+- Experimentation
diff --git a/source/node_modules/gulplog/LICENSE b/source/node_modules/gulplog/LICENSE
new file mode 100644
index 000000000..8ac355493
--- /dev/null
+++ b/source/node_modules/gulplog/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/source/node_modules/gulplog/README.md b/source/node_modules/gulplog/README.md
new file mode 100644
index 000000000..484e939e4
--- /dev/null
+++ b/source/node_modules/gulplog/README.md
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+# gulplog
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Gitter chat][gitter-image]][gitter-url]
+
+Logger for gulp and gulp plugins
+
+## Usage
+
+```js
+var logger = require('gulplog');
+
+// logs strings
+logger.debug('The MOST verbose!');
+logger.info('Some important info');
+logger.warn('All the warnings to you');
+logger.error('OH NO! SOMETHING HAPPENED!');
+
+// supports util.format!
+logger.info('%s style!', 'printf');
+
+// log anything
+logger.debug({ my: 'obj' });
+logger.info([1, 2, 3]);
+```
+
+## API
+
+Logging (and level of logging) is controlled by [`gulp-cli`][gulp-cli-url]
+
+#### logger.debug(msg)
+
+Highest log level. Typically used for debugging purposes.
+
+If the first argument is a string, all arguments are passed to node's
+[`util.format()`][util-format-url] before being emitted.
+
+#### logger.info(msg)
+
+Standard log level. Typically used for user information.
+
+If the first argument is a string, all arguments are passed to node's
+[`util.format()`][util-format-url] before being emitted.
+
+#### logger.warn(msg)
+
+Warning log level. Typically used for warnings.
+
+If the first argument is a string, all arguments are passed to node's
+[`util.format()`][util-format-url] before being emitted.
+
+#### logger.error(msg)
+
+Error log level. Typically used when things went horribly wrong.
+
+If the first argument is a string, all arguments are passed to node's
+[`util.format()`][util-format-url] before being emitted.
+
+## License
+
+MIT
+
+[downloads-image]: http://img.shields.io/npm/dm/gulplog.svg
+[npm-url]: https://npmjs.org/package/gulplog
+[npm-image]: http://img.shields.io/npm/v/gulplog.svg
+
+[travis-url]: https://travis-ci.org/gulpjs/gulplog
+[travis-image]: http://img.shields.io/travis/gulpjs/gulplog.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
+
+[gulp-cli-url]: https://github.com/gulpjs/gulp-cli
+[util-format-url]: https://nodejs.org/docs/latest/api/util.html#util_util_format_format
diff --git a/source/node_modules/gulplog/index.js b/source/node_modules/gulplog/index.js
new file mode 100644
index 000000000..b92a6466a
--- /dev/null
+++ b/source/node_modules/gulplog/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+var getLogger = require('glogg');
+
+var logger = getLogger('gulplog');
+
+module.exports = logger;
diff --git a/source/node_modules/gulplog/package.json b/source/node_modules/gulplog/package.json
new file mode 100644
index 000000000..6bc9076a8
--- /dev/null
+++ b/source/node_modules/gulplog/package.json
@@ -0,0 +1,93 @@
+{
+ "_args": [
+ [
+ "gulplog@^1.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "gulplog@>=1.0.0 <2.0.0",
+ "_id": "gulplog@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/gulplog",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "email": "blaine@iceddev.com",
+ "name": "phated"
+ },
+ "_npmVersion": "2.14.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "gulplog",
+ "raw": "gulplog@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
+ "_shasum": "e28c4d45d05ecbbed818363ce8f9c5926229ffe5",
+ "_shrinkwrap": null,
+ "_spec": "gulplog@^1.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util",
+ "author": {
+ "email": "blaine@iceddev.com",
+ "name": "Blaine Bublitz",
+ "url": "http://iceddev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gulpjs/gulplog/issues"
+ },
+ "contributors": [],
+ "dependencies": {
+ "glogg": "^1.0.0"
+ },
+ "description": "Logger for gulp and gulp plugins",
+ "devDependencies": {
+ "eslint": "^1.5.1",
+ "eslint-config-node-style-guide": "^1.0.1",
+ "jscs": "^2.1.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "e28c4d45d05ecbbed818363ce8f9c5926229ffe5",
+ "tarball": "http://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "gitHead": "c920ad89da5a8f3724d35c83b6cbd8e132dada2b",
+ "homepage": "https://github.com/gulpjs/gulplog#readme",
+ "keywords": [
+ "gulp",
+ "gulp-util",
+ "log",
+ "logging"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "name": "gulplog",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gulpjs/gulplog.git"
+ },
+ "scripts": {
+ "test": "eslint index.js && jscs index.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/source/node_modules/har-validator/LICENSE b/source/node_modules/har-validator/LICENSE
new file mode 100644
index 000000000..ca55c91af
--- /dev/null
+++ b/source/node_modules/har-validator/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Ahmad Nassri
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/source/node_modules/har-validator/README.md b/source/node_modules/har-validator/README.md
new file mode 100644
index 000000000..91526e6dd
--- /dev/null
+++ b/source/node_modules/har-validator/README.md
@@ -0,0 +1,309 @@
+# HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
+
+Extremely fast HTTP Archive ([HAR](http://www.softwareishard.com/blog/har-12-spec/)) validator using JSON Schema.
+
+[![Build Status][travis-image]][travis-url]
+[![Downloads][npm-downloads]][npm-url]
+[![Code Climate][codeclimate-quality]][codeclimate-url]
+[![Coverage Status][codeclimate-coverage]][codeclimate-url]
+[![Dependencies][david-image]][david-url]
+
+## Install
+
+```shell
+# to use in cli
+npm install --global har-validator
+
+# to use as a module
+npm install --save har-validator
+```
+
+## Usage
+
+```
+
+ Usage: har-validator [options]
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -s, --schema [name] validate schema name (log, request, response, etc ...)
+
+```
+
+###### Example
+
+```shell
+har-validator har.json
+
+har-validator --schema request request.json
+```
+
+## API
+
+**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward comptability with `v1.x` an [async/callback API](#callback-api) is provided*
+
+### Validate(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a full [HAR](http://www.softwareishard.com/blog/har-12-spec/) object
+
+```js
+validate(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.log(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [log](http://www.softwareishard.com/blog/har-12-spec/#log) object
+
+```js
+validate.log(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.cache(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [cache](http://www.softwareishard.com/blog/har-12-spec/#cache) object
+
+```js
+validate.cache(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.cacheEntry(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a ["beforeRequest" or "afterRequest"](http://www.softwareishard.com/blog/har-12-spec/#cache) objects
+
+```js
+validate.cacheEntry(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.content(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [content](http://www.softwareishard.com/blog/har-12-spec/#content) object
+
+```js
+validate.content(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.cookie(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [cookie](http://www.softwareishard.com/blog/har-12-spec/#cookies) object
+
+```js
+validate.cookie(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.creator(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [creator](http://www.softwareishard.com/blog/har-12-spec/#creator) object
+
+```js
+validate.creator(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.entry(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ an [entry](http://www.softwareishard.com/blog/har-12-spec/#entries) object
+
+```js
+validate.entry(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.log(data)
+
+alias of [`Validate(data)`](#validate-data-callback-)
+
+### Validate.page(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [page](http://www.softwareishard.com/blog/har-12-spec/#pages) object
+
+```js
+validate.page(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.pageTimings(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [pageTimings](http://www.softwareishard.com/blog/har-12-spec/#pageTimings) object
+
+```js
+validate.pageTimings(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.postData(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [postData](http://www.softwareishard.com/blog/har-12-spec/#postData) object
+
+```js
+validate.postData(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.record(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [record](http://www.softwareishard.com/blog/har-12-spec/#headers) object
+
+```js
+validate.record(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.request(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [request](http://www.softwareishard.com/blog/har-12-spec/#request) object
+
+```js
+validate.request(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.response(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [response](http://www.softwareishard.com/blog/har-12-spec/#response) object
+
+```js
+validate.cacheEntry(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+### Validate.timings(data)
+
+> Returns a promise that resolves to the valid object.
+
+- **data**: `Object` *(Required)*
+ a [timings](http://www.softwareishard.com/blog/har-12-spec/#timings) object
+
+```js
+validate.timings(data)
+ .then(data => console.log('horray!'))
+ .catch(console.error)
+```
+
+----
+
+## Callback API
+
+### Validate(data [, callback])
+
+> Returns `true` or `false`.
+
+```js
+var HAR = require('./har.json');
+var validate = require('har-validator/lib/async');
+
+validate(HAR, function (e, valid) {
+ if (e) console.log(e.errors)
+
+ if (valid) console.log('horray!');
+});
+
+```
+The async API provides exactly the same methods as the [Promise API](#promise-api)
+
+----
+
+## Support
+
+Donations are welcome to help support the continuous development of this project.
+
+[![Gratipay][gratipay-image]][gratipay-url]
+[![PayPal][paypal-image]][paypal-url]
+[![Flattr][flattr-image]][flattr-url]
+[![Bitcoin][bitcoin-image]][bitcoin-url]
+
+## License
+
+[ISC License](LICENSE) © [Ahmad Nassri](https://www.ahmadnassri.com/)
+
+[license-url]: https://github.com/ahmadnassri/har-validator/blob/master/LICENSE
+
+[travis-url]: https://travis-ci.org/ahmadnassri/har-validator
+[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
+
+[npm-url]: https://www.npmjs.com/package/har-validator
+[npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square
+[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
+[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
+
+[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator
+[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square
+[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square
+
+[david-url]: https://david-dm.org/ahmadnassri/har-validator
+[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square
+
+[gratipay-url]: https://www.gratipay.com/ahmadnassri/
+[gratipay-image]: https://img.shields.io/gratipay/ahmadnassri.svg?style=flat-square
+
+[paypal-url]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UJ2B2BTK9VLRS&on0=project&os0=har-validator
+[paypal-image]: http://img.shields.io/badge/paypal-donate-green.svg?style=flat-square
+
+[flattr-url]: https://flattr.com/submit/auto?user_id=ahmadnassri&url=https://github.com/ahmadnassri/har-validator&title=har-validator&language=&tags=github&category=software
+[flattr-image]: http://img.shields.io/badge/flattr-donate-green.svg?style=flat-square
+
+[bitcoin-image]: http://img.shields.io/badge/bitcoin-1Nb46sZRVG3or7pNaDjthcGJpWhvoPpCxy-green.svg?style=flat-square
+[bitcoin-url]: https://www.coinbase.com/checkouts/ae383ae6bb931a2fa5ad11cec115191e?name=har-validator
diff --git a/source/node_modules/har-validator/bin/har-validator b/source/node_modules/har-validator/bin/har-validator
new file mode 100755
index 000000000..fd7cc0d34
--- /dev/null
+++ b/source/node_modules/har-validator/bin/har-validator
@@ -0,0 +1,56 @@
+#!/usr/bin/env node
+
+'use strict'
+
+var chalk = require('chalk')
+var cmd = require('commander')
+var fs = require('fs')
+var path = require('path')
+var pkg = require('../package.json')
+var Promise = require('pinkie-promise')
+var validate = require('..')
+var ValidationError = require('../lib/error')
+
+cmd
+ .version(pkg.version)
+ .usage('[options] ')
+ .option('-s, --schema [name]', 'validate schema name (log, request, response, etc ...)')
+ .parse(process.argv)
+
+if (!cmd.args.length) {
+ cmd.help()
+}
+
+cmd.args.map(function (fileName) {
+ var file = chalk.yellow.italic(path.basename(fileName))
+
+ new Promise(function (resolve, reject) {
+ fs.readFile(fileName, function (err, data) {
+ return err === null ? resolve(data) : reject(err)
+ })
+ })
+
+ .then(JSON.parse)
+
+ .then(cmd.schema ? validate[cmd.schema] : validate)
+
+ .then(function (data) {
+ console.log('%s [%s] is valid', chalk.green('✓'), file)
+ })
+
+ .catch(function (err) {
+ if (err instanceof SyntaxError) {
+ return console.error('%s [%s] failed to read JSON: %s', chalk.red('✖'), file, chalk.red(err.message))
+ }
+
+ if (err instanceof ValidationError) {
+ err.errors.forEach(function (details) {
+ console.error('%s [%s] failed validation: (%s: %s) %s', chalk.red('✖'), file, chalk.cyan.italic(details.field), chalk.magenta.italic(details.value), chalk.red(details.message))
+ })
+
+ return
+ }
+
+ console.error('%s [%s] an unknown error has occured: %s', chalk.red('✖'), file, chalk.red(err.message))
+ })
+})
diff --git a/source/node_modules/har-validator/lib/async.js b/source/node_modules/har-validator/lib/async.js
new file mode 100644
index 000000000..77b99a7db
--- /dev/null
+++ b/source/node_modules/har-validator/lib/async.js
@@ -0,0 +1,14 @@
+'use strict'
+
+var runner = require('./runner')
+var schemas = require('./schemas')
+
+module.exports = function (data, cb) {
+ return runner(schemas.har, data, cb)
+}
+
+Object.keys(schemas).map(function (name) {
+ module.exports[name] = function (data, cb) {
+ return runner(schemas[name], data, cb)
+ }
+})
diff --git a/source/node_modules/har-validator/lib/error.js b/source/node_modules/har-validator/lib/error.js
new file mode 100644
index 000000000..fc08a8721
--- /dev/null
+++ b/source/node_modules/har-validator/lib/error.js
@@ -0,0 +1,10 @@
+'use strict'
+
+function ValidationError (errors) {
+ this.name = 'ValidationError'
+ this.errors = errors
+}
+
+ValidationError.prototype = Error.prototype
+
+module.exports = ValidationError
diff --git a/source/node_modules/har-validator/lib/index.js b/source/node_modules/har-validator/lib/index.js
new file mode 100644
index 000000000..e8351b8d5
--- /dev/null
+++ b/source/node_modules/har-validator/lib/index.js
@@ -0,0 +1,22 @@
+'use strict'
+
+var Promise = require('pinkie-promise')
+var runner = require('./runner')
+var schemas = require('./schemas')
+
+var promisify = function (schema) {
+ return function (data) {
+ return new Promise(function (resolve, reject) {
+ runner(schema, data, function (err, valid) {
+ return err === null ? resolve(data) : reject(err)
+ })
+ })
+ }
+}
+
+module.exports = promisify(schemas.har)
+
+// utility methods for all parts of the schema
+Object.keys(schemas).map(function (name) {
+ module.exports[name] = promisify(schemas[name])
+})
diff --git a/source/node_modules/har-validator/lib/runner.js b/source/node_modules/har-validator/lib/runner.js
new file mode 100644
index 000000000..f0ed484e1
--- /dev/null
+++ b/source/node_modules/har-validator/lib/runner.js
@@ -0,0 +1,29 @@
+'use strict'
+
+var schemas = require('./schemas')
+var ValidationError = require('./error')
+var validator = require('is-my-json-valid')
+
+module.exports = function (schema, data, cb) {
+ // default value
+ var valid = false
+
+ // validator config
+ var validate = validator(schema, {
+ greedy: true,
+ verbose: true,
+ schemas: schemas
+ })
+
+ // execute is-my-json-valid
+ if (data !== undefined) {
+ valid = validate(data)
+ }
+
+ // callback?
+ if (typeof cb === 'function') {
+ return cb(validate.errors ? new ValidationError(validate.errors) : null, valid)
+ }
+
+ return valid
+}
diff --git a/source/node_modules/har-validator/lib/schemas/cache.json b/source/node_modules/har-validator/lib/schemas/cache.json
new file mode 100644
index 000000000..a3ab682d5
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/cache.json
@@ -0,0 +1,13 @@
+{
+ "properties": {
+ "beforeRequest": {
+ "$ref": "#cacheEntry"
+ },
+ "afterRequest": {
+ "$ref": "#cacheEntry"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/cacheEntry.json b/source/node_modules/har-validator/lib/schemas/cacheEntry.json
new file mode 100644
index 000000000..a397439fd
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/cacheEntry.json
@@ -0,0 +1,31 @@
+{
+ "oneOf": [{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "lastAccess",
+ "eTag",
+ "hitCount"
+ ],
+ "properties": {
+ "expires": {
+ "type": "string"
+ },
+ "lastAccess": {
+ "type": "string"
+ },
+ "eTag": {
+ "type": "string"
+ },
+ "hitCount": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+ }, {
+ "type": null,
+ "additionalProperties": false
+ }]
+}
diff --git a/source/node_modules/har-validator/lib/schemas/content.json b/source/node_modules/har-validator/lib/schemas/content.json
new file mode 100644
index 000000000..3710d7939
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/content.json
@@ -0,0 +1,27 @@
+{
+ "type": "object",
+ "required": [
+ "size",
+ "mimeType"
+ ],
+ "properties": {
+ "size": {
+ "type": "integer"
+ },
+ "compression": {
+ "type": "integer"
+ },
+ "mimeType": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "encoding": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/cookie.json b/source/node_modules/har-validator/lib/schemas/cookie.json
new file mode 100644
index 000000000..576818183
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/cookie.json
@@ -0,0 +1,34 @@
+{
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "domain": {
+ "type": "string"
+ },
+ "expires": {
+ "type": ["string", "null"],
+ "format": "date-time"
+ },
+ "httpOnly": {
+ "type": "boolean"
+ },
+ "secure": {
+ "type": "boolean"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/creator.json b/source/node_modules/har-validator/lib/schemas/creator.json
new file mode 100644
index 000000000..505860064
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/creator.json
@@ -0,0 +1,18 @@
+{
+ "type": "object",
+ "required": [
+ "name",
+ "version"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/entry.json b/source/node_modules/har-validator/lib/schemas/entry.json
new file mode 100644
index 000000000..8a9c022bd
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/entry.json
@@ -0,0 +1,51 @@
+{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "startedDateTime",
+ "time",
+ "request",
+ "response",
+ "cache",
+ "timings"
+ ],
+ "properties": {
+ "pageref": {
+ "type": "string"
+ },
+ "startedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ },
+ "time": {
+ "type": "number",
+ "min": 0
+ },
+ "request": {
+ "$ref": "#request"
+ },
+ "response": {
+ "$ref": "#response"
+ },
+ "cache": {
+ "$ref": "#cache"
+ },
+ "timings": {
+ "$ref": "#timings"
+ },
+ "serverIPAddress": {
+ "type": "string",
+ "oneOf": [
+ { "format": "ipv4" },
+ { "format": "ipv6" }
+ ]
+ },
+ "connection": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/har.json b/source/node_modules/har-validator/lib/schemas/har.json
new file mode 100644
index 000000000..b542782db
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/har.json
@@ -0,0 +1,11 @@
+{
+ "type": "object",
+ "required": [
+ "log"
+ ],
+ "properties": {
+ "log": {
+ "$ref": "#log"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/index.js b/source/node_modules/har-validator/lib/schemas/index.js
new file mode 100644
index 000000000..7b6db7dab
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/index.js
@@ -0,0 +1,49 @@
+'use strict'
+
+var schemas = {
+ cache: require('./cache.json'),
+ cacheEntry: require('./cacheEntry.json'),
+ content: require('./content.json'),
+ cookie: require('./cookie.json'),
+ creator: require('./creator.json'),
+ entry: require('./entry.json'),
+ har: require('./har.json'),
+ log: require('./log.json'),
+ page: require('./page.json'),
+ pageTimings: require('./pageTimings.json'),
+ postData: require('./postData.json'),
+ record: require('./record.json'),
+ request: require('./request.json'),
+ response: require('./response.json'),
+ timings: require('./timings.json')
+}
+
+// is-my-json-valid does not provide meaningful error messages for external schemas
+// this is a workaround
+schemas.cache.properties.beforeRequest = schemas.cacheEntry
+schemas.cache.properties.afterRequest = schemas.cacheEntry
+
+schemas.page.properties.pageTimings = schemas.pageTimings
+
+schemas.request.properties.cookies.items = schemas.cookie
+schemas.request.properties.headers.items = schemas.record
+schemas.request.properties.queryString.items = schemas.record
+schemas.request.properties.postData = schemas.postData
+
+schemas.response.properties.cookies.items = schemas.cookie
+schemas.response.properties.headers.items = schemas.record
+schemas.response.properties.content = schemas.content
+
+schemas.entry.properties.request = schemas.request
+schemas.entry.properties.response = schemas.response
+schemas.entry.properties.cache = schemas.cache
+schemas.entry.properties.timings = schemas.timings
+
+schemas.log.properties.creator = schemas.creator
+schemas.log.properties.browser = schemas.creator
+schemas.log.properties.pages.items = schemas.page
+schemas.log.properties.entries.items = schemas.entry
+
+schemas.har.properties.log = schemas.log
+
+module.exports = schemas
diff --git a/source/node_modules/har-validator/lib/schemas/log.json b/source/node_modules/har-validator/lib/schemas/log.json
new file mode 100644
index 000000000..0c91d38bf
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/log.json
@@ -0,0 +1,34 @@
+{
+ "type": "object",
+ "required": [
+ "version",
+ "creator",
+ "entries"
+ ],
+ "properties": {
+ "version": {
+ "type": "string"
+ },
+ "creator": {
+ "$ref": "#creator"
+ },
+ "browser": {
+ "$ref": "#creator"
+ },
+ "pages": {
+ "type": "array",
+ "items": {
+ "$ref": "#page"
+ }
+ },
+ "entries": {
+ "type": "array",
+ "items": {
+ "$ref": "#entry"
+ }
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/page.json b/source/node_modules/har-validator/lib/schemas/page.json
new file mode 100644
index 000000000..ef64abe5c
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/page.json
@@ -0,0 +1,30 @@
+{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "startedDateTime",
+ "id",
+ "title",
+ "pageTimings"
+ ],
+ "properties": {
+ "startedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ },
+ "id": {
+ "type": "string",
+ "unique": true
+ },
+ "title": {
+ "type": "string"
+ },
+ "pageTimings": {
+ "$ref": "#pageTimings"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/pageTimings.json b/source/node_modules/har-validator/lib/schemas/pageTimings.json
new file mode 100644
index 000000000..adc83cccd
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/pageTimings.json
@@ -0,0 +1,16 @@
+{
+ "type": "object",
+ "properties": {
+ "onContentLoad": {
+ "type": "number",
+ "min": -1
+ },
+ "onLoad": {
+ "type": "number",
+ "min": -1
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/postData.json b/source/node_modules/har-validator/lib/schemas/postData.json
new file mode 100644
index 000000000..91958b64a
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/postData.json
@@ -0,0 +1,41 @@
+{
+ "type": "object",
+ "optional": true,
+ "required": [
+ "mimeType"
+ ],
+ "properties": {
+ "mimeType": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "params": {
+ "type": "array",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "fileName": {
+ "type": "string"
+ },
+ "contentType": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/record.json b/source/node_modules/har-validator/lib/schemas/record.json
new file mode 100644
index 000000000..04acd5194
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/record.json
@@ -0,0 +1,18 @@
+{
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/request.json b/source/node_modules/har-validator/lib/schemas/request.json
new file mode 100644
index 000000000..639af06dc
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/request.json
@@ -0,0 +1,55 @@
+{
+ "type": "object",
+ "required": [
+ "method",
+ "url",
+ "httpVersion",
+ "cookies",
+ "headers",
+ "queryString",
+ "headersSize",
+ "bodySize"
+ ],
+ "properties": {
+ "method": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string",
+ "format": "uri"
+ },
+ "httpVersion": {
+ "type": "string"
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "$ref": "#cookie"
+ }
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "$ref": "#record"
+ }
+ },
+ "queryString": {
+ "type": "array",
+ "items": {
+ "$ref": "#record"
+ }
+ },
+ "postData": {
+ "$ref": "#postData"
+ },
+ "headersSize": {
+ "type": "integer"
+ },
+ "bodySize": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/response.json b/source/node_modules/har-validator/lib/schemas/response.json
new file mode 100644
index 000000000..de99c55bb
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/response.json
@@ -0,0 +1,52 @@
+{
+ "type": "object",
+ "required": [
+ "status",
+ "statusText",
+ "httpVersion",
+ "cookies",
+ "headers",
+ "content",
+ "redirectURL",
+ "headersSize",
+ "bodySize"
+ ],
+ "properties": {
+ "status": {
+ "type": "integer"
+ },
+ "statusText": {
+ "type": "string"
+ },
+ "httpVersion": {
+ "type": "string"
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "$ref": "#cookie"
+ }
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "$ref": "#record"
+ }
+ },
+ "content": {
+ "$ref": "#content"
+ },
+ "redirectURL": {
+ "type": "string"
+ },
+ "headersSize": {
+ "type": "integer"
+ },
+ "bodySize": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/lib/schemas/timings.json b/source/node_modules/har-validator/lib/schemas/timings.json
new file mode 100644
index 000000000..066ef71a1
--- /dev/null
+++ b/source/node_modules/har-validator/lib/schemas/timings.json
@@ -0,0 +1,40 @@
+{
+ "required": [
+ "send",
+ "wait",
+ "receive"
+ ],
+ "properties": {
+ "dns": {
+ "type": "number",
+ "min": -1
+ },
+ "connect": {
+ "type": "number",
+ "min": -1
+ },
+ "blocked": {
+ "type": "number",
+ "min": -1
+ },
+ "send": {
+ "type": "number",
+ "min": -1
+ },
+ "wait": {
+ "type": "number",
+ "min": -1
+ },
+ "receive": {
+ "type": "number",
+ "min": -1
+ },
+ "ssl": {
+ "type": "number",
+ "min": -1
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/source/node_modules/har-validator/package.json b/source/node_modules/har-validator/package.json
new file mode 100644
index 000000000..3220dc324
--- /dev/null
+++ b/source/node_modules/har-validator/package.json
@@ -0,0 +1,112 @@
+{
+ "_args": [
+ [
+ "har-validator@~2.0.6",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request"
+ ]
+ ],
+ "_from": "har-validator@>=2.0.6 <2.1.0",
+ "_id": "har-validator@2.0.6",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/har-validator",
+ "_nodeVersion": "5.2.0",
+ "_npmUser": {
+ "email": "ahmad@ahmadnassri.com",
+ "name": "ahmadnassri"
+ },
+ "_npmVersion": "3.3.12",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "har-validator",
+ "raw": "har-validator@~2.0.6",
+ "rawSpec": "~2.0.6",
+ "scope": null,
+ "spec": ">=2.0.6 <2.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+ "_shasum": "cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d",
+ "_shrinkwrap": null,
+ "_spec": "har-validator@~2.0.6",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/request",
+ "author": {
+ "email": "ahmad@ahmadnassri.com",
+ "name": "Ahmad Nassri",
+ "url": "https://www.ahmadnassri.com/"
+ },
+ "bin": {
+ "har-validator": "bin/har-validator"
+ },
+ "bugs": {
+ "url": "https://github.com/ahmadnassri/har-validator/issues"
+ },
+ "dependencies": {
+ "chalk": "^1.1.1",
+ "commander": "^2.9.0",
+ "is-my-json-valid": "^2.12.4",
+ "pinkie-promise": "^2.0.0"
+ },
+ "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
+ "devDependencies": {
+ "codeclimate-test-reporter": "0.2.1",
+ "echint": "^1.5.1",
+ "istanbul": "^0.4.2",
+ "mocha": "^2.3.4",
+ "require-directory": "^2.1.1",
+ "should": "^8.1.1",
+ "standard": "^5.4.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d",
+ "tarball": "http://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz"
+ },
+ "echint": {
+ "ignore": [
+ "coverage/**"
+ ]
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "files": [
+ "bin",
+ "lib"
+ ],
+ "gitHead": "92ccddad2e5d13e6e32c764e06c347d67805b211",
+ "homepage": "https://github.com/ahmadnassri/har-validator",
+ "keywords": [
+ "archive",
+ "har",
+ "http",
+ "validate",
+ "validator"
+ ],
+ "license": "ISC",
+ "main": "lib/index",
+ "maintainers": [
+ {
+ "name": "ahmadnassri",
+ "email": "ahmad@ahmadnassri.com"
+ }
+ ],
+ "name": "har-validator",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ahmadnassri/har-validator.git"
+ },
+ "scripts": {
+ "codeclimate": "codeclimate < coverage/lcov.info",
+ "coverage": "istanbul cover --dir coverage _mocha -- -R dot",
+ "posttest": "npm run coverage",
+ "pretest": "standard && echint",
+ "test": "mocha"
+ },
+ "version": "2.0.6"
+}
diff --git a/source/node_modules/has-ansi/index.js b/source/node_modules/has-ansi/index.js
new file mode 100644
index 000000000..98fae0676
--- /dev/null
+++ b/source/node_modules/has-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+var ansiRegex = require('ansi-regex');
+var re = new RegExp(ansiRegex().source); // remove the `g` flag
+module.exports = re.test.bind(re);
diff --git a/source/node_modules/has-ansi/license b/source/node_modules/has-ansi/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/source/node_modules/has-ansi/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/source/node_modules/has-ansi/package.json b/source/node_modules/has-ansi/package.json
new file mode 100644
index 000000000..0d53de9e7
--- /dev/null
+++ b/source/node_modules/has-ansi/package.json
@@ -0,0 +1,110 @@
+{
+ "_args": [
+ [
+ "has-ansi@^2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/chalk"
+ ]
+ ],
+ "_from": "has-ansi@>=2.0.0 <3.0.0",
+ "_id": "has-ansi@2.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/has-ansi",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "2.11.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "has-ansi",
+ "raw": "has-ansi@^2.0.0",
+ "rawSpec": "^2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "_shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91",
+ "_shrinkwrap": null,
+ "_spec": "has-ansi@^2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/chalk",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/has-ansi/issues"
+ },
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "description": "Check if a string has ANSI escape codes",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91",
+ "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "0722275e1bef139fcd09137da6e5550c3cd368b9",
+ "homepage": "https://github.com/sindresorhus/has-ansi",
+ "keywords": [
+ "ansi",
+ "color",
+ "colors",
+ "colour",
+ "command-line",
+ "console",
+ "escape",
+ "find",
+ "has",
+ "match",
+ "pattern",
+ "re",
+ "regex",
+ "regexp",
+ "shell",
+ "string",
+ "styles",
+ "terminal",
+ "test",
+ "text",
+ "tty",
+ "xterm"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "name": "has-ansi",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/has-ansi.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/source/node_modules/has-ansi/readme.md b/source/node_modules/has-ansi/readme.md
new file mode 100644
index 000000000..02bc7c230
--- /dev/null
+++ b/source/node_modules/has-ansi/readme.md
@@ -0,0 +1,36 @@
+# has-ansi [](https://travis-ci.org/sindresorhus/has-ansi)
+
+> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save has-ansi
+```
+
+
+## Usage
+
+```js
+var hasAnsi = require('has-ansi');
+
+hasAnsi('\u001b[4mcake\u001b[0m');
+//=> true
+
+hasAnsi('cake');
+//=> false
+```
+
+
+## Related
+
+- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module
+- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes
+- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/source/node_modules/has-gulplog/LICENSE b/source/node_modules/has-gulplog/LICENSE
new file mode 100644
index 000000000..ce6aef79b
--- /dev/null
+++ b/source/node_modules/has-gulplog/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 gulp
+
+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.
+
diff --git a/source/node_modules/has-gulplog/README.md b/source/node_modules/has-gulplog/README.md
new file mode 100644
index 000000000..072cfa4cc
--- /dev/null
+++ b/source/node_modules/has-gulplog/README.md
@@ -0,0 +1,2 @@
+# has-gulplog
+Check if gulplog is available before attempting to use it
diff --git a/source/node_modules/has-gulplog/index.js b/source/node_modules/has-gulplog/index.js
new file mode 100644
index 000000000..c78b51f29
--- /dev/null
+++ b/source/node_modules/has-gulplog/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var sparkles = require('sparkles');
+
+function hasGulplog(){
+ return sparkles.exists('gulplog');
+}
+
+module.exports = hasGulplog;
diff --git a/source/node_modules/has-gulplog/package.json b/source/node_modules/has-gulplog/package.json
new file mode 100644
index 000000000..f0e7c19e9
--- /dev/null
+++ b/source/node_modules/has-gulplog/package.json
@@ -0,0 +1,90 @@
+{
+ "_args": [
+ [
+ "has-gulplog@^0.1.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util"
+ ]
+ ],
+ "_from": "has-gulplog@>=0.1.0 <0.2.0",
+ "_id": "has-gulplog@0.1.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/has-gulplog",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "email": "blaine@iceddev.com",
+ "name": "phated"
+ },
+ "_npmVersion": "2.8.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "has-gulplog",
+ "raw": "has-gulplog@^0.1.0",
+ "rawSpec": "^0.1.0",
+ "scope": null,
+ "spec": ">=0.1.0 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gulp-util"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
+ "_shasum": "6414c82913697da51590397dafb12f22967811ce",
+ "_shrinkwrap": null,
+ "_spec": "has-gulplog@^0.1.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gulp-util",
+ "author": {
+ "email": "blaine@iceddev.com",
+ "name": "Blaine Bublitz",
+ "url": "http://iceddev.com"
+ },
+ "bugs": {
+ "url": "https://github.com/gulpjs/has-gulplog/issues"
+ },
+ "contributors": [],
+ "dependencies": {
+ "sparkles": "^1.0.0"
+ },
+ "description": "Check if gulplog is available before attempting to use it",
+ "devDependencies": {
+ "eslint": "^1.3.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "6414c82913697da51590397dafb12f22967811ce",
+ "tarball": "http://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "gitHead": "16ef7af9911ec91838b2762bf1ba38b4578e6f6f",
+ "homepage": "https://github.com/gulpjs/has-gulplog#readme",
+ "keywords": [
+ "gulp-util",
+ "gulplog",
+ "logging"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "name": "has-gulplog",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gulpjs/has-gulplog.git"
+ },
+ "scripts": {
+ "test": "eslint *.js"
+ },
+ "version": "0.1.0"
+}
diff --git a/source/node_modules/has-unicode/.npmignore b/source/node_modules/has-unicode/.npmignore
new file mode 100644
index 000000000..7e17cf19b
--- /dev/null
+++ b/source/node_modules/has-unicode/.npmignore
@@ -0,0 +1,32 @@
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# Commenting this out is preferred by some people, see
+# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
+node_modules
+
+# Users Environment Variables
+.lock-wscript
+
+# Editor temp files
+*~
+.#*
diff --git a/source/node_modules/has-unicode/LICENSE b/source/node_modules/has-unicode/LICENSE
new file mode 100644
index 000000000..d42e25e95
--- /dev/null
+++ b/source/node_modules/has-unicode/LICENSE
@@ -0,0 +1,14 @@
+Copyright (c) 2014, Rebecca Turner
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/source/node_modules/has-unicode/README.md b/source/node_modules/has-unicode/README.md
new file mode 100644
index 000000000..5a03e5991
--- /dev/null
+++ b/source/node_modules/has-unicode/README.md
@@ -0,0 +1,43 @@
+has-unicode
+===========
+
+Try to guess if your terminal supports unicode
+
+```javascript
+var hasUnicode = require("has-unicode")
+
+if (hasUnicode()) {
+ // the terminal probably has unicode support
+}
+```
+```javascript
+var hasUnicode = require("has-unicode").tryHarder
+hasUnicode(function(unicodeSupported) {
+ if (unicodeSupported) {
+ // the terminal probably has unicode support
+ }
+})
+```
+
+## Detecting Unicode
+
+What we actually detect is UTF-8 support, as that's what Node itself supports.
+If you have a UTF-16 locale then you won't be detected as unicode capable.
+
+### Windows
+
+Since at least Windows 7, `cmd` and `powershell` have been unicode capable,
+but unfortunately even then it's not guaranteed. In many localizations it
+still uses legacy code pages and there's no facility short of running
+programs or linking C++ that will let us detect this. As such, we
+report any Windows installation as NOT unicode capable, and recommend
+that you encourage your users to override this via config.
+
+### Unix Like Operating Systems
+
+We look at the environment variables `LC_ALL`, `LC_CTYPE`, and `LANG` in
+that order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value.
+For `LC_CTYPE` it looks to see if the value is `UTF-8`. This is sufficient
+for most POSIX systems. While locale data can be put in `/etc/locale.conf`
+as well, AFAIK it's always copied into the environment.
+
diff --git a/source/node_modules/has-unicode/index.js b/source/node_modules/has-unicode/index.js
new file mode 100644
index 000000000..9bf537b1c
--- /dev/null
+++ b/source/node_modules/has-unicode/index.js
@@ -0,0 +1,21 @@
+"use strict"
+var os = require("os")
+
+var hasUnicode = module.exports = function () {
+ // Recent Win32 platforms (>XP) CAN support unicode in the console but
+ // don't have to, and in non-english locales often use traditional local
+ // code pages. There's no way, short of windows system calls or execing
+ // the chcp command line program to figure this out. As such, we default
+ // this to false and encourage your users to override it via config if
+ // appropriate.
+ if (os.type() == "Windows_NT") { return false }
+
+ var isUTF8 = /[.]UTF-8/
+ if (isUTF8.test(process.env.LC_ALL)
+ || process.env.LC_CTYPE == 'UTF-8'
+ || isUTF8.test(process.env.LANG)) {
+ return true
+ }
+
+ return false
+}
diff --git a/source/node_modules/has-unicode/package.json b/source/node_modules/has-unicode/package.json
new file mode 100644
index 000000000..d9033174c
--- /dev/null
+++ b/source/node_modules/has-unicode/package.json
@@ -0,0 +1,79 @@
+{
+ "_args": [
+ [
+ "has-unicode@^2.0.0",
+ "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gauge"
+ ]
+ ],
+ "_from": "has-unicode@>=2.0.0 <3.0.0",
+ "_id": "has-unicode@2.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/has-unicode",
+ "_nodeVersion": "4.2.2",
+ "_npmUser": {
+ "email": "me@re-becca.org",
+ "name": "iarna"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "has-unicode",
+ "raw": "has-unicode@^2.0.0",
+ "rawSpec": "^2.0.0",
+ "scope": null,
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/gauge"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.0.tgz",
+ "_shasum": "a3cd96c307ba41d559c5a2ee408c12a11c4c2ec3",
+ "_shrinkwrap": null,
+ "_spec": "has-unicode@^2.0.0",
+ "_where": "/Users/laura.vecchio/Sites/patternlab-php/source/node_modules/gauge",
+ "author": {
+ "email": "me@re-becca.org",
+ "name": "Rebecca Turner"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/has-unicode/issues"
+ },
+ "dependencies": {},
+ "description": "Try to guess if your terminal supports unicode",
+ "devDependencies": {
+ "require-inject": "^1.3.0",
+ "tap": "^2.3.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "a3cd96c307ba41d559c5a2ee408c12a11c4c2ec3",
+ "tarball": "http://registry.npmjs.org/has-unicode/-/has-unicode-2.0.0.tgz"
+ },
+ "gitHead": "fdd5de141a5564bdb5bc991d951209da40f6a598",
+ "homepage": "https://github.com/iarna/has-unicode",
+ "keywords": [
+ "terminal",
+ "unicode"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "name": "has-unicode",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/has-unicode.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/source/node_modules/has-unicode/test/index.js b/source/node_modules/has-unicode/test/index.js
new file mode 100644
index 000000000..cbdfda335
--- /dev/null
+++ b/source/node_modules/has-unicode/test/index.js
@@ -0,0 +1,26 @@
+"use strict"
+var test = require("tap").test
+var requireInject = require("require-inject")
+
+test("Windows", function (t) {
+ t.plan(1)
+ var hasUnicode = requireInject("../index.js", {
+ os: { type: function () { return "Windows_NT" } }
+ })
+ t.is(hasUnicode(), false, "Windows is assumed NOT to be unicode aware")
+})
+test("Unix Env", function (t) {
+ t.plan(3)
+ var hasUnicode = requireInject("../index.js", {
+ os: { type: function () { return "Linux" } },
+ child_process: { exec: function (cmd,cb) { cb(new Error("not available")) } }
+ })
+ process.env.LANG = "en_US.UTF-8"
+ process.env.LC_ALL = null
+ t.is(hasUnicode(), true, "Linux with a UTF8 language")
+ process.env.LANG = null
+ process.env.LC_ALL = "en_US.UTF-8"
+ t.is(hasUnicode(), true, "Linux with UTF8 locale")
+ process.env.LC_ALL = null
+ t.is(hasUnicode(), false, "Linux without UTF8 language or locale")
+})
diff --git a/source/node_modules/hawk/.npmignore b/source/node_modules/hawk/.npmignore
new file mode 100644
index 000000000..96ed0910b
--- /dev/null
+++ b/source/node_modules/hawk/.npmignore
@@ -0,0 +1,20 @@
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+components
+build
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+
diff --git a/source/node_modules/hawk/.travis.yml b/source/node_modules/hawk/.travis.yml
new file mode 100755
index 000000000..40ca59eee
--- /dev/null
+++ b/source/node_modules/hawk/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+
+node_js:
+ - 0.10
+
diff --git a/source/node_modules/hawk/LICENSE b/source/node_modules/hawk/LICENSE
new file mode 100755
index 000000000..788093684
--- /dev/null
+++ b/source/node_modules/hawk/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2012-2014, Eran Hammer and other contributors.
+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.
+ * The names of any contributors may not 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 HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hueniverse/hawk/graphs/contributors
diff --git a/source/node_modules/hawk/README.md b/source/node_modules/hawk/README.md
new file mode 100755
index 000000000..b92cd7c43
--- /dev/null
+++ b/source/node_modules/hawk/README.md
@@ -0,0 +1,634 @@
+
+
+ **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial
+HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).
+
+Current version: **3.x**
+
+Note: 3.x and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.
+
+[](http://travis-ci.org/hueniverse/hawk)
+
+# Table of Content
+
+- [**Introduction**](#introduction)
+ - [Replay Protection](#replay-protection)
+ - [Usage Example](#usage-example)
+ - [Protocol Example](#protocol-example)
+ - [Payload Validation](#payload-validation)
+ - [Response Payload Validation](#response-payload-validation)
+ - [Browser Support and Considerations](#browser-support-and-considerations)
+
+- [**Single URI Authorization**](#single-uri-authorization)
+ - [Usage Example](#bewit-usage-example)
+
+- [**Security Considerations**](#security-considerations)
+ - [MAC Keys Transmission](#mac-keys-transmission)
+ - [Confidentiality of Requests](#confidentiality-of-requests)
+ - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)
+ - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)
+ - [Entropy of Keys](#entropy-of-keys)
+ - [Coverage Limitations](#coverage-limitations)
+ - [Future Time Manipulation](#future-time-manipulation)
+ - [Client Clock Poisoning](#client-clock-poisoning)
+ - [Bewit Limitations](#bewit-limitations)
+ - [Host Header Forgery](#host-header-forgery)
+
+- [**Frequently Asked Questions**](#frequently-asked-questions)
+
+- [**Implementations**](#implementations)
+- [**Acknowledgements**](#acknowledgements)
+
+# Introduction
+
+**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with
+partial cryptographic verification of the request and response, covering the HTTP method, request URI, host,
+and optionally the request payload.
+
+Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of
+client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,
+the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is
+included in its place.
+
+However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of
+replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less
+"chattiness" (interaction with the server).
+
+Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because
+the client and server must both have access to the key material in the clear.
+
+The primary design goals of this scheme are to:
+* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,
+* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where
+ to send an authenticated request), and
+* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client
+ failure to validate the server's identity as part of its TLS handshake.
+
+In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using
+a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).
+
+The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,
+which is beyond the scope of this module. Typically, the shared credentials are established via an initial
+TLS-protected phase or derived from some other shared confidential information available to both the client
+and the server.
+
+
+## Replay Protection
+
+Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more
+than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when
+making requests. This gives the server enough information to prevent replay attacks.
+
+The nonce is generated by the client, and is a string unique across all requests with the same timestamp and
+key identifier combination.
+
+The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards
+are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.
+By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in
+practice translates to a maximum of 2 minutes as the skew can be positive or negative).
+
+Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client
+clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types
+(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response
+to a bad timestamp.
+
+There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a
+potential attack vector). Instead, the client only uses the server's time to calculate an offset used only
+for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing
+the number of round trips required to authenticate the first request.
+
+
+## Usage Example
+
+Server code:
+
+```javascript
+var Http = require('http');
+var Hawk = require('hawk');
+
+
+// Credentials lookup function
+
+var credentialsFunc = function (id, callback) {
+
+ var credentials = {
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'Steve'
+ };
+
+ return callback(null, credentials);
+};
+
+// Create HTTP server
+
+var handler = function (req, res) {
+
+ // Authenticate incoming request
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
+
+ // Prepare response
+
+ var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');
+ var headers = { 'Content-Type': 'text/plain' };
+
+ // Generate Server-Authorization response header
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });
+ headers['Server-Authorization'] = header;
+
+ // Send the response back
+
+ res.writeHead(!err ? 200 : 401, headers);
+ res.end(payload);
+ });
+};
+
+// Start server
+
+Http.createServer(handler).listen(8000, 'example.com');
+```
+
+Client code:
+
+```javascript
+var Request = require('request');
+var Hawk = require('hawk');
+
+
+// Client credentials
+
+var credentials = {
+ id: 'dh37fgj492je',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256'
+}
+
+// Request options
+
+var requestOptions = {
+ uri: 'http://example.com:8000/resource/1?b=1&a=2',
+ method: 'GET',
+ headers: {}
+};
+
+// Generate Authorization request header
+
+var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });
+requestOptions.headers.Authorization = header.field;
+
+// Send authenticated request
+
+Request(requestOptions, function (error, response, body) {
+
+ // Authenticate the server's response
+
+ var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
+
+ // Output results
+
+ console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));
+});
+```
+
+**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local
+machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.
+
+```javascript
+Hawk.sntp.start();
+```
+
+
+## Protocol Example
+
+The client attempts to access a protected resource without authentication, sending the following HTTP request to
+the resource server:
+
+```
+GET /resource/1?b=1&a=2 HTTP/1.1
+Host: example.com:8000
+```
+
+The resource server returns an authentication challenge.
+
+```
+HTTP/1.1 401 Unauthorized
+WWW-Authenticate: Hawk
+```
+
+The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/"
+server. The **Hawk** credentials issued to the client include the following attributes:
+
+* Key identifier: dh37fgj492je
+* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn
+* Algorithm: sha256
+
+The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,
+1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline
+character):
+
+```
+hawk.1.header
+1353832234
+j4h3g2
+GET
+/resource/1?b=1&a=2
+example.com
+8000
+
+some-app-ext-data
+
+```
+
+The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string.
+The result is base64-encoded to produce the request MAC:
+
+```
+6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=
+```
+
+The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using
+the HTTP `Authorization` request header field:
+
+```
+GET /resource/1?b=1&a=2 HTTP/1.1
+Host: example.com:8000
+Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="
+```
+
+The server validates the request by calculating the request MAC again based on the request received and verifies the validity
+and scope of the **Hawk** credentials. If valid, the server responds with the requested resource.
+
+
+### Payload Validation
+
+**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash
+using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):
+* `hawk.1.payload`
+* the content-type in lowercase, without any parameters (e.g. `application/json`)
+* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)
+
+For example:
+
+* Payload: `Thank you for flying Hawk`
+* Content Type: `text/plain`
+* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`
+
+Results in the following input to the payload hash function (newline terminated values):
+
+```
+hawk.1.payload
+text/plain
+Thank you for flying Hawk
+
+```
+
+Which produces the following hash value:
+
+```
+Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=
+```
+
+The client constructs the normalized request string (newline terminated values):
+
+```
+hawk.1.header
+1353832234
+j4h3g2
+POST
+/resource/1?a=1&b=2
+example.com
+8000
+Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=
+some-app-ext-data
+
+```
+
+Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,
+and request MAC, with the request using the HTTP `Authorization` request header field:
+
+```
+POST /resource/1?a=1&b=2 HTTP/1.1
+Host: example.com:8000
+Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="
+```
+
+It is up to the server if and when it validates the payload for any given request, based solely on it's security policy
+and the nature of the data included.
+
+If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct
+the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value
+with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.
+
+However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed
+at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value
+provided by the client after validating the MAC.
+
+It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value
+included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided
+by the client, the payload may be modified by an attacker.
+
+
+## Response Payload Validation
+
+**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the
+client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header
+as a response header using the exact same syntax as the `Authorization` request header field.
+
+The header is contructed using the same process as the client's request header. The server uses the same credentials and other
+artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with
+new values based on the server response. The rest as identical to those used by the client.
+
+The result MAC digest is included with the optional `hash` and `ext` values:
+
+```
+Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"
+```
+
+
+## Browser Support and Considerations
+
+A browser script is provided for including using a `');
+ expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e');
+ done();
+ });
+
+ it('encodes \' characters', function (done) {
+
+ var encoded = Hoek.escapeJavaScript('something(\'param\')');
+ expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29');
+ done();
+ });
+
+ it('encodes large unicode characters with the correct padding', function (done) {
+
+ var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000));
+ expect(encoded).to.equal('\\u0500\\u1000');
+ done();
+ });
+
+ it('doesn\'t throw an exception when passed null', function (done) {
+
+ var encoded = Hoek.escapeJavaScript(null);
+ expect(encoded).to.equal('');
+ done();
+ });
+});
+
+describe('escapeHtml()', function () {
+
+ it('encodes / characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('');
+ expect(encoded).to.equal('<script>alert(1)</script>');
+ done();
+ });
+
+ it('encodes < and > as named characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('
+