├── models ├── sponsor.js ├── trip.js ├── backer.js ├── following.js ├── comment.js └── venue.js ├── controllers ├── sponsors.js ├── trips.js ├── auth.js ├── following.js ├── api.js ├── comments.js ├── users.js ├── watchlists.js └── venues.js ├── config ├── development.json └── default.json ├── .bowerrc ├── public ├── images │ ├── logo.gif │ ├── logo.png │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon-96x96.png │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── twitter_logo.png │ ├── apple-touch-icon.png │ ├── about │ │ └── upcoming_2007.png │ ├── android-chrome-36x36.png │ ├── android-chrome-48x48.png │ ├── android-chrome-72x72.png │ ├── android-chrome-96x96.png │ ├── android-chrome-144x144.png │ ├── android-chrome-192x192.png │ ├── apple-touch-icon-114x114.png │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-144x144.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-180x180.png │ ├── apple-touch-icon-57x57.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-72x72.png │ ├── apple-touch-icon-76x76.png │ └── apple-touch-icon-precomposed.png ├── components │ ├── jquery │ │ ├── src │ │ │ ├── var │ │ │ │ ├── arr.js │ │ │ │ ├── document.js │ │ │ │ ├── getProto.js │ │ │ │ ├── push.js │ │ │ │ ├── class2type.js │ │ │ │ ├── concat.js │ │ │ │ ├── indexOf.js │ │ │ │ ├── slice.js │ │ │ │ ├── pnum.js │ │ │ │ ├── fnToString.js │ │ │ │ ├── toString.js │ │ │ │ ├── hasOwn.js │ │ │ │ ├── documentElement.js │ │ │ │ ├── support.js │ │ │ │ ├── ObjectFunctionString.js │ │ │ │ ├── rcssNum.js │ │ │ │ └── rnothtmlwhite.js │ │ │ ├── selector.js │ │ │ ├── .eslintrc.json │ │ │ ├── ajax │ │ │ │ ├── var │ │ │ │ │ ├── rquery.js │ │ │ │ │ ├── location.js │ │ │ │ │ └── nonce.js │ │ │ │ └── parseXML.js │ │ │ ├── css │ │ │ │ ├── var │ │ │ │ │ ├── rmargin.js │ │ │ │ │ ├── cssExpand.js │ │ │ │ │ ├── rnumnonpx.js │ │ │ │ │ ├── getStyles.js │ │ │ │ │ ├── swap.js │ │ │ │ │ └── isHiddenWithinTree.js │ │ │ │ ├── hiddenVisibleSelectors.js │ │ │ │ └── addGetHookIf.js │ │ │ ├── data │ │ │ │ └── var │ │ │ │ │ ├── dataPriv.js │ │ │ │ │ ├── dataUser.js │ │ │ │ │ └── acceptData.js │ │ │ ├── manipulation │ │ │ │ ├── var │ │ │ │ │ ├── rcheckableType.js │ │ │ │ │ ├── rscriptType.js │ │ │ │ │ └── rtagName.js │ │ │ │ ├── _evalUrl.js │ │ │ │ ├── setGlobalEval.js │ │ │ │ ├── getAll.js │ │ │ │ ├── wrapMap.js │ │ │ │ └── support.js │ │ │ ├── core │ │ │ │ ├── var │ │ │ │ │ └── rsingleTag.js │ │ │ │ ├── readyException.js │ │ │ │ ├── nodeName.js │ │ │ │ ├── DOMEval.js │ │ │ │ ├── stripAndCollapse.js │ │ │ │ ├── support.js │ │ │ │ ├── access.js │ │ │ │ └── parseHTML.js │ │ │ ├── traversing │ │ │ │ └── var │ │ │ │ │ ├── rneedsContext.js │ │ │ │ │ ├── siblings.js │ │ │ │ │ └── dir.js │ │ │ ├── event │ │ │ │ ├── support.js │ │ │ │ ├── ajax.js │ │ │ │ ├── alias.js │ │ │ │ └── focusin.js │ │ │ ├── attributes.js │ │ │ ├── effects │ │ │ │ └── animatedSelector.js │ │ │ ├── selector-sizzle.js │ │ │ ├── deferred │ │ │ │ └── exceptionHook.js │ │ │ ├── queue │ │ │ │ └── delay.js │ │ │ ├── exports │ │ │ │ ├── global.js │ │ │ │ └── amd.js │ │ │ ├── jquery.js │ │ │ ├── attributes │ │ │ │ └── support.js │ │ │ ├── deprecated.js │ │ │ └── wrap.js │ │ ├── bower.json │ │ ├── .bower.json │ │ ├── LICENSE.txt │ │ └── external │ │ │ └── sizzle │ │ │ └── LICENSE.txt │ ├── moment │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── locale │ │ │ │ │ ├── pre-post-format.js │ │ │ │ │ ├── constructor.js │ │ │ │ │ ├── invalid.js │ │ │ │ │ ├── ordinal.js │ │ │ │ │ ├── calendar.js │ │ │ │ │ ├── en.js │ │ │ │ │ ├── formats.js │ │ │ │ │ ├── relative.js │ │ │ │ │ ├── locale.js │ │ │ │ │ └── base-config.js │ │ │ │ ├── moment │ │ │ │ │ ├── now.js │ │ │ │ │ ├── clone.js │ │ │ │ │ ├── creation-data.js │ │ │ │ │ ├── valid.js │ │ │ │ │ ├── to.js │ │ │ │ │ ├── from.js │ │ │ │ │ ├── moment.js │ │ │ │ │ ├── to-type.js │ │ │ │ │ ├── locale.js │ │ │ │ │ ├── calendar.js │ │ │ │ │ ├── get-set.js │ │ │ │ │ └── start-end-of.js │ │ │ │ ├── utils │ │ │ │ │ ├── is-undefined.js │ │ │ │ │ ├── has-own-prop.js │ │ │ │ │ ├── is-date.js │ │ │ │ │ ├── is-array.js │ │ │ │ │ ├── is-number.js │ │ │ │ │ ├── is-function.js │ │ │ │ │ ├── abs-ceil.js │ │ │ │ │ ├── map.js │ │ │ │ │ ├── abs-round.js │ │ │ │ │ ├── abs-floor.js │ │ │ │ │ ├── is-object-empty.js │ │ │ │ │ ├── is-object.js │ │ │ │ │ ├── defaults.js │ │ │ │ │ ├── to-int.js │ │ │ │ │ ├── zero-fill.js │ │ │ │ │ ├── hooks.js │ │ │ │ │ ├── keys.js │ │ │ │ │ ├── index-of.js │ │ │ │ │ ├── extend.js │ │ │ │ │ ├── some.js │ │ │ │ │ └── compare-arrays.js │ │ │ │ ├── create │ │ │ │ │ ├── local.js │ │ │ │ │ ├── utc.js │ │ │ │ │ ├── from-object.js │ │ │ │ │ ├── date-from-array.js │ │ │ │ │ ├── parsing-flags.js │ │ │ │ │ ├── check-overflow.js │ │ │ │ │ ├── valid.js │ │ │ │ │ └── from-string-and-array.js │ │ │ │ ├── units │ │ │ │ │ ├── constants.js │ │ │ │ │ ├── timezone.js │ │ │ │ │ ├── priorities.js │ │ │ │ │ ├── units.js │ │ │ │ │ ├── timestamp.js │ │ │ │ │ ├── minute.js │ │ │ │ │ ├── second.js │ │ │ │ │ ├── quarter.js │ │ │ │ │ ├── aliases.js │ │ │ │ │ ├── day-of-year.js │ │ │ │ │ └── day-of-month.js │ │ │ │ ├── duration │ │ │ │ │ ├── duration.js │ │ │ │ │ ├── abs.js │ │ │ │ │ ├── add-subtract.js │ │ │ │ │ ├── get.js │ │ │ │ │ ├── valid.js │ │ │ │ │ ├── constructor.js │ │ │ │ │ └── iso-string.js │ │ │ │ └── parse │ │ │ │ │ └── token.js │ │ │ └── locale │ │ │ │ ├── ar-tn.js │ │ │ │ ├── km.js │ │ │ │ ├── uz.js │ │ │ │ ├── ar-kw.js │ │ │ │ ├── tzm.js │ │ │ │ ├── ar-dz.js │ │ │ │ ├── uz-latn.js │ │ │ │ ├── da.js │ │ │ │ ├── sw.js │ │ │ │ ├── nn.js │ │ │ │ ├── tzm-latn.js │ │ │ │ ├── fo.js │ │ │ │ ├── ar-ma.js │ │ │ │ ├── ko.js │ │ │ │ └── yo.js │ │ ├── templates │ │ │ ├── default.js │ │ │ ├── locale-header.js │ │ │ └── test-header.js │ │ ├── bower.json │ │ ├── .bower.json │ │ └── LICENSE │ ├── geocomplete │ │ ├── examples │ │ │ ├── logger.js │ │ │ ├── styles.css │ │ │ ├── location.html │ │ │ ├── api.html │ │ │ ├── multiple_results.html │ │ │ ├── bounds.html │ │ │ ├── simple.html │ │ │ └── country_limit.html │ │ ├── build.sh │ │ ├── bower.json │ │ ├── .bower.json │ │ ├── changelog.txt │ │ ├── MIT-LICENSE.txt │ │ └── package.json │ ├── corejs-typeahead │ │ ├── index.js │ │ ├── .gitignore │ │ ├── src │ │ │ ├── bloodhound │ │ │ │ ├── version.js │ │ │ │ ├── remote.js │ │ │ │ └── tokenizers.js │ │ │ └── typeahead │ │ │ │ ├── status.js │ │ │ │ └── event_bus.js │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── bower.json │ │ ├── test │ │ │ ├── common │ │ │ │ └── utils_spec.js │ │ │ ├── ci │ │ │ ├── fixtures │ │ │ │ ├── html.js │ │ │ │ └── ajax_responses.js │ │ │ ├── typeahead │ │ │ │ └── event_bus_spec.js │ │ │ └── bloodhound │ │ │ │ └── lru_cache_spec.js │ │ ├── composer.json │ │ ├── .bower.json │ │ ├── license │ │ ├── .travis.yml │ │ └── karma.conf.js │ └── typeahead.js │ │ ├── .gitignore │ │ ├── src │ │ └── bloodhound │ │ │ ├── version.js │ │ │ ├── tokenizers.js │ │ │ └── remote.js │ │ ├── .jshintrc │ │ ├── bower.json │ │ ├── test │ │ ├── ci │ │ ├── fixtures │ │ │ ├── html.js │ │ │ └── ajax_responses.js │ │ ├── typeahead │ │ │ └── event_bus_spec.js │ │ └── bloodhound │ │ │ └── lru_cache_spec.js │ │ ├── composer.json │ │ ├── .bower.json │ │ ├── LICENSE │ │ ├── typeahead.js.jquery.json │ │ ├── .travis.yml │ │ └── karma.conf.js └── js │ ├── watchlists.js │ └── global.js ├── views ├── error.pug ├── alert.pug ├── backers.pug ├── 404.pug ├── guidelines.pug ├── following.pug ├── place-list.pug ├── user.pug ├── venue.pug ├── place.pug └── news.pug ├── .gitignore ├── db └── migrations │ └── 2016-06-04_disallow_duplicate_watchlists.sql ├── db.js ├── README.md └── package.json /models/sponsor.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/trip.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /controllers/sponsors.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /controllers/trips.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/development.json: -------------------------------------------------------------------------------- 1 | ../../private/conf/development.json -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "public/components/" 3 | } 4 | -------------------------------------------------------------------------------- /public/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/logo.gif -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/logo.png -------------------------------------------------------------------------------- /public/components/jquery/src/var/arr.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return []; 5 | } ); 6 | -------------------------------------------------------------------------------- /public/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/favicon.ico -------------------------------------------------------------------------------- /public/components/jquery/src/selector.js: -------------------------------------------------------------------------------- 1 | define( [ "./selector-sizzle" ], function() { 2 | "use strict"; 3 | } ); 4 | -------------------------------------------------------------------------------- /public/components/jquery/src/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "../.eslintrc-browser.json" 5 | } 6 | -------------------------------------------------------------------------------- /public/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/favicon-16x16.png -------------------------------------------------------------------------------- /public/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/favicon-32x32.png -------------------------------------------------------------------------------- /public/images/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/favicon-96x96.png -------------------------------------------------------------------------------- /public/images/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/mstile-144x144.png -------------------------------------------------------------------------------- /public/images/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/mstile-150x150.png -------------------------------------------------------------------------------- /public/images/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/mstile-310x150.png -------------------------------------------------------------------------------- /public/images/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/mstile-310x310.png -------------------------------------------------------------------------------- /public/images/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/mstile-70x70.png -------------------------------------------------------------------------------- /public/images/twitter_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/twitter_logo.png -------------------------------------------------------------------------------- /views/error.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | 4 | # So we don't accidentally overwrite from local copy 5 | config/default.json 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/ajax/var/rquery.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /\?/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /public/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon.png -------------------------------------------------------------------------------- /public/components/jquery/src/css/var/rmargin.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^margin/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/document.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.document; 5 | } ); 6 | -------------------------------------------------------------------------------- /public/images/about/upcoming_2007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/about/upcoming_2007.png -------------------------------------------------------------------------------- /public/components/jquery/src/ajax/var/location.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.location; 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/getProto.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return Object.getPrototypeOf; 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/pre-post-format.js: -------------------------------------------------------------------------------- 1 | export function preParsePostFormat (string) { 2 | return string; 3 | } 4 | -------------------------------------------------------------------------------- /public/images/android-chrome-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/android-chrome-36x36.png -------------------------------------------------------------------------------- /public/images/android-chrome-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/android-chrome-48x48.png -------------------------------------------------------------------------------- /public/images/android-chrome-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/android-chrome-72x72.png -------------------------------------------------------------------------------- /public/images/android-chrome-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/android-chrome-96x96.png -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/now.js: -------------------------------------------------------------------------------- 1 | export var now = function () { 2 | return Date.now ? Date.now() : +(new Date()); 3 | }; 4 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-undefined.js: -------------------------------------------------------------------------------- 1 | export default function isUndefined(input) { 2 | return input === void 0; 3 | } 4 | -------------------------------------------------------------------------------- /public/images/android-chrome-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/android-chrome-144x144.png -------------------------------------------------------------------------------- /public/images/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /public/images/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /public/components/jquery/src/var/push.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.push; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/class2type.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // [[Class]] -> type pairs 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/concat.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.concat; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/indexOf.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.indexOf; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/slice.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.slice; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/images/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcoming/upcoming-www/master/public/images/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /db/migrations/2016-06-04_disallow_duplicate_watchlists.sql: -------------------------------------------------------------------------------- 1 | ALTER IGNORE TABLE `watchlist` ADD UNIQUE KEY `watchlist_event_user` (`event_id`, `user_id`); 2 | -------------------------------------------------------------------------------- /public/components/jquery/src/css/var/cssExpand.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return [ "Top", "Right", "Bottom", "Left" ]; 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/data/var/dataPriv.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/data/var/dataUser.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/var/rcheckableType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^(?:checkbox|radio)$/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/var/rscriptType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^$|\/(?:java|ecma)script/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/pnum.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/ajax/var/nonce.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | "use strict"; 5 | 6 | return jQuery.now(); 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/var/rtagName.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/fnToString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./hasOwn" 3 | ], function( hasOwn ) { 4 | "use strict"; 5 | 6 | return hasOwn.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/constructor.js: -------------------------------------------------------------------------------- 1 | export function Locale(config) { 2 | if (config != null) { 3 | this.set(config); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/clone.js: -------------------------------------------------------------------------------- 1 | import { Moment } from './constructor'; 2 | 3 | export function clone () { 4 | return new Moment(this); 5 | } 6 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/has-own-prop.js: -------------------------------------------------------------------------------- 1 | export default function hasOwnProp(a, b) { 2 | return Object.prototype.hasOwnProperty.call(a, b); 3 | } 4 | -------------------------------------------------------------------------------- /views/alert.pug: -------------------------------------------------------------------------------- 1 | if alert 2 | - for (var i = 0; i < alert.messages.length; i++) 3 | div.alert(class=alert.type, role='alert') 4 | | #{alert.messages[i].msg} 5 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/logger.js: -------------------------------------------------------------------------------- 1 | $.log = function(message){ 2 | var $logger = $("#logger"); 3 | $logger.html($logger.html() + "\n * " + message ); 4 | } 5 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/toString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/hasOwn.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.hasOwnProperty; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/documentElement.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | return document.documentElement; 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/support.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // All support tests are defined in their respective modules. 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/invalid.js: -------------------------------------------------------------------------------- 1 | export var defaultInvalidDate = 'Invalid date'; 2 | 3 | export function invalidDate () { 4 | return this._invalidDate; 5 | } 6 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/ObjectFunctionString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./fnToString" 3 | ], function( fnToString ) { 4 | "use strict"; 5 | 6 | return fnToString.call( Object ); 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-date.js: -------------------------------------------------------------------------------- 1 | export default function isDate(input) { 2 | return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; 3 | } 4 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-array.js: -------------------------------------------------------------------------------- 1 | export default function isArray(input) { 2 | return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; 3 | } 4 | -------------------------------------------------------------------------------- /public/components/jquery/src/css/var/rnumnonpx.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../var/pnum" 3 | ], function( pnum ) { 4 | "use strict"; 5 | 6 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 7 | } ); 8 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-number.js: -------------------------------------------------------------------------------- 1 | export default function isNumber(input) { 2 | return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; 3 | } 4 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-function.js: -------------------------------------------------------------------------------- 1 | export default function isFunction(input) { 2 | return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; 3 | } 4 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/var/rsingleTag.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // Match a standalone tag 5 | return ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 6 | } ); 7 | -------------------------------------------------------------------------------- /public/components/jquery/src/traversing/var/rneedsContext.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core", 3 | "../../selector" 4 | ], function( jQuery ) { 5 | "use strict"; 6 | 7 | return jQuery.expr.match.needsContext; 8 | } ); 9 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/rcssNum.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/pnum" 3 | ], function( pnum ) { 4 | 5 | "use strict"; 6 | 7 | return new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 8 | 9 | } ); 10 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | "Bloodhound": require("./dist/bloodhound.js"), 5 | "loadjQueryPlugin": function() {require("./dist/typeahead.bundle.js");} 6 | }; 7 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/abs-ceil.js: -------------------------------------------------------------------------------- 1 | export default function absCeil (number) { 2 | if (number < 0) { 3 | return Math.floor(number); 4 | } else { 5 | return Math.ceil(number); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/map.js: -------------------------------------------------------------------------------- 1 | export default function map(arr, fn) { 2 | var res = [], i; 3 | for (i = 0; i < arr.length; ++i) { 4 | res.push(fn(arr[i], i)); 5 | } 6 | return res; 7 | } 8 | -------------------------------------------------------------------------------- /public/components/jquery/src/event/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | "use strict"; 6 | 7 | support.focusin = "onfocusin" in window; 8 | 9 | return support; 10 | 11 | } ); 12 | -------------------------------------------------------------------------------- /views/backers.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .col-md-12 5 | .page-header 6 | h1 Kickstarter Backers 7 | 8 | each result in results 9 | .col-xs-6.col-sm-4.col-md-3 10 | p= result.backer.name 11 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/abs-round.js: -------------------------------------------------------------------------------- 1 | export default function absRound (number) { 2 | if (number < 0) { 3 | return Math.round(-1 * number) * -1; 4 | } else { 5 | return Math.round(number); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /public/components/typeahead.js/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .DS_Store 3 | 4 | .grunt 5 | _SpecRunner.html 6 | test/coverage 7 | 8 | dist_temp 9 | 10 | node_modules 11 | npm-debug.log 12 | 13 | bower_components 14 | 15 | *.iml 16 | .idea 17 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .DS_Store 3 | 4 | .grunt 5 | _SpecRunner.html 6 | test/coverage 7 | 8 | dist_temp 9 | 10 | node_modules 11 | npm-debug.log 12 | 13 | bower_components 14 | 15 | *.iml 16 | .idea 17 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/local.js: -------------------------------------------------------------------------------- 1 | import { createLocalOrUTC } from './from-anything'; 2 | 3 | export function createLocal (input, format, locale, strict) { 4 | return createLocalOrUTC(input, format, locale, strict, false); 5 | } 6 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/utc.js: -------------------------------------------------------------------------------- 1 | import { createLocalOrUTC } from './from-anything'; 2 | 3 | export function createUTC (input, format, locale, strict) { 4 | return createLocalOrUTC(input, format, locale, strict, true).utc(); 5 | } 6 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/ordinal.js: -------------------------------------------------------------------------------- 1 | export var defaultOrdinal = '%d'; 2 | export var defaultDayOfMonthOrdinalParse = /\d{1,2}/; 3 | 4 | export function ordinal (number) { 5 | return this._ordinal.replace('%d', number); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /public/components/typeahead.js/src/bloodhound/version.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var VERSION = '%VERSION%'; 8 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/src/bloodhound/version.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var VERSION = '%VERSION%'; 8 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/abs-floor.js: -------------------------------------------------------------------------------- 1 | export default function absFloor (number) { 2 | if (number < 0) { 3 | // -0 -> 0 4 | return Math.ceil(number) || 0; 5 | } else { 6 | return Math.floor(number); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-object-empty.js: -------------------------------------------------------------------------------- 1 | export default function isObjectEmpty(obj) { 2 | var k; 3 | for (k in obj) { 4 | // even if its not own property I'd still call it non-empty 5 | return false; 6 | } 7 | return true; 8 | } 9 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/readyException.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery.readyException = function( error ) { 8 | window.setTimeout( function() { 9 | throw error; 10 | } ); 11 | }; 12 | 13 | } ); 14 | -------------------------------------------------------------------------------- /public/components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ] 14 | } -------------------------------------------------------------------------------- /public/components/jquery/src/core/nodeName.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | function nodeName( elem, name ) { 6 | 7 | return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 8 | 9 | }; 10 | 11 | return nodeName; 12 | 13 | } ); 14 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/creation-data.js: -------------------------------------------------------------------------------- 1 | export function creationData() { 2 | return { 3 | input: this._i, 4 | format: this._f, 5 | locale: this._locale, 6 | isUTC: this._isUTC, 7 | strict: this._strict 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/is-object.js: -------------------------------------------------------------------------------- 1 | export default function isObject(input) { 2 | // IE8 will treat undefined and null as object if it wasn't for 3 | // input != null 4 | return input != null && Object.prototype.toString.call(input) === '[object Object]'; 5 | } 6 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/constants.js: -------------------------------------------------------------------------------- 1 | export var YEAR = 0; 2 | export var MONTH = 1; 3 | export var DATE = 2; 4 | export var HOUR = 3; 5 | export var MINUTE = 4; 6 | export var SECOND = 5; 7 | export var MILLISECOND = 6; 8 | export var WEEK = 7; 9 | export var WEEKDAY = 8; 10 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/defaults.js: -------------------------------------------------------------------------------- 1 | // Pick the first defined of two or three arguments. 2 | export default function defaults(a, b, c) { 3 | if (a != null) { 4 | return a; 5 | } 6 | if (b != null) { 7 | return b; 8 | } 9 | return c; 10 | } 11 | -------------------------------------------------------------------------------- /public/components/jquery/src/var/rnothtmlwhite.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // Only count HTML whitespace 5 | // Other whitespace should count in values 6 | // https://html.spec.whatwg.org/multipage/infrastructure.html#space-character 7 | return ( /[^\x20\t\r\n\f]+/g ); 8 | } ); 9 | -------------------------------------------------------------------------------- /views/404.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block includes 4 | 5 | 6 | block content 7 | .col-xs-12.col-sm-10.col-sm-offset-1.col-md-8.col-lg-6 8 | .page-header 9 | h1 404 Not Found 10 | 11 | center 12 | span(style="font-size: 120px") 🤷 -------------------------------------------------------------------------------- /public/components/jquery/src/attributes.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./attributes/attr", 4 | "./attributes/prop", 5 | "./attributes/classes", 6 | "./attributes/val" 7 | ], function( jQuery ) { 8 | 9 | "use strict"; 10 | 11 | // Return jQuery for attributes-only inclusion 12 | return jQuery; 13 | } ); 14 | -------------------------------------------------------------------------------- /public/components/moment/templates/default.js: -------------------------------------------------------------------------------- 1 | ;(function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 3 | typeof define === 'function' && define.amd ? define(factory) : 4 | global.moment = factory() 5 | }(this, (function () { 'use strict'; 6 | -------------------------------------------------------------------------------- /public/components/typeahead.js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "newcap": true, 4 | "noarg": true, 5 | "quotmark": "single", 6 | "regexp": true, 7 | "trailing": true, 8 | 9 | "boss": true, 10 | "eqnull": true, 11 | "expr": true, 12 | "validthis": true, 13 | 14 | "browser": true, 15 | "jquery": true 16 | } 17 | -------------------------------------------------------------------------------- /public/components/typeahead.js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typeahead.js", 3 | "version": "0.11.1", 4 | "main": "dist/typeahead.bundle.js", 5 | "dependencies": { 6 | "jquery": ">=1.7" 7 | }, 8 | "devDependencies": { 9 | "jquery": "~1.7", 10 | "jasmine-ajax": "~1.3.1", 11 | "jasmine-jquery": "~1.5.2" 12 | } 13 | } -------------------------------------------------------------------------------- /public/components/corejs-typeahead/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "newcap": true, 4 | "noarg": true, 5 | "quotmark": "single", 6 | "regexp": true, 7 | "trailing": true, 8 | 9 | "boss": true, 10 | "eqnull": true, 11 | "expr": true, 12 | "validthis": true, 13 | 14 | "browser": true, 15 | "jquery": true 16 | } 17 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/.npmignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .DS_Store 3 | .grunt 4 | _SpecRunner.html 5 | test/coverage 6 | dist_temp 7 | node_modules 8 | npm-debug.log 9 | bower_components 10 | test 11 | *.iml 12 | .idea 13 | .jshintrc 14 | .npmignore 15 | .travis.yml 16 | composer.json 17 | contributing.md 18 | Gruntfile.js 19 | karma.conf.js 20 | -------------------------------------------------------------------------------- /public/components/jquery/src/traversing/var/siblings.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | return function( n, elem ) { 6 | var matched = []; 7 | 8 | for ( ; n; n = n.nextSibling ) { 9 | if ( n.nodeType === 1 && n !== elem ) { 10 | matched.push( n ); 11 | } 12 | } 13 | 14 | return matched; 15 | }; 16 | 17 | } ); 18 | -------------------------------------------------------------------------------- /db.js: -------------------------------------------------------------------------------- 1 | var config = require('config'); 2 | 3 | var mysql = require('mysql'); 4 | var db = mysql.createPool({ 5 | connectionLimit : 10, 6 | host : config.database.host, 7 | user : config.database.user, 8 | password : config.database.pass, 9 | database : config.database.database, 10 | charset : 'utf8mb4' 11 | }); 12 | 13 | module.exports = db -------------------------------------------------------------------------------- /public/components/jquery/src/effects/animatedSelector.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../selector", 4 | "../effects" 5 | ], function( jQuery ) { 6 | 7 | "use strict"; 8 | 9 | jQuery.expr.pseudos.animated = function( elem ) { 10 | return jQuery.grep( jQuery.timers, function( fn ) { 11 | return elem === fn.elem; 12 | } ).length; 13 | }; 14 | 15 | } ); 16 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/to-int.js: -------------------------------------------------------------------------------- 1 | import absFloor from './abs-floor'; 2 | 3 | export default function toInt(argumentForCoercion) { 4 | var coercedNumber = +argumentForCoercion, 5 | value = 0; 6 | 7 | if (coercedNumber !== 0 && isFinite(coercedNumber)) { 8 | value = absFloor(coercedNumber); 9 | } 10 | 11 | return value; 12 | } 13 | -------------------------------------------------------------------------------- /public/components/moment/templates/locale-header.js: -------------------------------------------------------------------------------- 1 | ;(function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' 3 | && typeof require === 'function' ? factory(require('../moment')) : 4 | typeof define === 'function' && define.amd ? define(['../moment'], factory) : 5 | factory(global.moment) 6 | }(this, (function (moment) { 'use strict'; 7 | -------------------------------------------------------------------------------- /public/components/moment/templates/test-header.js: -------------------------------------------------------------------------------- 1 | ;(function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' 3 | && typeof require === 'function' ? factory(require('../../moment')) : 4 | typeof define === 'function' && define.amd ? define(['../../moment'], factory) : 5 | factory(global.moment) 6 | }(this, (function (moment) { 'use strict'; 7 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/zero-fill.js: -------------------------------------------------------------------------------- 1 | export default function zeroFill(number, targetLength, forceSign) { 2 | var absNumber = '' + Math.abs(number), 3 | zerosToFill = targetLength - absNumber.length, 4 | sign = number >= 0; 5 | return (sign ? (forceSign ? '+' : '') : '-') + 6 | Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; 7 | } 8 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/hooks.js: -------------------------------------------------------------------------------- 1 | export { hooks, setHookCallback }; 2 | 3 | var hookCallback; 4 | 5 | function hooks () { 6 | return hookCallback.apply(null, arguments); 7 | } 8 | 9 | // This is done to register the method called with moment() 10 | // without creating circular dependencies. 11 | function setHookCallback (callback) { 12 | hookCallback = callback; 13 | } 14 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/DOMEval.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | function DOMEval( code, doc ) { 7 | doc = doc || document; 8 | 9 | var script = doc.createElement( "script" ); 10 | 11 | script.text = code; 12 | doc.head.appendChild( script ).parentNode.removeChild( script ); 13 | } 14 | 15 | return DOMEval; 16 | } ); 17 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "corejs-typeahead", 3 | "version": "1.0.1", 4 | "main": "dist/typeahead.bundle.js", 5 | "dependencies": { 6 | "jquery": ">=1.11" 7 | }, 8 | "devDependencies": { 9 | "jquery": "~1.11", 10 | "jasmine-ajax": "~1.3.1", 11 | "jasmine-jquery": "~1.7.0" 12 | }, 13 | "resolutions": { 14 | "jquery": "1.11.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/test/common/utils_spec.js: -------------------------------------------------------------------------------- 1 | describe('utils', function() { 2 | 3 | describe('guid', function() { 4 | 5 | it('should return unique strings', function() { 6 | var a = _.guid(); 7 | var b = _.guid(); 8 | 9 | expect(typeof a).toEqual('string'); 10 | expect(typeof b).toEqual('string'); 11 | expect(a).toNotEqual(b); 12 | }); 13 | 14 | }); 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /public/components/jquery/src/css/hiddenVisibleSelectors.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../selector" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.expr.pseudos.hidden = function( elem ) { 9 | return !jQuery.expr.pseudos.visible( elem ); 10 | }; 11 | jQuery.expr.pseudos.visible = function( elem ) { 12 | return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 13 | }; 14 | 15 | } ); 16 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/timezone.js: -------------------------------------------------------------------------------- 1 | import { addFormatToken } from '../format/format'; 2 | 3 | // FORMATTING 4 | 5 | addFormatToken('z', 0, 0, 'zoneAbbr'); 6 | addFormatToken('zz', 0, 0, 'zoneName'); 7 | 8 | // MOMENTS 9 | 10 | export function getZoneAbbr () { 11 | return this._isUTC ? 'UTC' : ''; 12 | } 13 | 14 | export function getZoneName () { 15 | return this._isUTC ? 'Coordinated Universal Time' : ''; 16 | } 17 | -------------------------------------------------------------------------------- /public/components/jquery/src/data/var/acceptData.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | /** 6 | * Determines whether an object can have data 7 | */ 8 | return function( owner ) { 9 | 10 | // Accepts only: 11 | // - Node 12 | // - Node.ELEMENT_NODE 13 | // - Node.DOCUMENT_NODE 14 | // - Object 15 | // - Any 16 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 17 | }; 18 | 19 | } ); 20 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/duration.js: -------------------------------------------------------------------------------- 1 | // Side effect imports 2 | import './prototype'; 3 | 4 | import { createDuration } from './create'; 5 | import { isDuration } from './constructor'; 6 | import { 7 | getSetRelativeTimeRounding, 8 | getSetRelativeTimeThreshold 9 | } from './humanize'; 10 | 11 | export { 12 | createDuration, 13 | isDuration, 14 | getSetRelativeTimeRounding, 15 | getSetRelativeTimeThreshold 16 | }; 17 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/keys.js: -------------------------------------------------------------------------------- 1 | import hasOwnProp from './has-own-prop'; 2 | 3 | var keys; 4 | 5 | if (Object.keys) { 6 | keys = Object.keys; 7 | } else { 8 | keys = function (obj) { 9 | var i, res = []; 10 | for (i in obj) { 11 | if (hasOwnProp(obj, i)) { 12 | res.push(i); 13 | } 14 | } 15 | return res; 16 | }; 17 | } 18 | 19 | export { keys as default }; 20 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/index-of.js: -------------------------------------------------------------------------------- 1 | var indexOf; 2 | 3 | if (Array.prototype.indexOf) { 4 | indexOf = Array.prototype.indexOf; 5 | } else { 6 | indexOf = function (o) { 7 | // I know 8 | var i; 9 | for (i = 0; i < this.length; ++i) { 10 | if (this[i] === o) { 11 | return i; 12 | } 13 | } 14 | return -1; 15 | }; 16 | } 17 | 18 | export { indexOf as default }; 19 | -------------------------------------------------------------------------------- /controllers/auth.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var passport = require('../passport.js'); 4 | 5 | router.get('/twitter', passport.authenticate('twitter', { 6 | scope: ["offline.access", "tweet.read", "users.read"] 7 | })); 8 | 9 | router.get('/twitter/callback', 10 | passport.authenticate('twitter', { 11 | successReturnToOrRedirect: '/', 12 | failureRedirect: '/' 13 | })); 14 | 15 | module.exports = router; 16 | -------------------------------------------------------------------------------- /public/components/geocomplete/build.sh: -------------------------------------------------------------------------------- 1 | # sh build.sh 2 | 3 | # minify script 4 | uglifyjs --comments license jquery.geocomplete.js > jquery.geocomplete.min.js 5 | 6 | ## create documentation 7 | docco jquery.geocomplete.js 8 | mv docs/jquery.geocomplete.html docs/index.html 9 | 10 | rm -Rf _temp 11 | 12 | mkdir _temp 13 | mkdir _temp/examples 14 | 15 | mv docs _temp 16 | cp jquery.geocomplete.js _temp/ 17 | cp jquery.geocomplete.min.js _temp/ 18 | cp examples/* _temp/examples -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/valid.js: -------------------------------------------------------------------------------- 1 | import { isValid as _isValid } from '../create/valid'; 2 | import extend from '../utils/extend'; 3 | import getParsingFlags from '../create/parsing-flags'; 4 | 5 | export function isValid () { 6 | return _isValid(this); 7 | } 8 | 9 | export function parsingFlags () { 10 | return extend({}, getParsingFlags(this)); 11 | } 12 | 13 | export function invalidAt () { 14 | return getParsingFlags(this).overflow; 15 | } 16 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/extend.js: -------------------------------------------------------------------------------- 1 | import hasOwnProp from './has-own-prop'; 2 | 3 | export default function extend(a, b) { 4 | for (var i in b) { 5 | if (hasOwnProp(b, i)) { 6 | a[i] = b[i]; 7 | } 8 | } 9 | 10 | if (hasOwnProp(b, 'toString')) { 11 | a.toString = b.toString; 12 | } 13 | 14 | if (hasOwnProp(b, 'valueOf')) { 15 | a.valueOf = b.valueOf; 16 | } 17 | 18 | return a; 19 | } 20 | -------------------------------------------------------------------------------- /models/backer.js: -------------------------------------------------------------------------------- 1 | var db = require('../db.js') 2 | 3 | exports.getAll = function(user, next) { 4 | var sql = 'SELECT backer.id, backer.user_id, backer.name, backer.reward, ' 5 | + 'user.id, user.name, user.username ' 6 | + 'FROM backer LEFT JOIN user ON user.id = backer.user_id ' 7 | + 'ORDER BY backer.name'; 8 | 9 | db.query({sql: sql, nestTables: true}, function (err, rows) { 10 | if (err) return next(err); 11 | next(null, rows); 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /models/following.js: -------------------------------------------------------------------------------- 1 | var db = require('../db.js'); 2 | 3 | /* GET following list */ 4 | exports.get = function(id, next) { 5 | var sql = 'SELECT * FROM user, following ' 6 | + 'WHERE user.id = following.friend_id ' 7 | + 'AND following.user_id = ? ' 8 | + 'AND user.deleted = 0 ' 9 | + 'ORDER BY following.created_at DESC'; 10 | 11 | db.query(sql, id, function (err, result) { 12 | if (err) return next(err); 13 | next(null, result); 14 | }); 15 | }; 16 | -------------------------------------------------------------------------------- /public/components/jquery/src/event/ajax.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../event" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | // Attach a bunch of functions for handling common AJAX events 9 | jQuery.each( [ 10 | "ajaxStart", 11 | "ajaxStop", 12 | "ajaxComplete", 13 | "ajaxError", 14 | "ajaxSuccess", 15 | "ajaxSend" 16 | ], function( i, type ) { 17 | jQuery.fn[ type ] = function( fn ) { 18 | return this.on( type, fn ); 19 | }; 20 | } ); 21 | 22 | } ); 23 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/priorities.js: -------------------------------------------------------------------------------- 1 | var priorities = {}; 2 | 3 | export function addUnitPriority(unit, priority) { 4 | priorities[unit] = priority; 5 | } 6 | 7 | export function getPrioritizedUnits(unitsObj) { 8 | var units = []; 9 | for (var u in unitsObj) { 10 | units.push({unit: u, priority: priorities[u]}); 11 | } 12 | units.sort(function (a, b) { 13 | return a.priority - b.priority; 14 | }); 15 | return units; 16 | } 17 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/stripAndCollapse.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/rnothtmlwhite" 3 | ], function( rnothtmlwhite ) { 4 | "use strict"; 5 | 6 | // Strip and collapse whitespace according to HTML spec 7 | // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace 8 | function stripAndCollapse( value ) { 9 | var tokens = value.match( rnothtmlwhite ) || []; 10 | return tokens.join( " " ); 11 | } 12 | 13 | return stripAndCollapse; 14 | } ); 15 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/_evalUrl.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../ajax" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery._evalUrl = function( url ) { 8 | return jQuery.ajax( { 9 | url: url, 10 | 11 | // Make this explicit, since user can override this through ajaxSetup (#11264) 12 | type: "GET", 13 | dataType: "script", 14 | cache: true, 15 | async: false, 16 | global: false, 17 | "throws": true 18 | } ); 19 | }; 20 | 21 | return jQuery._evalUrl; 22 | 23 | } ); 24 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/some.js: -------------------------------------------------------------------------------- 1 | var some; 2 | if (Array.prototype.some) { 3 | some = Array.prototype.some; 4 | } else { 5 | some = function (fun) { 6 | var t = Object(this); 7 | var len = t.length >>> 0; 8 | 9 | for (var i = 0; i < len; i++) { 10 | if (i in t && fun.call(this, t[i], i, t)) { 11 | return true; 12 | } 13 | } 14 | 15 | return false; 16 | }; 17 | } 18 | 19 | export { some as default }; 20 | -------------------------------------------------------------------------------- /public/components/typeahead.js/test/ci: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | if [ "$TEST_SUITE" == "unit" ]; then 4 | ./node_modules/karma/bin/karma start --single-run --browsers PhantomJS 5 | elif [ "$TRAVIS_SECURE_ENV_VARS" == "true" -a "$TEST_SUITE" == "integration" ]; then 6 | static -p 8888 & 7 | sleep 3 8 | # integration tests are flaky, don't let them fail the build 9 | ./node_modules/mocha/bin/mocha --harmony -R spec ./test/integration/test.js || true 10 | else 11 | echo "Not running any tests" 12 | fi 13 | -------------------------------------------------------------------------------- /public/components/jquery/src/traversing/var/dir.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | return function( elem, dir, until ) { 8 | var matched = [], 9 | truncate = until !== undefined; 10 | 11 | while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 12 | if ( elem.nodeType === 1 ) { 13 | if ( truncate && jQuery( elem ).is( until ) ) { 14 | break; 15 | } 16 | matched.push( elem ); 17 | } 18 | } 19 | return matched; 20 | }; 21 | 22 | } ); 23 | -------------------------------------------------------------------------------- /public/components/jquery/src/css/var/getStyles.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return function( elem ) { 5 | 6 | // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 7 | // IE throws on elements created in popups 8 | // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 9 | var view = elem.ownerDocument.defaultView; 10 | 11 | if ( !view || !view.opener ) { 12 | view = window; 13 | } 14 | 15 | return view.getComputedStyle( elem ); 16 | }; 17 | } ); 18 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/setGlobalEval.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../data/var/dataPriv" 3 | ], function( dataPriv ) { 4 | 5 | "use strict"; 6 | 7 | // Mark scripts as having already been evaluated 8 | function setGlobalEval( elems, refElements ) { 9 | var i = 0, 10 | l = elems.length; 11 | 12 | for ( ; i < l; i++ ) { 13 | dataPriv.set( 14 | elems[ i ], 15 | "globalEval", 16 | !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 17 | ); 18 | } 19 | } 20 | 21 | return setGlobalEval; 22 | } ); 23 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/units.js: -------------------------------------------------------------------------------- 1 | // Side effect imports 2 | import './day-of-month'; 3 | import './day-of-week'; 4 | import './day-of-year'; 5 | import './hour'; 6 | import './millisecond'; 7 | import './minute'; 8 | import './month'; 9 | import './offset'; 10 | import './quarter'; 11 | import './second'; 12 | import './timestamp'; 13 | import './timezone'; 14 | import './week-year'; 15 | import './week'; 16 | import './year'; 17 | 18 | import { normalizeUnits } from './aliases'; 19 | 20 | export { normalizeUnits }; 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # upcoming-www 2 | 3 | Upcoming.org Rebuild 4 | 5 | ## Installation 6 | Initial setup instructions are available on the wiki: https://github.com/upcoming/upcoming-www/wiki 7 | 8 | They are a WIP, so please contribute if you're using another platform or run into any wrinkles (currently there are step-by-steps for Ubuntu 16.04 and OSX w/ MacPorts) 9 | 10 | ## Contributor Guidelines 11 | 12 | TBD 13 | 14 | ## License 15 | This project is released under the Apache 2.0 license. See the LICENSE file for the legal boiler-plate. 16 | -------------------------------------------------------------------------------- /public/components/jquery/src/selector-sizzle.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "../external/sizzle/dist/sizzle" 4 | ], function( jQuery, Sizzle ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.find = Sizzle; 9 | jQuery.expr = Sizzle.selectors; 10 | 11 | // Deprecated 12 | jQuery.expr[ ":" ] = jQuery.expr.pseudos; 13 | jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 14 | jQuery.text = Sizzle.getText; 15 | jQuery.isXMLDoc = Sizzle.isXML; 16 | jQuery.contains = Sizzle.contains; 17 | jQuery.escapeSelector = Sizzle.escape; 18 | 19 | } ); 20 | -------------------------------------------------------------------------------- /controllers/following.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn(); 4 | 5 | var Following = require('../models/following'); 6 | 7 | /* GET following listing. */ 8 | router.get('/', ensureLoggedIn, function(req, res, next) { 9 | Following.get(req.user.id, function (err, following) { 10 | if (err) throw err; 11 | res.render('following', { title: 'Following', following: following}); 12 | }); 13 | }); 14 | 15 | module.exports = router; 16 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/calendar.js: -------------------------------------------------------------------------------- 1 | export var defaultCalendar = { 2 | sameDay : '[Today at] LT', 3 | nextDay : '[Tomorrow at] LT', 4 | nextWeek : 'dddd [at] LT', 5 | lastDay : '[Yesterday at] LT', 6 | lastWeek : '[Last] dddd [at] LT', 7 | sameElse : 'L' 8 | }; 9 | 10 | import isFunction from '../utils/is-function'; 11 | 12 | export function calendar (key, mom, now) { 13 | var output = this._calendar[key] || this._calendar['sameElse']; 14 | return isFunction(output) ? output.call(mom, now) : output; 15 | } 16 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/en.js: -------------------------------------------------------------------------------- 1 | import './prototype'; 2 | import { getSetGlobalLocale } from './locales'; 3 | import toInt from '../utils/to-int'; 4 | 5 | getSetGlobalLocale('en', { 6 | dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 7 | ordinal : function (number) { 8 | var b = number % 10, 9 | output = (toInt(number % 100 / 10) === 1) ? 'th' : 10 | (b === 1) ? 'st' : 11 | (b === 2) ? 'nd' : 12 | (b === 3) ? 'rd' : 'th'; 13 | return number + output; 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /public/components/moment/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "moment", 3 | "license": "MIT", 4 | "main": "moment.js", 5 | "ignore": [ 6 | "**/.*", 7 | "benchmarks", 8 | "bower_components", 9 | "meteor", 10 | "node_modules", 11 | "scripts", 12 | "tasks", 13 | "test", 14 | "component.json", 15 | "composer.json", 16 | "CONTRIBUTING.md", 17 | "ender.js", 18 | "Gruntfile.js", 19 | "Moment.js.nuspec", 20 | "package.js", 21 | "package.json", 22 | "ISSUE_TEMPLATE.md", 23 | "typing-tests" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/test/ci: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | if [ "$TEST_SUITE" == "unit" ]; then 4 | bower install 5 | ./node_modules/karma/bin/karma start --single-run --browsers PhantomJS 6 | elif [ "$TRAVIS_SECURE_ENV_VARS" == "true" -a "$TEST_SUITE" == "integration" ]; then 7 | bower install 8 | ./node_modules/.bin/static -p 8888 & 9 | sleep 3 10 | # integration tests are flaky, don't let them fail the build 11 | ./node_modules/mocha/bin/mocha --harmony -R spec ./test/integration/test.js || true 12 | else 13 | echo "Not running any tests" 14 | fi 15 | -------------------------------------------------------------------------------- /public/components/typeahead.js/test/fixtures/html.js: -------------------------------------------------------------------------------- 1 | var fixtures = fixtures || {}; 2 | 3 | fixtures.html = { 4 | input: '', 5 | hint: '', 6 | dataset: [ 7 | '
', 8 | '

one

', 9 | '

two

', 10 | '

three

', 11 | '
' 12 | ].join('') 13 | }; 14 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/test/fixtures/html.js: -------------------------------------------------------------------------------- 1 | var fixtures = fixtures || {}; 2 | 3 | fixtures.html = { 4 | input: '', 5 | hint: '', 6 | dataset: [ 7 | '
', 8 | '

one

', 9 | '

two

', 10 | '

three

', 11 | '
' 12 | ].join('') 13 | }; 14 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #333; 3 | } 4 | 5 | body, input, button { 6 | line-height: 1.4; 7 | font: 13px Helvetica,arial,freesans,clean,sans-serif; 8 | } 9 | 10 | 11 | a { 12 | color: #4183C4; 13 | text-decoration: none; 14 | } 15 | 16 | #examples a { 17 | text-decoration: underline; 18 | } 19 | 20 | #geocomplete { width: 200px} 21 | 22 | .map_canvas { 23 | width: 600px; 24 | height: 400px; 25 | margin: 10px 20px 10px 0; 26 | } 27 | 28 | #multiple li { 29 | cursor: pointer; 30 | text-decoration: underline; 31 | } -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/from-object.js: -------------------------------------------------------------------------------- 1 | import { normalizeObjectUnits } from '../units/aliases'; 2 | import { configFromArray } from './from-array'; 3 | import map from '../utils/map'; 4 | 5 | export function configFromObject(config) { 6 | if (config._d) { 7 | return; 8 | } 9 | 10 | var i = normalizeObjectUnits(config._i); 11 | config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { 12 | return obj && parseInt(obj, 10); 13 | }); 14 | 15 | configFromArray(config); 16 | } 17 | -------------------------------------------------------------------------------- /views/guidelines.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .col-xs-12.col-sm-10.col-md-8 5 | .page-header 6 | h1 Guidelines 7 | 8 | p. 9 | Upcoming is dedicated to providing a harassment-free experience for everyone, regardless of 10 | gender, age, sexual orientation, disability, physical appearance, body size, race, or 11 | religion (or lack thereof). We do not tolerate harassment of participants in any form. 12 | 13 | p. 14 | These guidelines are a work in progress. More information when the site opens to the 15 | public at large. -------------------------------------------------------------------------------- /public/components/typeahead.js/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitter/typeahead.js", 3 | "description": "fast and fully-featured autocomplete library", 4 | "keywords": ["typeahead", "autocomplete"], 5 | "homepage": "http://twitter.github.com/typeahead.js", 6 | "authors": [ 7 | { 8 | "name": "Twitter Inc.", 9 | "homepage": "https://twitter.com/twitteross" 10 | } 11 | ], 12 | "support": { 13 | "issues": "https://github.com/twitter/typeahead.js/issues" 14 | }, 15 | "author": "Twitter Inc.", 16 | "license": "MIT" 17 | } 18 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitter/typeahead.js", 3 | "description": "fast and fully-featured autocomplete library", 4 | "keywords": ["typeahead", "autocomplete"], 5 | "homepage": "http://twitter.github.com/typeahead.js", 6 | "authors": [ 7 | { 8 | "name": "Twitter Inc.", 9 | "homepage": "https://twitter.com/twitteross" 10 | } 11 | ], 12 | "support": { 13 | "issues": "https://github.com/twitter/typeahead.js/issues" 14 | }, 15 | "author": "Twitter Inc.", 16 | "license": "MIT" 17 | } 18 | -------------------------------------------------------------------------------- /public/components/typeahead.js/test/fixtures/ajax_responses.js: -------------------------------------------------------------------------------- 1 | var fixtures = fixtures || {}; 2 | 3 | fixtures.ajaxResps = { 4 | ok: { 5 | status: 200, 6 | responseText: '[{ "value": "big" }, { "value": "bigger" }, { "value": "biggest" }, { "value": "small" }, { "value": "smaller" }, { "value": "smallest" }]' 7 | }, 8 | ok1: { 9 | status: 200, 10 | responseText: '["dog", "cat", "moose"]' 11 | }, 12 | err: { 13 | status: 500 14 | } 15 | }; 16 | 17 | $.each(fixtures.ajaxResps, function(i, resp) { 18 | resp.responseText && (resp.parsed = $.parseJSON(resp.responseText)); 19 | }); 20 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/test/fixtures/ajax_responses.js: -------------------------------------------------------------------------------- 1 | var fixtures = fixtures || {}; 2 | 3 | fixtures.ajaxResps = { 4 | ok: { 5 | status: 200, 6 | responseText: '[{ "value": "big" }, { "value": "bigger" }, { "value": "biggest" }, { "value": "small" }, { "value": "smaller" }, { "value": "smallest" }]' 7 | }, 8 | ok1: { 9 | status: 200, 10 | responseText: '["dog", "cat", "moose"]' 11 | }, 12 | err: { 13 | status: 500 14 | } 15 | }; 16 | 17 | $.each(fixtures.ajaxResps, function(i, resp) { 18 | resp.responseText && (resp.parsed = $.parseJSON(resp.responseText)); 19 | }); 20 | -------------------------------------------------------------------------------- /views/following.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .col-xs-12.col-sm-10.col-md-8 5 | .page-header 6 | h1= title 7 | 8 | each friend in following 9 | - var avatar = friend.avatar_image_url ? friend.avatar_image_url : 'https://avatars.io/twitter/' + friend.username + '/small' 10 | .friend.clearfix 11 | img.img-rounded(alt='', src=avatar, style='float: left; margin-bottom: 10px; margin-right: 10px; width: 48px; height: 48px;') 12 | h4 13 | a(href='/@' + friend.username) #{friend.name} 14 | small 15 | | @#{friend.username} 16 | -------------------------------------------------------------------------------- /public/js/watchlists.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('input.status').change(function(e) { 3 | e.stopPropagation(); 4 | 5 | var form = $(this).parents('form:first'); 6 | 7 | // disable 8 | $('input.status', form).not(this).prop('checked', false); 9 | $('input.status', form).not(this).closest('label').removeClass('active'); 10 | 11 | var post = { 12 | event_id: $('.event_id', form).val(), 13 | status: $('input:checked', form).val() 14 | }; 15 | 16 | $.post('/watchlist', post, function(data) {}); 17 | 18 | return false; 19 | }); 20 | 21 | }); 22 | 23 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/utils/compare-arrays.js: -------------------------------------------------------------------------------- 1 | import toInt from './to-int'; 2 | 3 | // compare two arrays, return the number of differences 4 | export default function compareArrays(array1, array2, dontConvert) { 5 | var len = Math.min(array1.length, array2.length), 6 | lengthDiff = Math.abs(array1.length - array2.length), 7 | diffs = 0, 8 | i; 9 | for (i = 0; i < len; i++) { 10 | if ((dontConvert && array1[i] !== array2[i]) || 11 | (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { 12 | diffs++; 13 | } 14 | } 15 | return diffs + lengthDiff; 16 | } 17 | -------------------------------------------------------------------------------- /controllers/api.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var Event = require('../models/event'); 4 | var Venue = require('../models/venue'); 5 | var Watchlist = require('../models/watchlist'); 6 | var Comment = require('../models/comment'); 7 | var ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn(); 8 | 9 | router.get('/events/user', function(req, res, next) { 10 | options = { 11 | filter: 'following', 12 | }; 13 | 14 | Event.search(req.user, options, function (err, results) { 15 | if (err) throw err; 16 | res.json(results); 17 | }); 18 | }); 19 | 20 | 21 | module.exports = router; -------------------------------------------------------------------------------- /views/place-list.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | #main 5 | .page-header 6 | h1 Popular Places 7 | 8 | .col-xs-12.col-sm-6 9 | .panel-body.list-group 10 | each place in places 11 | li.list-group-item 12 | a(href='/place/' + slug(place.locality.name) + '-' + slug(place.locality.id)) 13 | if place.country.name == 'United States' 14 | | #{place.locality.name}, #{place.region.name} 15 | else 16 | | #{place.locality.name}, #{place.country.name} 17 | | 18 | small= place[''].event_count 19 | 20 | .col-xs-12.col-sm-6 -------------------------------------------------------------------------------- /public/components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "3.2.1", 16 | "_release": "3.2.1", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "3.2.1", 20 | "commit": "77d2a51d0520d2ee44173afdf4e40a9201f5964e" 21 | }, 22 | "_source": "https://github.com/jquery/jquery-dist.git", 23 | "_target": ">= 1.9.0", 24 | "_originalSource": "jquery" 25 | } -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/abs.js: -------------------------------------------------------------------------------- 1 | var mathAbs = Math.abs; 2 | 3 | export function abs () { 4 | var data = this._data; 5 | 6 | this._milliseconds = mathAbs(this._milliseconds); 7 | this._days = mathAbs(this._days); 8 | this._months = mathAbs(this._months); 9 | 10 | data.milliseconds = mathAbs(data.milliseconds); 11 | data.seconds = mathAbs(data.seconds); 12 | data.minutes = mathAbs(data.minutes); 13 | data.hours = mathAbs(data.hours); 14 | data.months = mathAbs(data.months); 15 | data.years = mathAbs(data.years); 16 | 17 | return this; 18 | } 19 | -------------------------------------------------------------------------------- /controllers/comments.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var Comment = require('../models/comment'); 4 | 5 | // POST comment 6 | router.post('/', function (req, res, next) { 7 | user = req.user; 8 | post = req.body; 9 | 10 | Comment.create(user, post, function (err, comment) { 11 | if (err) throw err; 12 | res.redirect('/event/' + post.event_id); 13 | }); 14 | }); 15 | 16 | // GET comments by event 17 | router.get('/event/:event_id', function(req, res, next) { 18 | Comment.getAllByEvent(event_id, function (err, comments) { 19 | if (err) throw err; 20 | }); 21 | 22 | }); 23 | 24 | 25 | module.exports = router; -------------------------------------------------------------------------------- /public/components/jquery/src/css/var/swap.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | // A method for quickly swapping in/out CSS properties to get correct calculations. 6 | return function( elem, options, callback, args ) { 7 | var ret, name, 8 | old = {}; 9 | 10 | // Remember the old values, and insert the new ones 11 | for ( name in options ) { 12 | old[ name ] = elem.style[ name ]; 13 | elem.style[ name ] = options[ name ]; 14 | } 15 | 16 | ret = callback.apply( elem, args || [] ); 17 | 18 | // Revert the old values 19 | for ( name in options ) { 20 | elem.style[ name ] = old[ name ]; 21 | } 22 | 23 | return ret; 24 | }; 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /public/components/jquery/src/css/addGetHookIf.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | function addGetHookIf( conditionFn, hookFn ) { 6 | 7 | // Define the hook, we'll check on the first run if it's really needed. 8 | return { 9 | get: function() { 10 | if ( conditionFn() ) { 11 | 12 | // Hook not needed (or it's not possible to use it due 13 | // to missing dependency), remove it. 14 | delete this.get; 15 | return; 16 | } 17 | 18 | // Hook needed; redefine it so that the support test is not executed again. 19 | return ( this.get = hookFn ).apply( this, arguments ); 20 | } 21 | }; 22 | } 23 | 24 | return addGetHookIf; 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/to.js: -------------------------------------------------------------------------------- 1 | import { createDuration } from '../duration/create'; 2 | import { createLocal } from '../create/local'; 3 | import { isMoment } from '../moment/constructor'; 4 | 5 | export function to (time, withoutSuffix) { 6 | if (this.isValid() && 7 | ((isMoment(time) && time.isValid()) || 8 | createLocal(time).isValid())) { 9 | return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); 10 | } else { 11 | return this.localeData().invalidDate(); 12 | } 13 | } 14 | 15 | export function toNow (withoutSuffix) { 16 | return this.to(createLocal(), withoutSuffix); 17 | } 18 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/from.js: -------------------------------------------------------------------------------- 1 | import { createDuration } from '../duration/create'; 2 | import { createLocal } from '../create/local'; 3 | import { isMoment } from '../moment/constructor'; 4 | 5 | export function from (time, withoutSuffix) { 6 | if (this.isValid() && 7 | ((isMoment(time) && time.isValid()) || 8 | createLocal(time).isValid())) { 9 | return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); 10 | } else { 11 | return this.localeData().invalidDate(); 12 | } 13 | } 14 | 15 | export function fromNow (withoutSuffix) { 16 | return this.from(createLocal(), withoutSuffix); 17 | } 18 | -------------------------------------------------------------------------------- /public/components/geocomplete/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "geocomplete", 3 | "version": "1.6.5", 4 | "homepage": "http://ubilabs.github.com/geocomplete/", 5 | "authors": [ 6 | "Martin Kleppe " 7 | ], 8 | "description": "jQuery Geocoding and Places Autocomplete Plugin", 9 | "main": "jquery.geocomplete.js", 10 | "keywords": [ 11 | "geocoding", 12 | "map", 13 | "places", 14 | "api", 15 | "search", 16 | "google" 17 | ], 18 | "license": "MIT", 19 | "dependencies": { 20 | "jquery": ">= 1.9.0" 21 | }, 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "test", 27 | "tests" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/timestamp.js: -------------------------------------------------------------------------------- 1 | import { addFormatToken } from '../format/format'; 2 | import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex'; 3 | import { addParseToken } from '../parse/token'; 4 | import toInt from '../utils/to-int'; 5 | 6 | // FORMATTING 7 | 8 | addFormatToken('X', 0, 0, 'unix'); 9 | addFormatToken('x', 0, 0, 'valueOf'); 10 | 11 | // PARSING 12 | 13 | addRegexToken('x', matchSigned); 14 | addRegexToken('X', matchTimestamp); 15 | addParseToken('X', function (input, array, config) { 16 | config._d = new Date(parseFloat(input, 10) * 1000); 17 | }); 18 | addParseToken('x', function (input, array, config) { 19 | config._d = new Date(toInt(input)); 20 | }); 21 | -------------------------------------------------------------------------------- /public/components/typeahead.js/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typeahead.js", 3 | "version": "0.11.1", 4 | "main": "dist/typeahead.bundle.js", 5 | "dependencies": { 6 | "jquery": ">=1.7" 7 | }, 8 | "devDependencies": { 9 | "jquery": "~1.7", 10 | "jasmine-ajax": "~1.3.1", 11 | "jasmine-jquery": "~1.5.2" 12 | }, 13 | "homepage": "https://github.com/twitter/typeahead.js", 14 | "_release": "0.11.1", 15 | "_resolution": { 16 | "type": "version", 17 | "tag": "v0.11.1", 18 | "commit": "87de059a7820b1e223f1c704fa12a624dbce3a4f" 19 | }, 20 | "_source": "git://github.com/twitter/typeahead.js.git", 21 | "_target": "~0.11.1", 22 | "_originalSource": "typeahead.js", 23 | "_direct": true 24 | } -------------------------------------------------------------------------------- /public/components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Cross-browser xml parsing 8 | jQuery.parseXML = function( data ) { 9 | var xml; 10 | if ( !data || typeof data !== "string" ) { 11 | return null; 12 | } 13 | 14 | // Support: IE 9 - 11 only 15 | // IE throws on parseFromString with invalid input. 16 | try { 17 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 18 | } catch ( e ) { 19 | xml = undefined; 20 | } 21 | 22 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 23 | jQuery.error( "Invalid XML: " + data ); 24 | } 25 | return xml; 26 | }; 27 | 28 | return jQuery.parseXML; 29 | 30 | } ); 31 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/formats.js: -------------------------------------------------------------------------------- 1 | export var defaultLongDateFormat = { 2 | LTS : 'h:mm:ss A', 3 | LT : 'h:mm A', 4 | L : 'MM/DD/YYYY', 5 | LL : 'MMMM D, YYYY', 6 | LLL : 'MMMM D, YYYY h:mm A', 7 | LLLL : 'dddd, MMMM D, YYYY h:mm A' 8 | }; 9 | 10 | export function longDateFormat (key) { 11 | var format = this._longDateFormat[key], 12 | formatUpper = this._longDateFormat[key.toUpperCase()]; 13 | 14 | if (format || !formatUpper) { 15 | return format; 16 | } 17 | 18 | this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { 19 | return val.slice(1); 20 | }); 21 | 22 | return this._longDateFormat[key]; 23 | } 24 | -------------------------------------------------------------------------------- /views/user.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block includes 4 | script(src='/js/watchlists.js') 5 | 6 | block content 7 | #main 8 | .row 9 | .col-md-12 10 | .page-header 11 | img.img-rounded(alt='', src=current_user.avatar_image_url, style='float: left; margin-right: 10px') 12 | h1= current_user.name 13 | small 14 | | @#{current_user.username} 15 | 16 | .row 17 | .col-xs-12.col-sm-3 18 | p 19 | small= current_user.description 20 | 21 | hr 22 | .list-nav 23 | .list-item 24 | a(href='?when=future') Upcoming 25 | .list-item 26 | a(href='?when=past') Past Events 27 | 28 | .col-xs-12.col-sm-6 29 | include event-list 30 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | // Support: Safari 8 only 9 | // In Safari 8 documents created via document.implementation.createHTMLDocument 10 | // collapse sibling forms: the second one becomes a child of the first one. 11 | // Because of that, this security measure has to be disabled in Safari 8. 12 | // https://bugs.webkit.org/show_bug.cgi?id=137337 13 | support.createHTMLDocument = ( function() { 14 | var body = document.implementation.createHTMLDocument( "" ).body; 15 | body.innerHTML = "
"; 16 | return body.childNodes.length === 2; 17 | } )(); 18 | 19 | return support; 20 | } ); 21 | -------------------------------------------------------------------------------- /public/components/jquery/src/deferred/exceptionHook.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../deferred" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | // These usually indicate a programmer mistake during development, 9 | // warn about them ASAP rather than swallowing them by default. 10 | var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 11 | 12 | jQuery.Deferred.exceptionHook = function( error, stack ) { 13 | 14 | // Support: IE 8 - 9 only 15 | // Console exists when dev tools are open, which can happen at any time 16 | if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 17 | window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 18 | } 19 | }; 20 | 21 | } ); 22 | -------------------------------------------------------------------------------- /public/components/jquery/src/queue/delay.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../queue", 4 | "../effects" // Delay is optional because of this dependency 5 | ], function( jQuery ) { 6 | 7 | "use strict"; 8 | 9 | // Based off of the plugin by Clint Helfers, with permission. 10 | // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 11 | jQuery.fn.delay = function( time, type ) { 12 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 13 | type = type || "fx"; 14 | 15 | return this.queue( type, function( next, hooks ) { 16 | var timeout = window.setTimeout( next, time ); 17 | hooks.stop = function() { 18 | window.clearTimeout( timeout ); 19 | }; 20 | } ); 21 | }; 22 | 23 | return jQuery.fn.delay; 24 | } ); 25 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/date-from-array.js: -------------------------------------------------------------------------------- 1 | export function createDate (y, m, d, h, M, s, ms) { 2 | // can't just apply() to create a date: 3 | // https://stackoverflow.com/q/181348 4 | var date = new Date(y, m, d, h, M, s, ms); 5 | 6 | // the date constructor remaps years 0-99 to 1900-1999 7 | if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { 8 | date.setFullYear(y); 9 | } 10 | return date; 11 | } 12 | 13 | export function createUTCDate (y) { 14 | var date = new Date(Date.UTC.apply(null, arguments)); 15 | 16 | // the Date.UTC function remaps years 0-99 to 1900-1999 17 | if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { 18 | date.setUTCFullYear(y); 19 | } 20 | return date; 21 | } 22 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/moment.js: -------------------------------------------------------------------------------- 1 | import { createLocal } from '../create/local'; 2 | import { createUTC } from '../create/utc'; 3 | import { createInvalid } from '../create/valid'; 4 | import { isMoment } from './constructor'; 5 | import { min, max } from './min-max'; 6 | import { now } from './now'; 7 | import momentPrototype from './prototype'; 8 | 9 | function createUnix (input) { 10 | return createLocal(input * 1000); 11 | } 12 | 13 | function createInZone () { 14 | return createLocal.apply(null, arguments).parseZone(); 15 | } 16 | 17 | export { 18 | now, 19 | min, 20 | max, 21 | isMoment, 22 | createUTC, 23 | createUnix, 24 | createLocal, 25 | createInZone, 26 | createInvalid, 27 | momentPrototype 28 | }; 29 | -------------------------------------------------------------------------------- /public/components/jquery/src/exports/global.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery, noGlobal ) { 4 | 5 | "use strict"; 6 | 7 | var 8 | 9 | // Map over jQuery in case of overwrite 10 | _jQuery = window.jQuery, 11 | 12 | // Map over the $ in case of overwrite 13 | _$ = window.$; 14 | 15 | jQuery.noConflict = function( deep ) { 16 | if ( window.$ === jQuery ) { 17 | window.$ = _$; 18 | } 19 | 20 | if ( deep && window.jQuery === jQuery ) { 21 | window.jQuery = _jQuery; 22 | } 23 | 24 | return jQuery; 25 | }; 26 | 27 | // Expose jQuery and $ identifiers, even in AMD 28 | // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 29 | // and CommonJS for browser emulators (#13566) 30 | if ( !noGlobal ) { 31 | window.jQuery = window.$ = jQuery; 32 | } 33 | 34 | } ); 35 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/add-subtract.js: -------------------------------------------------------------------------------- 1 | import { createDuration } from './create'; 2 | 3 | function addSubtract (duration, input, value, direction) { 4 | var other = createDuration(input, value); 5 | 6 | duration._milliseconds += direction * other._milliseconds; 7 | duration._days += direction * other._days; 8 | duration._months += direction * other._months; 9 | 10 | return duration._bubble(); 11 | } 12 | 13 | // supports only 2.0-style add(1, 's') or add(duration) 14 | export function add (input, value) { 15 | return addSubtract(this, input, value, 1); 16 | } 17 | 18 | // supports only 2.0-style subtract(1, 's') or subtract(duration) 19 | export function subtract (input, value) { 20 | return addSubtract(this, input, value, -1); 21 | } 22 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "corejs-typeahead", 3 | "version": "1.1.1", 4 | "main": "dist/typeahead.bundle.js", 5 | "dependencies": { 6 | "jquery": ">=1.11" 7 | }, 8 | "devDependencies": { 9 | "jquery": "~1.11", 10 | "jasmine-ajax": "~1.3.1", 11 | "jasmine-jquery": "~1.7.0" 12 | }, 13 | "resolutions": { 14 | "jquery": "1.11.3" 15 | }, 16 | "homepage": "https://github.com/corejavascript/typeahead.js", 17 | "_release": "1.1.1", 18 | "_resolution": { 19 | "type": "version", 20 | "tag": "v1.1.1", 21 | "commit": "47d46b40cb834d8285ac9328c4b436e5eccf7197" 22 | }, 23 | "_source": "https://github.com/corejavascript/typeahead.js.git", 24 | "_target": "^1.1.1", 25 | "_originalSource": "corejs-typeahead", 26 | "_direct": true 27 | } -------------------------------------------------------------------------------- /public/components/jquery/src/event/alias.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | 4 | "../event", 5 | "./trigger" 6 | ], function( jQuery ) { 7 | 8 | "use strict"; 9 | 10 | jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + 11 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 12 | "change select submit keydown keypress keyup contextmenu" ).split( " " ), 13 | function( i, name ) { 14 | 15 | // Handle event binding 16 | jQuery.fn[ name ] = function( data, fn ) { 17 | return arguments.length > 0 ? 18 | this.on( name, null, data, fn ) : 19 | this.trigger( name ); 20 | }; 21 | } ); 22 | 23 | jQuery.fn.extend( { 24 | hover: function( fnOver, fnOut ) { 25 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 26 | } 27 | } ); 28 | 29 | } ); 30 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/getAll.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/nodeName" 4 | ], function( jQuery, nodeName ) { 5 | 6 | "use strict"; 7 | 8 | function getAll( context, tag ) { 9 | 10 | // Support: IE <=9 - 11 only 11 | // Use typeof to avoid zero-argument method invocation on host objects (#15151) 12 | var ret; 13 | 14 | if ( typeof context.getElementsByTagName !== "undefined" ) { 15 | ret = context.getElementsByTagName( tag || "*" ); 16 | 17 | } else if ( typeof context.querySelectorAll !== "undefined" ) { 18 | ret = context.querySelectorAll( tag || "*" ); 19 | 20 | } else { 21 | ret = []; 22 | } 23 | 24 | if ( tag === undefined || tag && nodeName( context, tag ) ) { 25 | return jQuery.merge( [ context ], ret ); 26 | } 27 | 28 | return ret; 29 | } 30 | 31 | return getAll; 32 | } ); 33 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/parsing-flags.js: -------------------------------------------------------------------------------- 1 | function defaultParsingFlags() { 2 | // We need to deep clone this object. 3 | return { 4 | empty : false, 5 | unusedTokens : [], 6 | unusedInput : [], 7 | overflow : -2, 8 | charsLeftOver : 0, 9 | nullInput : false, 10 | invalidMonth : null, 11 | invalidFormat : false, 12 | userInvalidated : false, 13 | iso : false, 14 | parsedDateParts : [], 15 | meridiem : null, 16 | rfc2822 : false, 17 | weekdayMismatch : false 18 | }; 19 | } 20 | 21 | export default function getParsingFlags(m) { 22 | if (m._pf == null) { 23 | m._pf = defaultParsingFlags(); 24 | } 25 | return m._pf; 26 | } 27 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/minute.js: -------------------------------------------------------------------------------- 1 | import { makeGetSet } from '../moment/get-set'; 2 | import { addFormatToken } from '../format/format'; 3 | import { addUnitAlias } from './aliases'; 4 | import { addUnitPriority } from './priorities'; 5 | import { addRegexToken, match1to2, match2 } from '../parse/regex'; 6 | import { addParseToken } from '../parse/token'; 7 | import { MINUTE } from './constants'; 8 | 9 | // FORMATTING 10 | 11 | addFormatToken('m', ['mm', 2], 0, 'minute'); 12 | 13 | // ALIASES 14 | 15 | addUnitAlias('minute', 'm'); 16 | 17 | // PRIORITY 18 | 19 | addUnitPriority('minute', 14); 20 | 21 | // PARSING 22 | 23 | addRegexToken('m', match1to2); 24 | addRegexToken('mm', match1to2, match2); 25 | addParseToken(['m', 'mm'], MINUTE); 26 | 27 | // MOMENTS 28 | 29 | export var getSetMinute = makeGetSet('Minutes', false); 30 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/second.js: -------------------------------------------------------------------------------- 1 | import { makeGetSet } from '../moment/get-set'; 2 | import { addFormatToken } from '../format/format'; 3 | import { addUnitAlias } from './aliases'; 4 | import { addUnitPriority } from './priorities'; 5 | import { addRegexToken, match1to2, match2 } from '../parse/regex'; 6 | import { addParseToken } from '../parse/token'; 7 | import { SECOND } from './constants'; 8 | 9 | // FORMATTING 10 | 11 | addFormatToken('s', ['ss', 2], 0, 'second'); 12 | 13 | // ALIASES 14 | 15 | addUnitAlias('second', 's'); 16 | 17 | // PRIORITY 18 | 19 | addUnitPriority('second', 15); 20 | 21 | // PARSING 22 | 23 | addRegexToken('s', match1to2); 24 | addRegexToken('ss', match1to2, match2); 25 | addParseToken(['s', 'ss'], SECOND); 26 | 27 | // MOMENTS 28 | 29 | export var getSetSecond = makeGetSet('Seconds', false); 30 | -------------------------------------------------------------------------------- /views/venue.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .col-xs-12.col-sm-10.col-md-8.col-lg-6 5 | .page-header 6 | h1= venue.name 7 | 8 | .venue 9 | .venue-address 10 | if venue.address 11 | span.address= venue.address 12 | br 13 | span.locality= venue.locality + ', ' 14 | span.region= venue.region + ' ' 15 | span.postal_code= venue.postal_code 16 | else 17 | span No address available 18 | 19 | a(href="//foursquare.com/v/" + venue.foursquare_id) View on Foursquare 20 | 21 | if events.length > 0 22 | each event in events 23 | .event 24 | small= moment(event.start_date).format('MMMM D, YYYY') 25 | h4 26 | a(href='/event/' + slug(event.title) + '-' + event.event_id) #{event.title} 27 | -------------------------------------------------------------------------------- /config/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "session_secret": "", 3 | "redis_password": "", 4 | 5 | "database": { 6 | "host": "localhost", 7 | "database": "upcoming", 8 | "user": "", 9 | "pass": "" 10 | }, 11 | 12 | "twitter": { 13 | "consumer_key": "", 14 | "consumer_secret": "", 15 | "callback_url": "" 16 | }, 17 | 18 | "facebook": { 19 | "app_id": "", 20 | "app_secret": "" 21 | }, 22 | 23 | "foursquare": { 24 | "client_id": "", 25 | "client_secret": "" 26 | }, 27 | 28 | "google": { 29 | "oauth_key": "", 30 | "oauth_secret": "" 31 | }, 32 | 33 | "geocode_earth": { 34 | "api_key": "", 35 | "endpoint": "https://api.geocode.earth" 36 | }, 37 | 38 | "s3": { 39 | "access_key_id": "", 40 | "secret_access_key": "", 41 | "bucket": "", 42 | "region": "" 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /public/components/jquery/src/jquery.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./selector", 4 | "./traversing", 5 | "./callbacks", 6 | "./deferred", 7 | "./deferred/exceptionHook", 8 | "./core/ready", 9 | "./data", 10 | "./queue", 11 | "./queue/delay", 12 | "./attributes", 13 | "./event", 14 | "./event/alias", 15 | "./event/focusin", 16 | "./manipulation", 17 | "./manipulation/_evalUrl", 18 | "./wrap", 19 | "./css", 20 | "./css/hiddenVisibleSelectors", 21 | "./serialize", 22 | "./ajax", 23 | "./ajax/xhr", 24 | "./ajax/script", 25 | "./ajax/jsonp", 26 | "./ajax/load", 27 | "./event/ajax", 28 | "./effects", 29 | "./effects/animatedSelector", 30 | "./offset", 31 | "./dimensions", 32 | "./deprecated", 33 | "./exports/amd", 34 | "./exports/global" 35 | ], function( jQuery ) { 36 | 37 | "use strict"; 38 | 39 | return jQuery; 40 | 41 | } ); 42 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/get.js: -------------------------------------------------------------------------------- 1 | import { normalizeUnits } from '../units/aliases'; 2 | import absFloor from '../utils/abs-floor'; 3 | 4 | export function get (units) { 5 | units = normalizeUnits(units); 6 | return this.isValid() ? this[units + 's']() : NaN; 7 | } 8 | 9 | function makeGetter(name) { 10 | return function () { 11 | return this.isValid() ? this._data[name] : NaN; 12 | }; 13 | } 14 | 15 | export var milliseconds = makeGetter('milliseconds'); 16 | export var seconds = makeGetter('seconds'); 17 | export var minutes = makeGetter('minutes'); 18 | export var hours = makeGetter('hours'); 19 | export var days = makeGetter('days'); 20 | export var months = makeGetter('months'); 21 | export var years = makeGetter('years'); 22 | 23 | export function weeks () { 24 | return absFloor(this.days() / 7); 25 | } 26 | -------------------------------------------------------------------------------- /public/components/moment/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "moment", 3 | "license": "MIT", 4 | "main": "moment.js", 5 | "ignore": [ 6 | "**/.*", 7 | "benchmarks", 8 | "bower_components", 9 | "meteor", 10 | "node_modules", 11 | "scripts", 12 | "tasks", 13 | "test", 14 | "component.json", 15 | "composer.json", 16 | "CONTRIBUTING.md", 17 | "ender.js", 18 | "Gruntfile.js", 19 | "Moment.js.nuspec", 20 | "package.js", 21 | "package.json", 22 | "ISSUE_TEMPLATE.md", 23 | "typing-tests" 24 | ], 25 | "homepage": "https://github.com/moment/moment", 26 | "version": "2.18.0", 27 | "_release": "2.18.0", 28 | "_resolution": { 29 | "type": "version", 30 | "tag": "2.18.0", 31 | "commit": "54e27723cbcbac3f80125fc42bff1dee91761273" 32 | }, 33 | "_source": "https://github.com/moment/moment.git", 34 | "_target": ">=2.9.0", 35 | "_originalSource": "moment" 36 | } -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/quarter.js: -------------------------------------------------------------------------------- 1 | import { addFormatToken } from '../format/format'; 2 | import { addUnitAlias } from './aliases'; 3 | import { addUnitPriority } from './priorities'; 4 | import { addRegexToken, match1 } from '../parse/regex'; 5 | import { addParseToken } from '../parse/token'; 6 | import { MONTH } from './constants'; 7 | import toInt from '../utils/to-int'; 8 | 9 | // FORMATTING 10 | 11 | addFormatToken('Q', 0, 'Qo', 'quarter'); 12 | 13 | // ALIASES 14 | 15 | addUnitAlias('quarter', 'Q'); 16 | 17 | // PRIORITY 18 | 19 | addUnitPriority('quarter', 7); 20 | 21 | // PARSING 22 | 23 | addRegexToken('Q', match1); 24 | addParseToken('Q', function (input, array) { 25 | array[MONTH] = (toInt(input) - 1) * 3; 26 | }); 27 | 28 | // MOMENTS 29 | 30 | export function getSetQuarter (input) { 31 | return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); 32 | } 33 | -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/wrapMap.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | // We have to close these tags to support XHTML (#13200) 6 | var wrapMap = { 7 | 8 | // Support: IE <=9 only 9 | option: [ 1, "" ], 10 | 11 | // XHTML parsers do not magically insert elements in the 12 | // same way that tag soup parsers do. So we cannot shorten 13 | // this by omitting or other required elements. 14 | thead: [ 1, "", "
" ], 15 | col: [ 2, "", "
" ], 16 | tr: [ 2, "", "
" ], 17 | td: [ 3, "", "
" ], 18 | 19 | _default: [ 0, "", "" ] 20 | }; 21 | 22 | // Support: IE <=9 only 23 | wrapMap.optgroup = wrapMap.option; 24 | 25 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 26 | wrapMap.th = wrapMap.td; 27 | 28 | return wrapMap; 29 | } ); 30 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/aliases.js: -------------------------------------------------------------------------------- 1 | import hasOwnProp from '../utils/has-own-prop'; 2 | 3 | var aliases = {}; 4 | 5 | export function addUnitAlias (unit, shorthand) { 6 | var lowerCase = unit.toLowerCase(); 7 | aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; 8 | } 9 | 10 | export function normalizeUnits(units) { 11 | return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; 12 | } 13 | 14 | export function normalizeObjectUnits(inputObject) { 15 | var normalizedInput = {}, 16 | normalizedProp, 17 | prop; 18 | 19 | for (prop in inputObject) { 20 | if (hasOwnProp(inputObject, prop)) { 21 | normalizedProp = normalizeUnits(prop); 22 | if (normalizedProp) { 23 | normalizedInput[normalizedProp] = inputObject[prop]; 24 | } 25 | } 26 | } 27 | 28 | return normalizedInput; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /public/components/jquery/src/attributes/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | ( function() { 9 | var input = document.createElement( "input" ), 10 | select = document.createElement( "select" ), 11 | opt = select.appendChild( document.createElement( "option" ) ); 12 | 13 | input.type = "checkbox"; 14 | 15 | // Support: Android <=4.3 only 16 | // Default value for a checkbox should be "on" 17 | support.checkOn = input.value !== ""; 18 | 19 | // Support: IE <=11 only 20 | // Must access selectedIndex to make default options select 21 | support.optSelected = opt.selected; 22 | 23 | // Support: IE <=11 only 24 | // An input loses its value after becoming a radio 25 | input = document.createElement( "input" ); 26 | input.value = "t"; 27 | input.type = "radio"; 28 | support.radioValue = input.value === "t"; 29 | } )(); 30 | 31 | return support; 32 | 33 | } ); 34 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/to-type.js: -------------------------------------------------------------------------------- 1 | export function valueOf () { 2 | return this._d.valueOf() - ((this._offset || 0) * 60000); 3 | } 4 | 5 | export function unix () { 6 | return Math.floor(this.valueOf() / 1000); 7 | } 8 | 9 | export function toDate () { 10 | return new Date(this.valueOf()); 11 | } 12 | 13 | export function toArray () { 14 | var m = this; 15 | return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; 16 | } 17 | 18 | export function toObject () { 19 | var m = this; 20 | return { 21 | years: m.year(), 22 | months: m.month(), 23 | date: m.date(), 24 | hours: m.hours(), 25 | minutes: m.minutes(), 26 | seconds: m.seconds(), 27 | milliseconds: m.milliseconds() 28 | }; 29 | } 30 | 31 | export function toJSON () { 32 | // new Date(NaN).toJSON() === null 33 | return this.isValid() ? this.toISOString() : null; 34 | } 35 | -------------------------------------------------------------------------------- /controllers/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var User = require('../models/user'); 4 | 5 | // POST user location 6 | router.post('/location', function (req, res, next) { 7 | var user = req.user; 8 | var post = req.body; 9 | 10 | if (post.status == 'add') { 11 | User.addLocation(user, post, function (err, result) { 12 | if (err) throw err; 13 | res.json('success'); 14 | }); 15 | } else if (post.status == 'remove') { 16 | User.removeLocation(user, post, function (err, result) { 17 | if (err) throw err; 18 | res.json('success'); 19 | }); 20 | } 21 | }); 22 | 23 | router.get(/(?:.*-|)(.+)$/, function(req, res, next) { 24 | user_id = req.params[0].replace(/\//g, ''); 25 | 26 | // redirect old-school upcoming urls 27 | if (/^\d+$/.test(user_id)) { 28 | res.redirect('http://archive.upcoming.org/user/' + user_id); 29 | return; 30 | } 31 | }); 32 | 33 | 34 | module.exports = router; -------------------------------------------------------------------------------- /models/comment.js: -------------------------------------------------------------------------------- 1 | var db = require('../db.js'); 2 | 3 | // create a new comment 4 | exports.create = function(user, comment, next) { 5 | var post = { 6 | event_id: comment.event_id, 7 | user_id: user.id, 8 | comment_text: comment.comment_text 9 | }; 10 | 11 | db.query('INSERT INTO comment SET created_at = NOW(), ?', post, function (err, result) { 12 | if (err) return next(err); 13 | next(null, post); 14 | }); 15 | }; 16 | 17 | /* find comments by event id */ 18 | exports.getAllByEventId = function(event_id, next) { 19 | var sql = 'SELECT comment.comment_text, comment.created_at, ' 20 | + 'user.name, user.avatar_image_url, user.username, comment.created_at ' 21 | + 'FROM comment, user ' 22 | + 'WHERE comment.user_id = user.id ' 23 | + 'AND user.deleted = 0 ' 24 | + 'AND comment.event_id = ?'; 25 | db.query(sql, event_id, function (err, rows) { 26 | if (err) return next(err); 27 | next(null, rows); 28 | }); 29 | }; 30 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/relative.js: -------------------------------------------------------------------------------- 1 | export var defaultRelativeTime = { 2 | future : 'in %s', 3 | past : '%s ago', 4 | s : 'a few seconds', 5 | ss : '%d seconds', 6 | m : 'a minute', 7 | mm : '%d minutes', 8 | h : 'an hour', 9 | hh : '%d hours', 10 | d : 'a day', 11 | dd : '%d days', 12 | M : 'a month', 13 | MM : '%d months', 14 | y : 'a year', 15 | yy : '%d years' 16 | }; 17 | 18 | import isFunction from '../utils/is-function'; 19 | 20 | export function relativeTime (number, withoutSuffix, string, isFuture) { 21 | var output = this._relativeTime[string]; 22 | return (isFunction(output)) ? 23 | output(number, withoutSuffix, string, isFuture) : 24 | output.replace(/%d/i, number); 25 | } 26 | 27 | export function pastFuture (diff, output) { 28 | var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 29 | return isFunction(format) ? format(output) : format.replace(/%s/i, output); 30 | } 31 | -------------------------------------------------------------------------------- /public/components/jquery/src/deprecated.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./core/nodeName" 4 | ], function( jQuery, nodeName ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.fn.extend( { 9 | 10 | bind: function( types, data, fn ) { 11 | return this.on( types, null, data, fn ); 12 | }, 13 | unbind: function( types, fn ) { 14 | return this.off( types, null, fn ); 15 | }, 16 | 17 | delegate: function( selector, types, data, fn ) { 18 | return this.on( types, selector, data, fn ); 19 | }, 20 | undelegate: function( selector, types, fn ) { 21 | 22 | // ( namespace ) or ( selector, types [, fn] ) 23 | return arguments.length === 1 ? 24 | this.off( selector, "**" ) : 25 | this.off( types, selector || "**", fn ); 26 | } 27 | } ); 28 | 29 | jQuery.holdReady = function( hold ) { 30 | if ( hold ) { 31 | jQuery.readyWait++; 32 | } else { 33 | jQuery.ready( true ); 34 | } 35 | }; 36 | jQuery.isArray = Array.isArray; 37 | jQuery.parseJSON = JSON.parse; 38 | jQuery.nodeName = nodeName; 39 | 40 | } ); 41 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/locale.js: -------------------------------------------------------------------------------- 1 | // Side effect imports 2 | import './prototype'; 3 | 4 | import { 5 | getSetGlobalLocale, 6 | defineLocale, 7 | updateLocale, 8 | getLocale, 9 | listLocales 10 | } from './locales'; 11 | 12 | import { 13 | listMonths, 14 | listMonthsShort, 15 | listWeekdays, 16 | listWeekdaysShort, 17 | listWeekdaysMin 18 | } from './lists'; 19 | 20 | export { 21 | getSetGlobalLocale, 22 | defineLocale, 23 | updateLocale, 24 | getLocale, 25 | listLocales, 26 | listMonths, 27 | listMonthsShort, 28 | listWeekdays, 29 | listWeekdaysShort, 30 | listWeekdaysMin 31 | }; 32 | 33 | import { deprecate } from '../utils/deprecate'; 34 | import { hooks } from '../utils/hooks'; 35 | 36 | hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); 37 | hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); 38 | 39 | import './en'; 40 | -------------------------------------------------------------------------------- /public/components/geocomplete/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "geocomplete", 3 | "version": "1.6.5", 4 | "homepage": "http://ubilabs.github.com/geocomplete/", 5 | "authors": [ 6 | "Martin Kleppe " 7 | ], 8 | "description": "jQuery Geocoding and Places Autocomplete Plugin", 9 | "main": "jquery.geocomplete.js", 10 | "keywords": [ 11 | "geocoding", 12 | "map", 13 | "places", 14 | "api", 15 | "search", 16 | "google" 17 | ], 18 | "license": "MIT", 19 | "dependencies": { 20 | "jquery": ">= 1.9.0" 21 | }, 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "test", 27 | "tests" 28 | ], 29 | "_release": "1.6.5", 30 | "_resolution": { 31 | "type": "version", 32 | "tag": "1.6.5", 33 | "commit": "c6bebe81bdc21d3ee56c05c31bf961123597cfce" 34 | }, 35 | "_source": "git://github.com/ubilabs/geocomplete.git", 36 | "_target": "~1.6.5", 37 | "_originalSource": "geocomplete", 38 | "_direct": true 39 | } -------------------------------------------------------------------------------- /public/components/geocomplete/examples/location.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GeoComplete 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "upcoming-www", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "@aws-sdk/client-s3": "^3.353.0", 10 | "@superfaceai/passport-twitter-oauth2": "^1.2.3", 11 | "axios": "^1.4.0", 12 | "body-parser": "~1.19.0", 13 | "config": "^3.2.4", 14 | "connect-ensure-login": "^0.1.1", 15 | "connect-redis": "^4.0.3", 16 | "cookie-parser": "~1.4.4", 17 | "debug": "~4.1.1", 18 | "express": "~4.17.1", 19 | "express-session": "^1.17.0", 20 | "express-validator": "^6.2.0", 21 | "helmet": "^3.21.2", 22 | "marked": "^0.7.0", 23 | "moment": "^2.24.0", 24 | "morgan": "~1.9.1", 25 | "mysql": "^2.17.1", 26 | "nid": "^0.3.2", 27 | "node-foursquare-venues": "^1.1.0", 28 | "passport": "^0.4.0", 29 | "pug": "^3.0.2", 30 | "redis": "^2.8.0", 31 | "request": "^2.88.2", 32 | "serve-favicon": "~2.5.0", 33 | "slug": "^1.1.0", 34 | "truncate": "^2.1.0", 35 | "twix": "^1.3.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/parse/token.js: -------------------------------------------------------------------------------- 1 | import hasOwnProp from '../utils/has-own-prop'; 2 | import isNumber from '../utils/is-number'; 3 | import toInt from '../utils/to-int'; 4 | 5 | var tokens = {}; 6 | 7 | export function addParseToken (token, callback) { 8 | var i, func = callback; 9 | if (typeof token === 'string') { 10 | token = [token]; 11 | } 12 | if (isNumber(callback)) { 13 | func = function (input, array) { 14 | array[callback] = toInt(input); 15 | }; 16 | } 17 | for (i = 0; i < token.length; i++) { 18 | tokens[token[i]] = func; 19 | } 20 | } 21 | 22 | export function addWeekParseToken (token, callback) { 23 | addParseToken(token, function (input, array, config, token) { 24 | config._w = config._w || {}; 25 | callback(input, config._w, config, token); 26 | }); 27 | } 28 | 29 | export function addTimeToArrayFromToken(token, input, config) { 30 | if (input != null && hasOwnProp(tokens, token)) { 31 | tokens[token](input, config._a, config, token); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/valid.js: -------------------------------------------------------------------------------- 1 | import toInt from '../utils/to-int'; 2 | import {Duration} from './constructor'; 3 | import {createDuration} from './create'; 4 | 5 | var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; 6 | 7 | export default function isDurationValid(m) { 8 | for (var key in m) { 9 | if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) { 10 | return false; 11 | } 12 | } 13 | 14 | var unitHasDecimal = false; 15 | for (var i = 0; i < ordering.length; ++i) { 16 | if (m[ordering[i]]) { 17 | if (unitHasDecimal) { 18 | return false; // only allow non-integers for smallest unit 19 | } 20 | if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { 21 | unitHasDecimal = true; 22 | } 23 | } 24 | } 25 | 26 | return true; 27 | } 28 | 29 | export function isValid() { 30 | return this._isValid; 31 | } 32 | 33 | export function createInvalid() { 34 | return createDuration(NaN); 35 | } 36 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/locale.js: -------------------------------------------------------------------------------- 1 | import { getLocale } from '../locale/locales'; 2 | import { deprecate } from '../utils/deprecate'; 3 | 4 | // If passed a locale key, it will set the locale for this 5 | // instance. Otherwise, it will return the locale configuration 6 | // variables for this instance. 7 | export function locale (key) { 8 | var newLocaleData; 9 | 10 | if (key === undefined) { 11 | return this._locale._abbr; 12 | } else { 13 | newLocaleData = getLocale(key); 14 | if (newLocaleData != null) { 15 | this._locale = newLocaleData; 16 | } 17 | return this; 18 | } 19 | } 20 | 21 | export var lang = deprecate( 22 | 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 23 | function (key) { 24 | if (key === undefined) { 25 | return this.localeData(); 26 | } else { 27 | return this.locale(key); 28 | } 29 | } 30 | ); 31 | 32 | export function localeData () { 33 | return this._locale; 34 | } 35 | -------------------------------------------------------------------------------- /public/components/geocomplete/changelog.txt: -------------------------------------------------------------------------------- 1 | Version 1.6 2 | 3 | * Cycle through subtypes in address components. 4 | * Add "place_id" to places details. 5 | * Avoid exception if getPlace() returns undefined 6 | 7 | Version 1.5 8 | 9 | * Added autoselect option. 10 | * Add zoom_changed event support. 11 | * Fixed blur autocomplete. 12 | * Keep result at text input after focusout. 13 | * Add blur boolean option. 14 | * Add marker to map on initialize. 15 | * Add geocode:click event on the map. 16 | 17 | Version 1.4 18 | 19 | * Use lat/lng location option to set initial map 20 | * Return element after calling methods via API. 21 | * Add option markerOptions.disabled. 22 | * Add support for Places API componentRestrictions option 23 | 24 | Version 1.3 25 | 26 | * Add "name" to places details. 27 | * Add reference field from Places Details call. 28 | 29 | Version 1.2 30 | 31 | * Add "bounds" option to search within 32 | * Add "location" options to set default location. 33 | 34 | Version 1.1 35 | 36 | * Add API to access methods and properties from outside 37 | * Add events for draggable marker 38 | 39 | Version 1.0 40 | 41 | * Initial version -------------------------------------------------------------------------------- /public/components/jquery/src/exports/amd.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Register as a named AMD module, since jQuery can be concatenated with other 8 | // files that may use define, but not via a proper concatenation script that 9 | // understands anonymous AMD modules. A named AMD is safest and most robust 10 | // way to register. Lowercase jquery is used because AMD module names are 11 | // derived from file names, and jQuery is normally delivered in a lowercase 12 | // file name. Do this after creating the global so that if an AMD module wants 13 | // to call noConflict to hide this version of jQuery, it will work. 14 | 15 | // Note that for maximum portability, libraries that are not jQuery should 16 | // declare themselves as anonymous modules, and avoid setting a global if an 17 | // AMD loader is present. jQuery is a special case. For more information, see 18 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 19 | 20 | if ( typeof define === "function" && define.amd ) { 21 | define( "jquery", [], function() { 22 | return jQuery; 23 | } ); 24 | } 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /public/components/typeahead.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 Twitter, Inc 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /public/components/typeahead.js/src/bloodhound/tokenizers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var tokenizers = (function() { 8 | 'use strict'; 9 | 10 | return { 11 | nonword: nonword, 12 | whitespace: whitespace, 13 | obj: { 14 | nonword: getObjTokenizer(nonword), 15 | whitespace: getObjTokenizer(whitespace) 16 | } 17 | }; 18 | 19 | function whitespace(str) { 20 | str = _.toStr(str); 21 | return str ? str.split(/\s+/) : []; 22 | } 23 | 24 | function nonword(str) { 25 | str = _.toStr(str); 26 | return str ? str.split(/\W+/) : []; 27 | } 28 | 29 | function getObjTokenizer(tokenizer) { 30 | return function setKey(keys) { 31 | keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0); 32 | 33 | return function tokenize(o) { 34 | var tokens = []; 35 | 36 | _.each(keys, function(k) { 37 | tokens = tokens.concat(tokenizer(_.toStr(o[k]))); 38 | }); 39 | 40 | return tokens; 41 | }; 42 | }; 43 | } 44 | })(); 45 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/license: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 Twitter, Inc 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /public/components/geocomplete/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Ubilabs, http://ubilabs.net/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /public/components/moment/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) JS Foundation and other contributors 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /public/components/typeahead.js/typeahead.js.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "licenses": [ 3 | { 4 | "url": "https://github.com/twitter/typeahead.js/blob/master/LICENSE" 5 | } 6 | ], 7 | "dependencies": { 8 | "jquery": ">=1.7" 9 | }, 10 | "docs": "https://github.com/twitter/typeahead.js", 11 | "demo": "http://twitter.github.com/typeahead.js/examples", 12 | "name": "typeahead.js", 13 | "title": "typeahead.js", 14 | "author": { 15 | "name": "Twitter, Inc.", 16 | "url": "https://twitter.com/twitteross" 17 | }, 18 | "description": "fast and fully-featured autocomplete library", 19 | "keywords": [ 20 | "typeahead", 21 | "autocomplete" 22 | ], 23 | "homepage": "http://twitter.github.com/typeahead.js", 24 | "bugs": "https://github.com/twitter/typeahead.js/issues", 25 | "maintainers": [ 26 | { 27 | "name": "Jake Harding", 28 | "url": "https://twitter.com/JakeHarding" 29 | }, 30 | { 31 | "name": "Tim Trueman", 32 | "url": "https://twitter.com/timtrueman" 33 | }, 34 | { 35 | "name": "Veljko Skarich", 36 | "url": "https://twitter.com/vskarich" 37 | } 38 | ], 39 | "version": "0.11.1" 40 | } -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/day-of-year.js: -------------------------------------------------------------------------------- 1 | import { addFormatToken } from '../format/format'; 2 | import { addUnitAlias } from './aliases'; 3 | import { addUnitPriority } from './priorities'; 4 | import { addRegexToken, match3, match1to3 } from '../parse/regex'; 5 | import { daysInYear } from './year'; 6 | import { createUTCDate } from '../create/date-from-array'; 7 | import { addParseToken } from '../parse/token'; 8 | import toInt from '../utils/to-int'; 9 | 10 | // FORMATTING 11 | 12 | addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 13 | 14 | // ALIASES 15 | 16 | addUnitAlias('dayOfYear', 'DDD'); 17 | 18 | // PRIORITY 19 | addUnitPriority('dayOfYear', 4); 20 | 21 | // PARSING 22 | 23 | addRegexToken('DDD', match1to3); 24 | addRegexToken('DDDD', match3); 25 | addParseToken(['DDD', 'DDDD'], function (input, array, config) { 26 | config._dayOfYear = toInt(input); 27 | }); 28 | 29 | // HELPERS 30 | 31 | // MOMENTS 32 | 33 | export function getSetDayOfYear (input) { 34 | var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; 35 | return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); 36 | } 37 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/calendar.js: -------------------------------------------------------------------------------- 1 | import { createLocal } from '../create/local'; 2 | import { cloneWithOffset } from '../units/offset'; 3 | import isFunction from '../utils/is-function'; 4 | import { hooks } from '../utils/hooks'; 5 | 6 | export function getCalendarFormat(myMoment, now) { 7 | var diff = myMoment.diff(now, 'days', true); 8 | return diff < -6 ? 'sameElse' : 9 | diff < -1 ? 'lastWeek' : 10 | diff < 0 ? 'lastDay' : 11 | diff < 1 ? 'sameDay' : 12 | diff < 2 ? 'nextDay' : 13 | diff < 7 ? 'nextWeek' : 'sameElse'; 14 | } 15 | 16 | export function calendar (time, formats) { 17 | // We want to compare the start of today, vs this. 18 | // Getting start-of-today depends on whether we're local/utc/offset or not. 19 | var now = time || createLocal(), 20 | sod = cloneWithOffset(now, this).startOf('day'), 21 | format = hooks.calendarFormat(this, sod) || 'sameElse'; 22 | 23 | var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); 24 | 25 | return this.format(output || this.localeData().calendar(format, this, createLocal(now))); 26 | } 27 | -------------------------------------------------------------------------------- /public/js/global.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | // apply event filters to tab views 3 | var filters = {}; 4 | $('#filters').on('click', '.list-item a', function (e) { 5 | e.preventDefault(); 6 | 7 | $(this).closest('.list-nav').find('a').removeClass('active'); 8 | $(this).addClass('active'); 9 | 10 | // pass selected filters to active tab 11 | $('#filters .active').each(function(){ 12 | var category = $(this).data('cat'); 13 | var filter = $(this).data('filter'); 14 | filters[category] = filter; 15 | }); 16 | 17 | $('.tab-pane.active').load($('#myTabs .active a').attr("data-url"), $.param(filters)); 18 | }); 19 | 20 | // load tabs on click 21 | $('#myTabs a').click(function (e) { 22 | e.preventDefault(); 23 | 24 | var url = $(this).attr("data-url"); 25 | var href = this.hash; 26 | var pane = $(this); 27 | 28 | // ajax load from data-url 29 | $(href).load(url, $.param(filters), function(result){ 30 | pane.tab('show'); 31 | }); 32 | }); 33 | 34 | // load first tab content when document is ready 35 | $('#all').load($('.active a').attr("data-url"), $.param(filters)); 36 | }); -------------------------------------------------------------------------------- /public/components/jquery/src/manipulation/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | ( function() { 9 | var fragment = document.createDocumentFragment(), 10 | div = fragment.appendChild( document.createElement( "div" ) ), 11 | input = document.createElement( "input" ); 12 | 13 | // Support: Android 4.0 - 4.3 only 14 | // Check state lost if the name is set (#11217) 15 | // Support: Windows Web Apps (WWA) 16 | // `name` and `type` must use .setAttribute for WWA (#14901) 17 | input.setAttribute( "type", "radio" ); 18 | input.setAttribute( "checked", "checked" ); 19 | input.setAttribute( "name", "t" ); 20 | 21 | div.appendChild( input ); 22 | 23 | // Support: Android <=4.1 only 24 | // Older WebKit doesn't clone checked state correctly in fragments 25 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 26 | 27 | // Support: IE <=11 only 28 | // Make sure textarea (and checkbox) defaultValue is properly cloned 29 | div.innerHTML = ""; 30 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 31 | } )(); 32 | 33 | return support; 34 | 35 | } ); 36 | -------------------------------------------------------------------------------- /views/place.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block includes 4 | script. 5 | $.getScript('/js/watchlists.js'); 6 | 7 | block content 8 | #main 9 | .page-header 10 | if place.properties 11 | if place.properties.country == 'United States' 12 | h2= place.properties.locality + ', ' + place.properties.region 13 | else 14 | h2= place.properties.locality + ', ' + place.properties.country 15 | else 16 | if place.country.name == 'United States' 17 | h2= place.locality.name + ', ' + place.region.name 18 | else 19 | h2= place.locality.name + ', ' + place.country.name 20 | 21 | 22 | .hidden-xs.col-sm-2 23 | .list-nav 24 | .list-item 25 | a(href='?sort=date') Latest 26 | .list-item 27 | a(href='?sort=popular') Popular 28 | .list-item 29 | a(href='?sort=new') Recently added 30 | .list-nav 31 | .list-item 32 | a(href='?when=future') Upcoming 33 | .list-item 34 | a(href='?when=past') Past Events 35 | .list-item 36 | a(href='?when=all') Anytime 37 | 38 | .col-xs-12.col-sm-6 39 | include event-list 40 | 41 | .col-xs-12.col-sm-6 -------------------------------------------------------------------------------- /public/components/moment/src/lib/units/day-of-month.js: -------------------------------------------------------------------------------- 1 | import { makeGetSet } from '../moment/get-set'; 2 | import { addFormatToken } from '../format/format'; 3 | import { addUnitAlias } from './aliases'; 4 | import { addUnitPriority } from './priorities'; 5 | import { addRegexToken, match1to2, match2 } from '../parse/regex'; 6 | import { addParseToken } from '../parse/token'; 7 | import { DATE } from './constants'; 8 | import toInt from '../utils/to-int'; 9 | 10 | // FORMATTING 11 | 12 | addFormatToken('D', ['DD', 2], 'Do', 'date'); 13 | 14 | // ALIASES 15 | 16 | addUnitAlias('date', 'D'); 17 | 18 | // PRIOROITY 19 | addUnitPriority('date', 9); 20 | 21 | // PARSING 22 | 23 | addRegexToken('D', match1to2); 24 | addRegexToken('DD', match1to2, match2); 25 | addRegexToken('Do', function (isStrict, locale) { 26 | // TODO: Remove "ordinalParse" fallback in next major release. 27 | return isStrict ? 28 | (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : 29 | locale._dayOfMonthOrdinalParseLenient; 30 | }); 31 | 32 | addParseToken(['D', 'DD'], DATE); 33 | addParseToken('Do', function (input, array) { 34 | array[DATE] = toInt(input.match(match1to2)[0], 10); 35 | }); 36 | 37 | // MOMENTS 38 | 39 | export var getSetDayOfMonth = makeGetSet('Date', true); 40 | -------------------------------------------------------------------------------- /public/components/typeahead.js/test/typeahead/event_bus_spec.js: -------------------------------------------------------------------------------- 1 | describe('EventBus', function() { 2 | 3 | beforeEach(function() { 4 | var $fixture; 5 | 6 | setFixtures(fixtures.html.input); 7 | 8 | $fixture = $('#jasmine-fixtures'); 9 | this.$el = $fixture.find('.tt-input'); 10 | 11 | this.eventBus = new EventBus({ el: this.$el }); 12 | }); 13 | 14 | it('#trigger should trigger event', function() { 15 | var spy = jasmine.createSpy(); 16 | 17 | this.$el.on('typeahead:fiz', spy); 18 | 19 | this.eventBus.trigger('fiz'); 20 | expect(spy).toHaveBeenCalled(); 21 | }); 22 | 23 | it('#before should return false if default was not prevented', function() { 24 | var spy = jasmine.createSpy(); 25 | 26 | this.$el.on('typeahead:beforefiz', spy); 27 | 28 | expect(this.eventBus.before('fiz')).toBe(false); 29 | expect(spy).toHaveBeenCalled(); 30 | }); 31 | 32 | it('#before should return true if default was prevented', function() { 33 | var spy = jasmine.createSpy().andCallFake(prevent); 34 | 35 | this.$el.on('typeahead:beforefiz', spy); 36 | 37 | expect(this.eventBus.before('fiz')).toBe(true); 38 | expect(spy).toHaveBeenCalled(); 39 | 40 | function prevent($e) { $e.preventDefault(); } 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /public/components/geocomplete/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "geocomplete", 3 | "version": "1.6.5", 4 | "description": "An advanced jQuery plugin that wraps the Google Maps API's [Geocoding](https://code.google.com/apis/maps/documentation/javascript/geocoding.html) and [Places Autocomplete](https://code.google.com/apis/maps/documentation/javascript/places.html#places_autocomplete) services. You simply provide an input that lets you search for locations with a nice autocomplete dropdown. Optionally add a container to show an interactive map and a form that will be populated with the address details.", 5 | "main": "jquery.geocomplete.js", 6 | "directories": { 7 | "example": "examples" 8 | }, 9 | "dependencies": { 10 | "docco": "^0.6.3", 11 | "uglifyjs": "^2.3.6" 12 | }, 13 | "devDependencies": { 14 | "grunt": "^0.4.5", 15 | "grunt-release": "^0.7.0" 16 | }, 17 | "scripts": { 18 | "test": "echo \"Error: no test specified\" && exit 1" 19 | }, 20 | "private": true, 21 | "repository": { 22 | "type": "git", 23 | "url": "https://github.com/ubilabs/geocomplete.git" 24 | }, 25 | "author": "", 26 | "license": "ISC", 27 | "bugs": { 28 | "url": "https://github.com/ubilabs/geocomplete/issues" 29 | }, 30 | "homepage": "https://github.com/ubilabs/geocomplete" 31 | } 32 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/test/typeahead/event_bus_spec.js: -------------------------------------------------------------------------------- 1 | describe('EventBus', function() { 2 | 3 | beforeEach(function() { 4 | var $fixture; 5 | 6 | setFixtures(fixtures.html.input); 7 | 8 | $fixture = $('#jasmine-fixtures'); 9 | this.$el = $fixture.find('.tt-input'); 10 | 11 | this.eventBus = new EventBus({ el: this.$el }); 12 | }); 13 | 14 | it('#trigger should trigger event', function() { 15 | var spy = jasmine.createSpy(); 16 | 17 | this.$el.on('typeahead:fiz', spy); 18 | 19 | this.eventBus.trigger('fiz', 'foo', 'bar'); 20 | expect(spy).toHaveBeenCalledWith(jasmine.any(Object), 'foo', 'bar'); 21 | }); 22 | 23 | it('#before should return false if default was not prevented', function() { 24 | var spy = jasmine.createSpy(); 25 | 26 | this.$el.on('typeahead:beforefiz', spy); 27 | 28 | expect(this.eventBus.before('fiz')).toBe(false); 29 | expect(spy).toHaveBeenCalled(); 30 | }); 31 | 32 | it('#before should return true if default was prevented', function() { 33 | var spy = jasmine.createSpy().andCallFake(prevent); 34 | 35 | this.$el.on('typeahead:beforefiz', spy); 36 | 37 | expect(this.eventBus.before('fiz')).toBe(true); 38 | expect(spy).toHaveBeenCalled(); 39 | 40 | function prevent($e) { $e.preventDefault(); } 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /controllers/watchlists.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var Watchlist = require('../models/watchlist'); 4 | 5 | 6 | // POST watchlist 7 | router.post('/', function (req, res, next) { 8 | var user = req.user; 9 | var post = req.body; 10 | 11 | if (post.status == 'attend' || post.status == 'watch' ) { 12 | Watchlist.add(user, post, function (err, result) { 13 | if (err) throw err; 14 | if (!req.xhr) { 15 | res.redirect('/event/' + post.event_id); 16 | } 17 | }); 18 | } else if (!post.status) { 19 | Watchlist.remove(user, post, function (err, result) { 20 | if (err) throw err; 21 | if (!req.xhr) { 22 | res.redirect('/event/' + post.event_id); 23 | } 24 | }); 25 | } 26 | }); 27 | 28 | // Get watchlist item status for event/user 29 | router.get('/status/:event_id', function(req, res, next) { 30 | var user = req.user; 31 | Watchlist.get(user, req.params.event_id, function (err, result) { 32 | if (err) throw err; 33 | res.send(result); 34 | }); 35 | }); 36 | 37 | // GET watchlists by event 38 | router.get('/list/:event_id', function(req, res, next) { 39 | Watchlist.getAllByEvent(req.params.event_id, function (err, watchlists) { 40 | if (err) throw err; 41 | }); 42 | }); 43 | 44 | module.exports = router; 45 | -------------------------------------------------------------------------------- /public/components/typeahead.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | env: 3 | matrix: 4 | - TEST_SUITE=unit 5 | - TEST_SUITE=integration BROWSER='firefox' 6 | - TEST_SUITE=integration BROWSER='firefox:3.5' 7 | - TEST_SUITE=integration BROWSER='firefox:3.6' 8 | - TEST_SUITE=integration BROWSER='safari:5' 9 | - TEST_SUITE=integration BROWSER='safari:6' 10 | - TEST_SUITE=integration BROWSER='safari:7' 11 | - TEST_SUITE=integration BROWSER='internet explorer:8' 12 | - TEST_SUITE=integration BROWSER='internet explorer:9' 13 | - TEST_SUITE=integration BROWSER='internet explorer:10' 14 | - TEST_SUITE=integration BROWSER='internet explorer:11' 15 | - TEST_SUITE=integration BROWSER='chrome' 16 | global: 17 | - secure: VY4J2ERfrMEin++f4+UDDtTMWLuE3jaYAVchRxfO2c6PQUYgR+SW4SMekz855U/BuptMtiVMR2UUoNGMgOSKIFkIXpPfHhx47G5a541v0WNjXfQ2qzivXAWaXNK3l3C58z4dKxgPWsFY9JtMVCddJd2vQieAILto8D8G09p7bpo= 18 | - secure: kehbNCoYUG2gLnhmCH/oKhlJG6LoxgcOPMCtY7KOI4ropG8qlypb+O2b/19+BWeO3aIuMB0JajNh3p2NL0UKgLmUK7EYBA9fQz+vesFReRk0V/KqMTSxHJuseM4aLOWA2Wr9US843VGltfODVvDN5sNrfY7RcoRx2cTK/k1CXa8= 19 | node_js: 20 | - 0.11.13 21 | before_script: 22 | - npm install -g grunt-cli@0.1.13 23 | - npm install -g node-static@0.7.3 24 | - npm install -g bower@1.3.8 25 | - bower install 26 | - grunt build 27 | script: test/ci 28 | addons: 29 | sauce_connect: true 30 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | env: 3 | matrix: 4 | - TEST_SUITE=unit 5 | - TEST_SUITE=integration BROWSER='firefox' 6 | - TEST_SUITE=integration BROWSER='firefox:3.5' 7 | - TEST_SUITE=integration BROWSER='firefox:3.6' 8 | - TEST_SUITE=integration BROWSER='safari:5' 9 | - TEST_SUITE=integration BROWSER='safari:6' 10 | - TEST_SUITE=integration BROWSER='safari:7' 11 | - TEST_SUITE=integration BROWSER='internet explorer:8' 12 | - TEST_SUITE=integration BROWSER='internet explorer:9' 13 | - TEST_SUITE=integration BROWSER='internet explorer:10' 14 | - TEST_SUITE=integration BROWSER='internet explorer:11' 15 | - TEST_SUITE=integration BROWSER='chrome' 16 | global: 17 | - secure: VY4J2ERfrMEin++f4+UDDtTMWLuE3jaYAVchRxfO2c6PQUYgR+SW4SMekz855U/BuptMtiVMR2UUoNGMgOSKIFkIXpPfHhx47G5a541v0WNjXfQ2qzivXAWaXNK3l3C58z4dKxgPWsFY9JtMVCddJd2vQieAILto8D8G09p7bpo= 18 | - secure: kehbNCoYUG2gLnhmCH/oKhlJG6LoxgcOPMCtY7KOI4ropG8qlypb+O2b/19+BWeO3aIuMB0JajNh3p2NL0UKgLmUK7EYBA9fQz+vesFReRk0V/KqMTSxHJuseM4aLOWA2Wr9US843VGltfODVvDN5sNrfY7RcoRx2cTK/k1CXa8= 19 | node_js: 20 | - "4.1" 21 | cache: 22 | directories: 23 | - node_modules 24 | - bower_components 25 | before_install: 26 | - npm install -g grunt-cli@0.1.13 27 | - npm install -g bower@1.3.8 28 | install: 29 | - npm install 30 | before_script: 31 | - grunt build 32 | script: test/ci 33 | addons: 34 | sauce_connect: true 35 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/locale/base-config.js: -------------------------------------------------------------------------------- 1 | import { defaultCalendar } from './calendar'; 2 | import { defaultLongDateFormat } from './formats'; 3 | import { defaultInvalidDate } from './invalid'; 4 | import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal'; 5 | import { defaultRelativeTime } from './relative'; 6 | 7 | // months 8 | import { 9 | defaultLocaleMonths, 10 | defaultLocaleMonthsShort, 11 | } from '../units/month'; 12 | 13 | // week 14 | import { defaultLocaleWeek } from '../units/week'; 15 | 16 | // weekdays 17 | import { 18 | defaultLocaleWeekdays, 19 | defaultLocaleWeekdaysMin, 20 | defaultLocaleWeekdaysShort, 21 | } from '../units/day-of-week'; 22 | 23 | // meridiem 24 | import { defaultLocaleMeridiemParse } from '../units/hour'; 25 | 26 | export var baseConfig = { 27 | calendar: defaultCalendar, 28 | longDateFormat: defaultLongDateFormat, 29 | invalidDate: defaultInvalidDate, 30 | ordinal: defaultOrdinal, 31 | dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, 32 | relativeTime: defaultRelativeTime, 33 | 34 | months: defaultLocaleMonths, 35 | monthsShort: defaultLocaleMonthsShort, 36 | 37 | week: defaultLocaleWeek, 38 | 39 | weekdays: defaultLocaleWeekdays, 40 | weekdaysMin: defaultLocaleWeekdaysMin, 41 | weekdaysShort: defaultLocaleWeekdaysShort, 42 | 43 | meridiemParse: defaultLocaleMeridiemParse 44 | }; 45 | -------------------------------------------------------------------------------- /public/components/typeahead.js/src/bloodhound/remote.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var Remote = (function() { 8 | 'use strict'; 9 | 10 | // constructor 11 | // ----------- 12 | 13 | function Remote(o) { 14 | this.url = o.url; 15 | this.prepare = o.prepare; 16 | this.transform = o.transform; 17 | 18 | this.transport = new Transport({ 19 | cache: o.cache, 20 | limiter: o.limiter, 21 | transport: o.transport 22 | }); 23 | } 24 | 25 | // instance methods 26 | // ---------------- 27 | 28 | _.mixin(Remote.prototype, { 29 | // ### private 30 | 31 | _settings: function settings() { 32 | return { url: this.url, type: 'GET', dataType: 'json' }; 33 | }, 34 | 35 | // ### public 36 | 37 | get: function get(query, cb) { 38 | var that = this, settings; 39 | 40 | if (!cb) { return; } 41 | 42 | query = query || ''; 43 | settings = this.prepare(query, this._settings()); 44 | 45 | return this.transport.get(settings, onResponse); 46 | 47 | function onResponse(err, resp) { 48 | err ? cb([]) : cb(that.transform(resp)); 49 | } 50 | }, 51 | 52 | cancelLastRequest: function cancelLastRequest() { 53 | this.transport.cancel(); 54 | } 55 | }); 56 | 57 | return Remote; 58 | })(); 59 | -------------------------------------------------------------------------------- /public/components/typeahead.js/test/bloodhound/lru_cache_spec.js: -------------------------------------------------------------------------------- 1 | describe('LruCache', function() { 2 | 3 | beforeEach(function() { 4 | this.cache = new LruCache(3); 5 | }); 6 | 7 | it('should make entries retrievable by their keys', function() { 8 | var key = 'key', val = 42; 9 | 10 | this.cache.set(key, val); 11 | expect(this.cache.get(key)).toBe(val); 12 | }); 13 | 14 | it('should return undefined if key has not been set', function() { 15 | expect(this.cache.get('wat?')).toBeUndefined(); 16 | }); 17 | 18 | it('should hold up to maxSize entries', function() { 19 | this.cache.set('one', 1); 20 | this.cache.set('two', 2); 21 | this.cache.set('three', 3); 22 | this.cache.set('four', 4); 23 | 24 | expect(this.cache.get('one')).toBeUndefined(); 25 | expect(this.cache.get('two')).toBe(2); 26 | expect(this.cache.get('three')).toBe(3); 27 | expect(this.cache.get('four')).toBe(4); 28 | }); 29 | 30 | it('should evict lru entry if cache is full', function() { 31 | this.cache.set('one', 1); 32 | this.cache.set('two', 2); 33 | this.cache.set('three', 3); 34 | this.cache.get('one'); 35 | this.cache.set('four', 4); 36 | 37 | expect(this.cache.get('one')).toBe(1); 38 | expect(this.cache.get('two')).toBeUndefined(); 39 | expect(this.cache.get('three')).toBe(3); 40 | expect(this.cache.get('four')).toBe(4); 41 | expect(this.cache.size).toBe(3); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/test/bloodhound/lru_cache_spec.js: -------------------------------------------------------------------------------- 1 | describe('LruCache', function() { 2 | 3 | beforeEach(function() { 4 | this.cache = new LruCache(3); 5 | }); 6 | 7 | it('should make entries retrievable by their keys', function() { 8 | var key = 'key', val = 42; 9 | 10 | this.cache.set(key, val); 11 | expect(this.cache.get(key)).toBe(val); 12 | }); 13 | 14 | it('should return undefined if key has not been set', function() { 15 | expect(this.cache.get('wat?')).toBeUndefined(); 16 | }); 17 | 18 | it('should hold up to maxSize entries', function() { 19 | this.cache.set('one', 1); 20 | this.cache.set('two', 2); 21 | this.cache.set('three', 3); 22 | this.cache.set('four', 4); 23 | 24 | expect(this.cache.get('one')).toBeUndefined(); 25 | expect(this.cache.get('two')).toBe(2); 26 | expect(this.cache.get('three')).toBe(3); 27 | expect(this.cache.get('four')).toBe(4); 28 | }); 29 | 30 | it('should evict lru entry if cache is full', function() { 31 | this.cache.set('one', 1); 32 | this.cache.set('two', 2); 33 | this.cache.set('three', 3); 34 | this.cache.get('one'); 35 | this.cache.set('four', 4); 36 | 37 | expect(this.cache.get('one')).toBe(1); 38 | expect(this.cache.get('two')).toBeUndefined(); 39 | expect(this.cache.get('three')).toBe(3); 40 | expect(this.cache.get('four')).toBe(4); 41 | expect(this.cache.size).toBe(3); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /public/components/jquery/src/css/var/isHiddenWithinTree.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core", 3 | "../../selector" 4 | 5 | // css is assumed 6 | ], function( jQuery ) { 7 | "use strict"; 8 | 9 | // isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or 10 | // through the CSS cascade), which is useful in deciding whether or not to make it visible. 11 | // It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways: 12 | // * A hidden ancestor does not force an element to be classified as hidden. 13 | // * Being disconnected from the document does not force an element to be classified as hidden. 14 | // These differences improve the behavior of .toggle() et al. when applied to elements that are 15 | // detached or contained within hidden ancestors (gh-2404, gh-2863). 16 | return function( elem, el ) { 17 | 18 | // isHiddenWithinTree might be called from jQuery#filter function; 19 | // in that case, element will be second argument 20 | elem = el || elem; 21 | 22 | // Inline style trumps all 23 | return elem.style.display === "none" || 24 | elem.style.display === "" && 25 | 26 | // Otherwise, check computed style 27 | // Support: Firefox <=43 - 45 28 | // Disconnected elements can have computed display: none, so first confirm that elem is 29 | // in the document. 30 | jQuery.contains( elem.ownerDocument, elem ) && 31 | 32 | jQuery.css( elem, "display" ) === "none"; 33 | }; 34 | } ); 35 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/check-overflow.js: -------------------------------------------------------------------------------- 1 | import { daysInMonth } from '../units/month'; 2 | import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, WEEKDAY } from '../units/constants'; 3 | import getParsingFlags from '../create/parsing-flags'; 4 | 5 | export default function checkOverflow (m) { 6 | var overflow; 7 | var a = m._a; 8 | 9 | if (a && getParsingFlags(m).overflow === -2) { 10 | overflow = 11 | a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : 12 | a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : 13 | a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : 14 | a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : 15 | a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : 16 | a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : 17 | -1; 18 | 19 | if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { 20 | overflow = DATE; 21 | } 22 | if (getParsingFlags(m)._overflowWeeks && overflow === -1) { 23 | overflow = WEEK; 24 | } 25 | if (getParsingFlags(m)._overflowWeekday && overflow === -1) { 26 | overflow = WEEKDAY; 27 | } 28 | 29 | getParsingFlags(m).overflow = overflow; 30 | } 31 | 32 | return m; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /controllers/venues.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var config = require('config'); 4 | var Venue = require('../models/venue'); 5 | 6 | 7 | router.get('/search', function(req, res, next) { 8 | var city = req.query.city; 9 | var query = req.query.query; 10 | var foursquare = require('node-foursquare-venues')(config.foursquare.client_id, config.foursquare.client_secret); 11 | 12 | foursquare.venues.suggestcompletion({near: city, query: query, intent: 'match'}, function(err, resp){ 13 | res.json(resp.response.minivenues); 14 | }); 15 | }); 16 | 17 | router.get('/add', function(req, res, next) { 18 | res.render('add', { title: 'Add Venue' }); 19 | }); 20 | 21 | 22 | // post a new venue 23 | router.post('/', function (req, res, next) { 24 | Venue.create(req.user, req.body, function (err, venue) { 25 | if (err) throw err; 26 | return(venue_id); 27 | }); 28 | }); 29 | 30 | /* GET venue listing. */ 31 | router.get(/(?:.*-|)(.+)$/, function(req, res, next) { 32 | venue_id = req.params[0].replace(/\//g, ''); 33 | Venue.get(venue_id, function (err, venue) { 34 | if (!venue) { 35 | res.render('404', { title: '404 Not Found' }); 36 | } else { 37 | if (err) throw err; 38 | Venue.getEvents(venue_id, function (err, events) { 39 | if (err) throw err; 40 | res.render('venue', { title: venue.name, venue: venue, events: events }); 41 | }); 42 | } 43 | }); 44 | }); 45 | 46 | 47 | module.exports = router; 48 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/src/bloodhound/remote.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var Remote = (function() { 8 | 'use strict'; 9 | 10 | // constructor 11 | // ----------- 12 | 13 | function Remote(o) { 14 | this.url = o.url; 15 | this.prepare = o.prepare; 16 | this.transform = o.transform; 17 | this.indexResponse = o.indexResponse; 18 | 19 | this.transport = new Transport({ 20 | cache: o.cache, 21 | limiter: o.limiter, 22 | transport: o.transport, 23 | maxPendingRequests: o.maxPendingRequests 24 | }); 25 | } 26 | 27 | // instance methods 28 | // ---------------- 29 | 30 | _.mixin(Remote.prototype, { 31 | // ### private 32 | 33 | _settings: function settings() { 34 | return { url: this.url, type: 'GET', dataType: 'json' }; 35 | }, 36 | 37 | // ### public 38 | 39 | get: function get(query, cb) { 40 | var that = this, settings; 41 | 42 | if (!cb) { return; } 43 | 44 | query = query || ''; 45 | settings = this.prepare(query, this._settings()); 46 | 47 | return this.transport.get(settings, onResponse); 48 | 49 | function onResponse(err, resp) { 50 | err ? cb([]) : cb(that.transform(resp)); 51 | } 52 | }, 53 | 54 | cancelLastRequest: function cancelLastRequest() { 55 | this.transport.cancel(); 56 | } 57 | }); 58 | 59 | return Remote; 60 | })(); 61 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/api.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $.geocomplete() 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 | Call: 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /public/components/typeahead.js/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | basePath: '', 4 | 5 | preprocessors: { 6 | 'src/**/*.js': 'coverage' 7 | }, 8 | 9 | reporters: ['progress', 'coverage'], 10 | 11 | browsers: ['Chrome'], 12 | 13 | frameworks: ['jasmine'], 14 | 15 | coverageReporter: { 16 | type: 'html', 17 | dir: 'test/coverage/' 18 | }, 19 | 20 | files: [ 21 | 'bower_components/jquery/jquery.js', 22 | 'src/common/utils.js', 23 | 'src/bloodhound/version.js', 24 | 'src/bloodhound/tokenizers.js', 25 | 'src/bloodhound/lru_cache.js', 26 | 'src/bloodhound/persistent_storage.js', 27 | 'src/bloodhound/transport.js', 28 | 'src/bloodhound/remote.js', 29 | 'src/bloodhound/prefetch.js', 30 | 'src/bloodhound/search_index.js', 31 | 'src/bloodhound/options_parser.js', 32 | 'src/bloodhound/bloodhound.js', 33 | 'src/typeahead/www.js', 34 | 'src/typeahead/event_bus.js', 35 | 'src/typeahead/event_emitter.js', 36 | 'src/typeahead/highlight.js', 37 | 'src/typeahead/input.js', 38 | 'src/typeahead/dataset.js', 39 | 'src/typeahead/menu.js', 40 | 'src/typeahead/default_menu.js', 41 | 'src/typeahead/typeahead.js', 42 | 'src/typeahead/plugin.js', 43 | 'test/fixtures/**/*', 44 | 'bower_components/jasmine-jquery/lib/jasmine-jquery.js', 45 | 'bower_components/jasmine-ajax/lib/mock-ajax.js', 46 | 'test/helpers/**/*', 47 | 'test/**/*_spec.js' 48 | ] 49 | }); 50 | }; 51 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/src/bloodhound/tokenizers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var tokenizers = (function() { 8 | 'use strict'; 9 | 10 | return { 11 | nonword: nonword, 12 | whitespace: whitespace, 13 | ngram: ngram, 14 | obj: { 15 | nonword: getObjTokenizer(nonword), 16 | whitespace: getObjTokenizer(whitespace), 17 | ngram: getObjTokenizer(ngram) 18 | } 19 | }; 20 | 21 | function whitespace(str) { 22 | str = _.toStr(str); 23 | return str ? str.split(/\s+/) : []; 24 | } 25 | 26 | function nonword(str) { 27 | str = _.toStr(str); 28 | return str ? str.split(/\W+/) : []; 29 | } 30 | 31 | function ngram(str) { 32 | str = _.toStr(str); 33 | 34 | var tokens = [], 35 | word = ''; 36 | 37 | _.each(str.split(''), function(char) { 38 | if (char.match(/\s+/)) { 39 | word = ''; 40 | } else { 41 | tokens.push(word+char); 42 | word += char; 43 | } 44 | }); 45 | 46 | return tokens; 47 | } 48 | 49 | function getObjTokenizer(tokenizer) { 50 | return function setKey(keys) { 51 | keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0); 52 | 53 | return function tokenize(o) { 54 | var tokens = []; 55 | 56 | _.each(keys, function(k) { 57 | tokens = tokens.concat(tokenizer(_.toStr(o[k]))); 58 | }); 59 | 60 | return tokens; 61 | }; 62 | }; 63 | } 64 | })(); 65 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/access.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Multifunctional method to get and set values of a collection 8 | // The value/s can optionally be executed if it's a function 9 | var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 10 | var i = 0, 11 | len = elems.length, 12 | bulk = key == null; 13 | 14 | // Sets many values 15 | if ( jQuery.type( key ) === "object" ) { 16 | chainable = true; 17 | for ( i in key ) { 18 | access( elems, fn, i, key[ i ], true, emptyGet, raw ); 19 | } 20 | 21 | // Sets one value 22 | } else if ( value !== undefined ) { 23 | chainable = true; 24 | 25 | if ( !jQuery.isFunction( value ) ) { 26 | raw = true; 27 | } 28 | 29 | if ( bulk ) { 30 | 31 | // Bulk operations run against the entire set 32 | if ( raw ) { 33 | fn.call( elems, value ); 34 | fn = null; 35 | 36 | // ...except when executing function values 37 | } else { 38 | bulk = fn; 39 | fn = function( elem, key, value ) { 40 | return bulk.call( jQuery( elem ), value ); 41 | }; 42 | } 43 | } 44 | 45 | if ( fn ) { 46 | for ( ; i < len; i++ ) { 47 | fn( 48 | elems[ i ], key, raw ? 49 | value : 50 | value.call( elems[ i ], i, fn( elems[ i ], key ) ) 51 | ); 52 | } 53 | } 54 | } 55 | 56 | if ( chainable ) { 57 | return elems; 58 | } 59 | 60 | // Gets 61 | if ( bulk ) { 62 | return fn.call( elems ); 63 | } 64 | 65 | return len ? fn( elems[ 0 ], key ) : emptyGet; 66 | }; 67 | 68 | return access; 69 | 70 | } ); 71 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/valid.js: -------------------------------------------------------------------------------- 1 | import extend from '../utils/extend'; 2 | import { createUTC } from './utc'; 3 | import getParsingFlags from '../create/parsing-flags'; 4 | import some from '../utils/some'; 5 | 6 | export function isValid(m) { 7 | if (m._isValid == null) { 8 | var flags = getParsingFlags(m); 9 | var parsedParts = some.call(flags.parsedDateParts, function (i) { 10 | return i != null; 11 | }); 12 | var isNowValid = !isNaN(m._d.getTime()) && 13 | flags.overflow < 0 && 14 | !flags.empty && 15 | !flags.invalidMonth && 16 | !flags.invalidWeekday && 17 | !flags.nullInput && 18 | !flags.invalidFormat && 19 | !flags.userInvalidated && 20 | (!flags.meridiem || (flags.meridiem && parsedParts)); 21 | 22 | if (m._strict) { 23 | isNowValid = isNowValid && 24 | flags.charsLeftOver === 0 && 25 | flags.unusedTokens.length === 0 && 26 | flags.bigHour === undefined; 27 | } 28 | 29 | if (Object.isFrozen == null || !Object.isFrozen(m)) { 30 | m._isValid = isNowValid; 31 | } 32 | else { 33 | return isNowValid; 34 | } 35 | } 36 | return m._isValid; 37 | } 38 | 39 | export function createInvalid (flags) { 40 | var m = createUTC(NaN); 41 | if (flags != null) { 42 | extend(getParsingFlags(m), flags); 43 | } 44 | else { 45 | getParsingFlags(m).userInvalidated = true; 46 | } 47 | 48 | return m; 49 | } 50 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | basePath: '', 4 | 5 | preprocessors: { 6 | 'src/**/*.js': 'coverage' 7 | }, 8 | 9 | reporters: ['progress', 'coverage'], 10 | 11 | browsers: ['Chrome'], 12 | 13 | frameworks: ['jasmine'], 14 | 15 | coverageReporter: { 16 | type: 'html', 17 | dir: 'test/coverage/' 18 | }, 19 | 20 | files: [ 21 | 'bower_components/jquery/dist/jquery.js', 22 | './node_modules/phantomjs-polyfill/bind-polyfill.js', 23 | 'src/common/utils.js', 24 | 'src/bloodhound/version.js', 25 | 'src/bloodhound/tokenizers.js', 26 | 'src/bloodhound/lru_cache.js', 27 | 'src/bloodhound/persistent_storage.js', 28 | 'src/bloodhound/transport.js', 29 | 'src/bloodhound/remote.js', 30 | 'src/bloodhound/prefetch.js', 31 | 'src/bloodhound/search_index.js', 32 | 'src/bloodhound/options_parser.js', 33 | 'src/bloodhound/bloodhound.js', 34 | 'src/typeahead/www.js', 35 | 'src/typeahead/event_bus.js', 36 | 'src/typeahead/event_emitter.js', 37 | 'src/typeahead/highlight.js', 38 | 'src/typeahead/input.js', 39 | 'src/typeahead/dataset.js', 40 | 'src/typeahead/menu.js', 41 | 'src/typeahead/status.js', 42 | 'src/typeahead/default_menu.js', 43 | 'src/typeahead/typeahead.js', 44 | 'src/typeahead/plugin.js', 45 | 'test/fixtures/**/*', 46 | 'bower_components/jasmine-jquery/lib/jasmine-jquery.js', 47 | 'bower_components/jasmine-ajax/lib/mock-ajax.js', 48 | 'test/helpers/**/*', 49 | 'test/**/*_spec.js' 50 | ] 51 | }); 52 | }; 53 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/get-set.js: -------------------------------------------------------------------------------- 1 | import { normalizeUnits, normalizeObjectUnits } from '../units/aliases'; 2 | import { getPrioritizedUnits } from '../units/priorities'; 3 | import { hooks } from '../utils/hooks'; 4 | import isFunction from '../utils/is-function'; 5 | 6 | 7 | export function makeGetSet (unit, keepTime) { 8 | return function (value) { 9 | if (value != null) { 10 | set(this, unit, value); 11 | hooks.updateOffset(this, keepTime); 12 | return this; 13 | } else { 14 | return get(this, unit); 15 | } 16 | }; 17 | } 18 | 19 | export function get (mom, unit) { 20 | return mom.isValid() ? 21 | mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; 22 | } 23 | 24 | export function set (mom, unit, value) { 25 | if (mom.isValid()) { 26 | mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 27 | } 28 | } 29 | 30 | // MOMENTS 31 | 32 | export function stringGet (units) { 33 | units = normalizeUnits(units); 34 | if (isFunction(this[units])) { 35 | return this[units](); 36 | } 37 | return this; 38 | } 39 | 40 | 41 | export function stringSet (units, value) { 42 | if (typeof units === 'object') { 43 | units = normalizeObjectUnits(units); 44 | var prioritized = getPrioritizedUnits(units); 45 | for (var i = 0; i < prioritized.length; i++) { 46 | this[prioritized[i].unit](units[prioritized[i].unit]); 47 | } 48 | } else { 49 | units = normalizeUnits(units); 50 | if (isFunction(this[units])) { 51 | return this[units](value); 52 | } 53 | } 54 | return this; 55 | } 56 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/src/typeahead/status.js: -------------------------------------------------------------------------------- 1 | var Status = (function () { 2 | 'use strict'; 3 | 4 | function Status(options) { 5 | this.$el = $('', { 6 | 'role': 'status', 7 | 'aria-live': 'polite', 8 | }).css({ 9 | // This `.visuallyhidden` style is inspired by HTML5 Boilerplate 10 | // https://github.com/h5bp/html5-boilerplate/blob/fea7f22/src/css/main.css#L128 11 | 'position': 'absolute', 12 | 'padding': '0', 13 | 'border': '0', 14 | 'height': '1px', 15 | 'width': '1px', 16 | 'margin-bottom': '-1px', 17 | 'margin-right': '-1px', 18 | 'overflow': 'hidden', 19 | 'clip': 'rect(0 0 0 0)', 20 | 'white-space': 'nowrap', 21 | }); 22 | options.$input.after(this.$el); 23 | _.each(options.menu.datasets, _.bind(function (dataset) { 24 | if (dataset.onSync) { 25 | dataset.onSync('rendered', _.bind(this.update, this)); 26 | dataset.onSync('cleared', _.bind(this.cleared, this)); 27 | } 28 | }, this)); 29 | } 30 | _.mixin(Status.prototype, { 31 | update: function update(event, suggestions) { 32 | var length = suggestions.length; 33 | var words; 34 | if (length === 1) { 35 | words = { 36 | result: 'result', 37 | is: 'is' 38 | }; 39 | } else { 40 | words = { 41 | result: 'results', 42 | is: 'are' 43 | }; 44 | }; 45 | this.$el.text(length + ' ' + words.result + ' ' + words.is + ' available, use up and down arrow keys to navigate.'); 46 | }, 47 | cleared: function () { 48 | this.$el.text(''); 49 | } 50 | }); 51 | 52 | return Status; 53 | })(); 54 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/create/from-string-and-array.js: -------------------------------------------------------------------------------- 1 | import { copyConfig } from '../moment/constructor'; 2 | import { configFromStringAndFormat } from './from-string-and-format'; 3 | import getParsingFlags from './parsing-flags'; 4 | import { isValid } from './valid'; 5 | import extend from '../utils/extend'; 6 | 7 | // date from string and array of format strings 8 | export function configFromStringAndArray(config) { 9 | var tempConfig, 10 | bestMoment, 11 | 12 | scoreToBeat, 13 | i, 14 | currentScore; 15 | 16 | if (config._f.length === 0) { 17 | getParsingFlags(config).invalidFormat = true; 18 | config._d = new Date(NaN); 19 | return; 20 | } 21 | 22 | for (i = 0; i < config._f.length; i++) { 23 | currentScore = 0; 24 | tempConfig = copyConfig({}, config); 25 | if (config._useUTC != null) { 26 | tempConfig._useUTC = config._useUTC; 27 | } 28 | tempConfig._f = config._f[i]; 29 | configFromStringAndFormat(tempConfig); 30 | 31 | if (!isValid(tempConfig)) { 32 | continue; 33 | } 34 | 35 | // if there is any input that was not parsed add a penalty for that format 36 | currentScore += getParsingFlags(tempConfig).charsLeftOver; 37 | 38 | //or tokens 39 | currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 40 | 41 | getParsingFlags(tempConfig).score = currentScore; 42 | 43 | if (scoreToBeat == null || currentScore < scoreToBeat) { 44 | scoreToBeat = currentScore; 45 | bestMoment = tempConfig; 46 | } 47 | } 48 | 49 | extend(config, bestMoment || tempConfig); 50 | } 51 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/multiple_results.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $.geocomplete() 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /public/components/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /public/components/jquery/src/event/focusin.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../data/var/dataPriv", 4 | "./support", 5 | 6 | "../event", 7 | "./trigger" 8 | ], function( jQuery, dataPriv, support ) { 9 | 10 | "use strict"; 11 | 12 | // Support: Firefox <=44 13 | // Firefox doesn't have focus(in | out) events 14 | // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 15 | // 16 | // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 17 | // focus(in | out) events fire after focus & blur events, 18 | // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 19 | // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 20 | if ( !support.focusin ) { 21 | jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 22 | 23 | // Attach a single capturing handler on the document while someone wants focusin/focusout 24 | var handler = function( event ) { 25 | jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 26 | }; 27 | 28 | jQuery.event.special[ fix ] = { 29 | setup: function() { 30 | var doc = this.ownerDocument || this, 31 | attaches = dataPriv.access( doc, fix ); 32 | 33 | if ( !attaches ) { 34 | doc.addEventListener( orig, handler, true ); 35 | } 36 | dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 37 | }, 38 | teardown: function() { 39 | var doc = this.ownerDocument || this, 40 | attaches = dataPriv.access( doc, fix ) - 1; 41 | 42 | if ( !attaches ) { 43 | doc.removeEventListener( orig, handler, true ); 44 | dataPriv.remove( doc, fix ); 45 | 46 | } else { 47 | dataPriv.access( doc, fix, attaches ); 48 | } 49 | } 50 | }; 51 | } ); 52 | } 53 | 54 | return jQuery; 55 | } ); 56 | -------------------------------------------------------------------------------- /public/components/jquery/external/sizzle/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/sizzle 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/bounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $.geocomplete() 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 |

Try searching for "Google". Results should be biased within Sydney.
For further details on result biasing: http://code.google.com/apis/maps/documentation/javascript/places.html#adding_autocomplete

18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 46 | 47 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/moment/start-end-of.js: -------------------------------------------------------------------------------- 1 | import { normalizeUnits } from '../units/aliases'; 2 | 3 | export function startOf (units) { 4 | units = normalizeUnits(units); 5 | // the following switch intentionally omits break keywords 6 | // to utilize falling through the cases. 7 | switch (units) { 8 | case 'year': 9 | this.month(0); 10 | /* falls through */ 11 | case 'quarter': 12 | case 'month': 13 | this.date(1); 14 | /* falls through */ 15 | case 'week': 16 | case 'isoWeek': 17 | case 'day': 18 | case 'date': 19 | this.hours(0); 20 | /* falls through */ 21 | case 'hour': 22 | this.minutes(0); 23 | /* falls through */ 24 | case 'minute': 25 | this.seconds(0); 26 | /* falls through */ 27 | case 'second': 28 | this.milliseconds(0); 29 | } 30 | 31 | // weeks are a special case 32 | if (units === 'week') { 33 | this.weekday(0); 34 | } 35 | if (units === 'isoWeek') { 36 | this.isoWeekday(1); 37 | } 38 | 39 | // quarters are also special 40 | if (units === 'quarter') { 41 | this.month(Math.floor(this.month() / 3) * 3); 42 | } 43 | 44 | return this; 45 | } 46 | 47 | export function endOf (units) { 48 | units = normalizeUnits(units); 49 | if (units === undefined || units === 'millisecond') { 50 | return this; 51 | } 52 | 53 | // 'date' is an alias for 'day', so it should be considered as such. 54 | if (units === 'date') { 55 | units = 'day'; 56 | } 57 | 58 | return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); 59 | } 60 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/ar-tn.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Arabic (Tunisia) [ar-tn] 3 | //! author : Nader Toukabri : https://github.com/naderio 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('ar-tn', { 8 | months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), 9 | monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), 10 | weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), 11 | weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), 12 | weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), 13 | weekdaysParseExact : true, 14 | longDateFormat: { 15 | LT: 'HH:mm', 16 | LTS: 'HH:mm:ss', 17 | L: 'DD/MM/YYYY', 18 | LL: 'D MMMM YYYY', 19 | LLL: 'D MMMM YYYY HH:mm', 20 | LLLL: 'dddd D MMMM YYYY HH:mm' 21 | }, 22 | calendar: { 23 | sameDay: '[اليوم على الساعة] LT', 24 | nextDay: '[غدا على الساعة] LT', 25 | nextWeek: 'dddd [على الساعة] LT', 26 | lastDay: '[أمس على الساعة] LT', 27 | lastWeek: 'dddd [على الساعة] LT', 28 | sameElse: 'L' 29 | }, 30 | relativeTime: { 31 | future: 'في %s', 32 | past: 'منذ %s', 33 | s: 'ثوان', 34 | m: 'دقيقة', 35 | mm: '%d دقائق', 36 | h: 'ساعة', 37 | hh: '%d ساعات', 38 | d: 'يوم', 39 | dd: '%d أيام', 40 | M: 'شهر', 41 | MM: '%d أشهر', 42 | y: 'سنة', 43 | yy: '%d سنوات' 44 | }, 45 | week: { 46 | dow: 1, // Monday is the first day of the week. 47 | doy: 4 // The week that contains Jan 4th is the first week of the year. 48 | } 49 | }); 50 | 51 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/km.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Cambodian [km] 3 | //! author : Kruy Vanna : https://github.com/kruyvanna 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('km', { 8 | months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'), 9 | monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'), 10 | weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), 11 | weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), 12 | weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), 13 | longDateFormat: { 14 | LT: 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L: 'DD/MM/YYYY', 17 | LL: 'D MMMM YYYY', 18 | LLL: 'D MMMM YYYY HH:mm', 19 | LLLL: 'dddd, D MMMM YYYY HH:mm' 20 | }, 21 | calendar: { 22 | sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', 23 | nextDay: '[ស្អែក ម៉ោង] LT', 24 | nextWeek: 'dddd [ម៉ោង] LT', 25 | lastDay: '[ម្សិលមិញ ម៉ោង] LT', 26 | lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', 27 | sameElse: 'L' 28 | }, 29 | relativeTime: { 30 | future: '%sទៀត', 31 | past: '%sមុន', 32 | s: 'ប៉ុន្មានវិនាទី', 33 | m: 'មួយនាទី', 34 | mm: '%d នាទី', 35 | h: 'មួយម៉ោង', 36 | hh: '%d ម៉ោង', 37 | d: 'មួយថ្ងៃ', 38 | dd: '%d ថ្ងៃ', 39 | M: 'មួយខែ', 40 | MM: '%d ខែ', 41 | y: 'មួយឆ្នាំ', 42 | yy: '%d ឆ្នាំ' 43 | }, 44 | week: { 45 | dow: 1, // Monday is the first day of the week. 46 | doy: 4 // The week that contains Jan 4th is the first week of the year. 47 | } 48 | }); 49 | 50 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/uz.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Uzbek [uz] 3 | //! author : Sardor Muminov : https://github.com/muminoff 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('uz', { 8 | months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), 9 | monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), 10 | weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), 11 | weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), 12 | weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D MMMM YYYY', 18 | LLL : 'D MMMM YYYY HH:mm', 19 | LLLL : 'D MMMM YYYY, dddd HH:mm' 20 | }, 21 | calendar : { 22 | sameDay : '[Бугун соат] LT [да]', 23 | nextDay : '[Эртага] LT [да]', 24 | nextWeek : 'dddd [куни соат] LT [да]', 25 | lastDay : '[Кеча соат] LT [да]', 26 | lastWeek : '[Утган] dddd [куни соат] LT [да]', 27 | sameElse : 'L' 28 | }, 29 | relativeTime : { 30 | future : 'Якин %s ичида', 31 | past : 'Бир неча %s олдин', 32 | s : 'фурсат', 33 | m : 'бир дакика', 34 | mm : '%d дакика', 35 | h : 'бир соат', 36 | hh : '%d соат', 37 | d : 'бир кун', 38 | dd : '%d кун', 39 | M : 'бир ой', 40 | MM : '%d ой', 41 | y : 'бир йил', 42 | yy : '%d йил' 43 | }, 44 | week : { 45 | dow : 1, // Monday is the first day of the week. 46 | doy : 7 // The week that contains Jan 4th is the first week of the year. 47 | } 48 | }); 49 | 50 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/constructor.js: -------------------------------------------------------------------------------- 1 | import { normalizeObjectUnits } from '../units/aliases'; 2 | import { getLocale } from '../locale/locales'; 3 | import isDurationValid from './valid.js'; 4 | 5 | export function Duration (duration) { 6 | var normalizedInput = normalizeObjectUnits(duration), 7 | years = normalizedInput.year || 0, 8 | quarters = normalizedInput.quarter || 0, 9 | months = normalizedInput.month || 0, 10 | weeks = normalizedInput.week || 0, 11 | days = normalizedInput.day || 0, 12 | hours = normalizedInput.hour || 0, 13 | minutes = normalizedInput.minute || 0, 14 | seconds = normalizedInput.second || 0, 15 | milliseconds = normalizedInput.millisecond || 0; 16 | 17 | this._isValid = isDurationValid(normalizedInput); 18 | 19 | // representation for dateAddRemove 20 | this._milliseconds = +milliseconds + 21 | seconds * 1e3 + // 1000 22 | minutes * 6e4 + // 1000 * 60 23 | hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 24 | // Because of dateAddRemove treats 24 hours as different from a 25 | // day when working around DST, we need to store them separately 26 | this._days = +days + 27 | weeks * 7; 28 | // It is impossible translate months into days without knowing 29 | // which months you are are talking about, so we have to store 30 | // it separately. 31 | this._months = +months + 32 | quarters * 3 + 33 | years * 12; 34 | 35 | this._data = {}; 36 | 37 | this._locale = getLocale(); 38 | 39 | this._bubble(); 40 | } 41 | 42 | export function isDuration (obj) { 43 | return obj instanceof Duration; 44 | } 45 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/ar-kw.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Arabic (Kuwait) [ar-kw] 3 | //! author : Nusret Parlak: https://github.com/nusretparlak 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('ar-kw', { 8 | months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), 9 | monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), 10 | weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), 11 | weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), 12 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), 13 | weekdaysParseExact : true, 14 | longDateFormat : { 15 | LT : 'HH:mm', 16 | LTS : 'HH:mm:ss', 17 | L : 'DD/MM/YYYY', 18 | LL : 'D MMMM YYYY', 19 | LLL : 'D MMMM YYYY HH:mm', 20 | LLLL : 'dddd D MMMM YYYY HH:mm' 21 | }, 22 | calendar : { 23 | sameDay: '[اليوم على الساعة] LT', 24 | nextDay: '[غدا على الساعة] LT', 25 | nextWeek: 'dddd [على الساعة] LT', 26 | lastDay: '[أمس على الساعة] LT', 27 | lastWeek: 'dddd [على الساعة] LT', 28 | sameElse: 'L' 29 | }, 30 | relativeTime : { 31 | future : 'في %s', 32 | past : 'منذ %s', 33 | s : 'ثوان', 34 | m : 'دقيقة', 35 | mm : '%d دقائق', 36 | h : 'ساعة', 37 | hh : '%d ساعات', 38 | d : 'يوم', 39 | dd : '%d أيام', 40 | M : 'شهر', 41 | MM : '%d أشهر', 42 | y : 'سنة', 43 | yy : '%d سنوات' 44 | }, 45 | week : { 46 | dow : 0, // Sunday is the first day of the week. 47 | doy : 12 // The week that contains Jan 1st is the first week of the year. 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/tzm.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Central Atlas Tamazight [tzm] 3 | //! author : Abdel Said : https://github.com/abdelsaid 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('tzm', { 8 | months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), 9 | monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), 10 | weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), 11 | weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), 12 | weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS: 'HH:mm:ss', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D MMMM YYYY', 18 | LLL : 'D MMMM YYYY HH:mm', 19 | LLLL : 'dddd D MMMM YYYY HH:mm' 20 | }, 21 | calendar : { 22 | sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', 23 | nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', 24 | nextWeek: 'dddd [ⴴ] LT', 25 | lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', 26 | lastWeek: 'dddd [ⴴ] LT', 27 | sameElse: 'L' 28 | }, 29 | relativeTime : { 30 | future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', 31 | past : 'ⵢⴰⵏ %s', 32 | s : 'ⵉⵎⵉⴽ', 33 | m : 'ⵎⵉⵏⵓⴺ', 34 | mm : '%d ⵎⵉⵏⵓⴺ', 35 | h : 'ⵙⴰⵄⴰ', 36 | hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', 37 | d : 'ⴰⵙⵙ', 38 | dd : '%d oⵙⵙⴰⵏ', 39 | M : 'ⴰⵢoⵓⵔ', 40 | MM : '%d ⵉⵢⵢⵉⵔⵏ', 41 | y : 'ⴰⵙⴳⴰⵙ', 42 | yy : '%d ⵉⵙⴳⴰⵙⵏ' 43 | }, 44 | week : { 45 | dow : 6, // Saturday is the first day of the week. 46 | doy : 12 // The week that contains Jan 1st is the first week of the year. 47 | } 48 | }); 49 | 50 | -------------------------------------------------------------------------------- /public/components/jquery/src/wrap.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./core/init", 4 | "./manipulation", // clone 5 | "./traversing" // parent, contents 6 | ], function( jQuery ) { 7 | 8 | "use strict"; 9 | 10 | jQuery.fn.extend( { 11 | wrapAll: function( html ) { 12 | var wrap; 13 | 14 | if ( this[ 0 ] ) { 15 | if ( jQuery.isFunction( html ) ) { 16 | html = html.call( this[ 0 ] ); 17 | } 18 | 19 | // The elements to wrap the target around 20 | wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 21 | 22 | if ( this[ 0 ].parentNode ) { 23 | wrap.insertBefore( this[ 0 ] ); 24 | } 25 | 26 | wrap.map( function() { 27 | var elem = this; 28 | 29 | while ( elem.firstElementChild ) { 30 | elem = elem.firstElementChild; 31 | } 32 | 33 | return elem; 34 | } ).append( this ); 35 | } 36 | 37 | return this; 38 | }, 39 | 40 | wrapInner: function( html ) { 41 | if ( jQuery.isFunction( html ) ) { 42 | return this.each( function( i ) { 43 | jQuery( this ).wrapInner( html.call( this, i ) ); 44 | } ); 45 | } 46 | 47 | return this.each( function() { 48 | var self = jQuery( this ), 49 | contents = self.contents(); 50 | 51 | if ( contents.length ) { 52 | contents.wrapAll( html ); 53 | 54 | } else { 55 | self.append( html ); 56 | } 57 | } ); 58 | }, 59 | 60 | wrap: function( html ) { 61 | var isFunction = jQuery.isFunction( html ); 62 | 63 | return this.each( function( i ) { 64 | jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); 65 | } ); 66 | }, 67 | 68 | unwrap: function( selector ) { 69 | this.parent( selector ).not( "body" ).each( function() { 70 | jQuery( this ).replaceWith( this.childNodes ); 71 | } ); 72 | return this; 73 | } 74 | } ); 75 | 76 | return jQuery; 77 | } ); 78 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/ar-dz.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Arabic (Algeria) [ar-dz] 3 | //! author : Noureddine LOUAHEDJ : https://github.com/noureddineme 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('ar-dz', { 8 | months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), 9 | monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), 10 | weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), 11 | weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), 12 | weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), 13 | weekdaysParseExact : true, 14 | longDateFormat : { 15 | LT : 'HH:mm', 16 | LTS : 'HH:mm:ss', 17 | L : 'DD/MM/YYYY', 18 | LL : 'D MMMM YYYY', 19 | LLL : 'D MMMM YYYY HH:mm', 20 | LLLL : 'dddd D MMMM YYYY HH:mm' 21 | }, 22 | calendar : { 23 | sameDay: '[اليوم على الساعة] LT', 24 | nextDay: '[غدا على الساعة] LT', 25 | nextWeek: 'dddd [على الساعة] LT', 26 | lastDay: '[أمس على الساعة] LT', 27 | lastWeek: 'dddd [على الساعة] LT', 28 | sameElse: 'L' 29 | }, 30 | relativeTime : { 31 | future : 'في %s', 32 | past : 'منذ %s', 33 | s : 'ثوان', 34 | m : 'دقيقة', 35 | mm : '%d دقائق', 36 | h : 'ساعة', 37 | hh : '%d ساعات', 38 | d : 'يوم', 39 | dd : '%d أيام', 40 | M : 'شهر', 41 | MM : '%d أشهر', 42 | y : 'سنة', 43 | yy : '%d سنوات' 44 | }, 45 | week : { 46 | dow : 0, // Sunday is the first day of the week. 47 | doy : 4 // The week that contains Jan 1st is the first week of the year. 48 | } 49 | }); 50 | 51 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/uz-latn.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Uzbek Latin [uz-latn] 3 | //! author : Rasulbek Mirzayev : github.com/Rasulbeeek 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('uz-latn', { 8 | months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), 9 | monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), 10 | weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), 11 | weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), 12 | weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D MMMM YYYY', 18 | LLL : 'D MMMM YYYY HH:mm', 19 | LLLL : 'D MMMM YYYY, dddd HH:mm' 20 | }, 21 | calendar : { 22 | sameDay : '[Bugun soat] LT [da]', 23 | nextDay : '[Ertaga] LT [da]', 24 | nextWeek : 'dddd [kuni soat] LT [da]', 25 | lastDay : '[Kecha soat] LT [da]', 26 | lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', 27 | sameElse : 'L' 28 | }, 29 | relativeTime : { 30 | future : 'Yaqin %s ichida', 31 | past : 'Bir necha %s oldin', 32 | s : 'soniya', 33 | m : 'bir daqiqa', 34 | mm : '%d daqiqa', 35 | h : 'bir soat', 36 | hh : '%d soat', 37 | d : 'bir kun', 38 | dd : '%d kun', 39 | M : 'bir oy', 40 | MM : '%d oy', 41 | y : 'bir yil', 42 | yy : '%d yil' 43 | }, 44 | week : { 45 | dow : 1, // Monday is the first day of the week. 46 | doy : 7 // The week that contains Jan 1st is the first week of the year. 47 | } 48 | }); 49 | 50 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/da.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Danish [da] 3 | //! author : Ulrik Nielsen : https://github.com/mrbase 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('da', { 8 | months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), 9 | monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 10 | weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 11 | weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), 12 | weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D. MMMM YYYY', 18 | LLL : 'D. MMMM YYYY HH:mm', 19 | LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' 20 | }, 21 | calendar : { 22 | sameDay : '[i dag kl.] LT', 23 | nextDay : '[i morgen kl.] LT', 24 | nextWeek : 'på dddd [kl.] LT', 25 | lastDay : '[i går kl.] LT', 26 | lastWeek : '[i] dddd[s kl.] LT', 27 | sameElse : 'L' 28 | }, 29 | relativeTime : { 30 | future : 'om %s', 31 | past : '%s siden', 32 | s : 'få sekunder', 33 | m : 'et minut', 34 | mm : '%d minutter', 35 | h : 'en time', 36 | hh : '%d timer', 37 | d : 'en dag', 38 | dd : '%d dage', 39 | M : 'en måned', 40 | MM : '%d måneder', 41 | y : 'et år', 42 | yy : '%d år' 43 | }, 44 | dayOfMonthOrdinalParse: /\d{1,2}\./, 45 | ordinal : '%d.', 46 | week : { 47 | dow : 1, // Monday is the first day of the week. 48 | doy : 4 // The week that contains Jan 4th is the first week of the year. 49 | } 50 | }); 51 | -------------------------------------------------------------------------------- /views/news.pug: -------------------------------------------------------------------------------- 1 | 2 | #news 3 | .panel.panel-default 4 | .panel-heading 5 | .panel-title What's Upcoming? 6 | .panel-body 7 | p. 8 | Upcoming is a simple way to share and discover interesting events from your friends, followers, and the artists and organizations you care about. 9 | 10 | p 11 | a(href="/about") Learn more... 12 | 13 | 14 | 15 | .panel.panel-default 16 | .panel-heading 17 | .panel-title What's coming up? 18 | 19 | .panel-body.list-group 20 | li.list-group-item Follow/unfollow people 21 | li.list-group-item Add new venues 22 | li.list-group-item Trip support 23 | li.list-group-item Deleting/cancelling events 24 | li.list-group-item Event search 25 | li.list-group-item REST API and JSON views 26 | li.list-group-item Terms of service 27 | li.list-group-item Edit your profile 28 | li.list-group-item Delete your account 29 | li.list-group-item Export your history 30 | li.list-group-item Embeds 31 | li.list-group-item Calendar export 32 | li.list-group-item Blocking/reporting users and events 33 | 34 | .panel.panel-default 35 | .panel-heading 36 | .panel-title What's done? 37 | 38 | .panel-body.list-group 39 | li.list-group-item ✅ Markdown in event descriptions 40 | li.list-group-item ✅ Markdown in comments 41 | li.list-group-item ✅ Geocoding venues 42 | li.list-group-item ✅ Filtering events by place 43 | li.list-group-item ✅ Emoji support 44 | li.list-group-item ✅ Editing events 45 | li.list-group-item ✅ Show events on profiles 46 | li.list-group-item ✅ Save avatars from Twitter 47 | li.list-group-item ✅ City/location filter on homepage 48 | li.list-group-item ✅ Twitter cards/Slack unfurls 49 | 50 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/sw.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Swahili [sw] 3 | //! author : Fahad Kassim : https://github.com/fadsel 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('sw', { 8 | months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), 9 | monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), 10 | weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), 11 | weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), 12 | weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), 13 | weekdaysParseExact : true, 14 | longDateFormat : { 15 | LT : 'HH:mm', 16 | LTS : 'HH:mm:ss', 17 | L : 'DD.MM.YYYY', 18 | LL : 'D MMMM YYYY', 19 | LLL : 'D MMMM YYYY HH:mm', 20 | LLLL : 'dddd, D MMMM YYYY HH:mm' 21 | }, 22 | calendar : { 23 | sameDay : '[leo saa] LT', 24 | nextDay : '[kesho saa] LT', 25 | nextWeek : '[wiki ijayo] dddd [saat] LT', 26 | lastDay : '[jana] LT', 27 | lastWeek : '[wiki iliyopita] dddd [saat] LT', 28 | sameElse : 'L' 29 | }, 30 | relativeTime : { 31 | future : '%s baadaye', 32 | past : 'tokea %s', 33 | s : 'hivi punde', 34 | m : 'dakika moja', 35 | mm : 'dakika %d', 36 | h : 'saa limoja', 37 | hh : 'masaa %d', 38 | d : 'siku moja', 39 | dd : 'masiku %d', 40 | M : 'mwezi mmoja', 41 | MM : 'miezi %d', 42 | y : 'mwaka mmoja', 43 | yy : 'miaka %d' 44 | }, 45 | week : { 46 | dow : 1, // Monday is the first day of the week. 47 | doy : 7 // The week that contains Jan 1st is the first week of the year. 48 | } 49 | }); 50 | 51 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/nn.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Nynorsk [nn] 3 | //! author : https://github.com/mechuwind 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('nn', { 8 | months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), 9 | monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 10 | weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), 11 | weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), 12 | weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L : 'DD.MM.YYYY', 17 | LL : 'D. MMMM YYYY', 18 | LLL : 'D. MMMM YYYY [kl.] H:mm', 19 | LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' 20 | }, 21 | calendar : { 22 | sameDay: '[I dag klokka] LT', 23 | nextDay: '[I morgon klokka] LT', 24 | nextWeek: 'dddd [klokka] LT', 25 | lastDay: '[I går klokka] LT', 26 | lastWeek: '[Føregåande] dddd [klokka] LT', 27 | sameElse: 'L' 28 | }, 29 | relativeTime : { 30 | future : 'om %s', 31 | past : '%s sidan', 32 | s : 'nokre sekund', 33 | m : 'eit minutt', 34 | mm : '%d minutt', 35 | h : 'ein time', 36 | hh : '%d timar', 37 | d : 'ein dag', 38 | dd : '%d dagar', 39 | M : 'ein månad', 40 | MM : '%d månader', 41 | y : 'eit år', 42 | yy : '%d år' 43 | }, 44 | dayOfMonthOrdinalParse: /\d{1,2}\./, 45 | ordinal : '%d.', 46 | week : { 47 | dow : 1, // Monday is the first day of the week. 48 | doy : 4 // The week that contains Jan 4th is the first week of the year. 49 | } 50 | }); 51 | 52 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/tzm-latn.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Central Atlas Tamazight Latin [tzm-latn] 3 | //! author : Abdel Said : https://github.com/abdelsaid 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('tzm-latn', { 8 | months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), 9 | monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), 10 | weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), 11 | weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), 12 | weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D MMMM YYYY', 18 | LLL : 'D MMMM YYYY HH:mm', 19 | LLLL : 'dddd D MMMM YYYY HH:mm' 20 | }, 21 | calendar : { 22 | sameDay: '[asdkh g] LT', 23 | nextDay: '[aska g] LT', 24 | nextWeek: 'dddd [g] LT', 25 | lastDay: '[assant g] LT', 26 | lastWeek: 'dddd [g] LT', 27 | sameElse: 'L' 28 | }, 29 | relativeTime : { 30 | future : 'dadkh s yan %s', 31 | past : 'yan %s', 32 | s : 'imik', 33 | m : 'minuḍ', 34 | mm : '%d minuḍ', 35 | h : 'saɛa', 36 | hh : '%d tassaɛin', 37 | d : 'ass', 38 | dd : '%d ossan', 39 | M : 'ayowr', 40 | MM : '%d iyyirn', 41 | y : 'asgas', 42 | yy : '%d isgasn' 43 | }, 44 | week : { 45 | dow : 6, // Saturday is the first day of the week. 46 | doy : 12 // The week that contains Jan 1st is the first week of the year. 47 | } 48 | }); 49 | 50 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/fo.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Faroese [fo] 3 | //! author : Ragnar Johannesen : https://github.com/ragnar123 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('fo', { 8 | months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), 9 | monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 10 | weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), 11 | weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), 12 | weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), 13 | longDateFormat : { 14 | LT : 'HH:mm', 15 | LTS : 'HH:mm:ss', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D MMMM YYYY', 18 | LLL : 'D MMMM YYYY HH:mm', 19 | LLLL : 'dddd D. MMMM, YYYY HH:mm' 20 | }, 21 | calendar : { 22 | sameDay : '[Í dag kl.] LT', 23 | nextDay : '[Í morgin kl.] LT', 24 | nextWeek : 'dddd [kl.] LT', 25 | lastDay : '[Í gjár kl.] LT', 26 | lastWeek : '[síðstu] dddd [kl] LT', 27 | sameElse : 'L' 28 | }, 29 | relativeTime : { 30 | future : 'um %s', 31 | past : '%s síðani', 32 | s : 'fá sekund', 33 | m : 'ein minutt', 34 | mm : '%d minuttir', 35 | h : 'ein tími', 36 | hh : '%d tímar', 37 | d : 'ein dagur', 38 | dd : '%d dagar', 39 | M : 'ein mánaði', 40 | MM : '%d mánaðir', 41 | y : 'eitt ár', 42 | yy : '%d ár' 43 | }, 44 | dayOfMonthOrdinalParse: /\d{1,2}\./, 45 | ordinal : '%d.', 46 | week : { 47 | dow : 1, // Monday is the first day of the week. 48 | doy : 4 // The week that contains Jan 4th is the first week of the year. 49 | } 50 | }); 51 | 52 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/ar-ma.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Arabic (Morocco) [ar-ma] 3 | //! author : ElFadili Yassine : https://github.com/ElFadiliY 4 | //! author : Abdel Said : https://github.com/abdelsaid 5 | 6 | import moment from '../moment'; 7 | 8 | export default moment.defineLocale('ar-ma', { 9 | months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), 10 | monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), 11 | weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), 12 | weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), 13 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), 14 | weekdaysParseExact : true, 15 | longDateFormat : { 16 | LT : 'HH:mm', 17 | LTS : 'HH:mm:ss', 18 | L : 'DD/MM/YYYY', 19 | LL : 'D MMMM YYYY', 20 | LLL : 'D MMMM YYYY HH:mm', 21 | LLLL : 'dddd D MMMM YYYY HH:mm' 22 | }, 23 | calendar : { 24 | sameDay: '[اليوم على الساعة] LT', 25 | nextDay: '[غدا على الساعة] LT', 26 | nextWeek: 'dddd [على الساعة] LT', 27 | lastDay: '[أمس على الساعة] LT', 28 | lastWeek: 'dddd [على الساعة] LT', 29 | sameElse: 'L' 30 | }, 31 | relativeTime : { 32 | future : 'في %s', 33 | past : 'منذ %s', 34 | s : 'ثوان', 35 | m : 'دقيقة', 36 | mm : '%d دقائق', 37 | h : 'ساعة', 38 | hh : '%d ساعات', 39 | d : 'يوم', 40 | dd : '%d أيام', 41 | M : 'شهر', 42 | MM : '%d أشهر', 43 | y : 'سنة', 44 | yy : '%d سنوات' 45 | }, 46 | week : { 47 | dow : 6, // Saturday is the first day of the week. 48 | doy : 12 // The week that contains Jan 1st is the first week of the year. 49 | } 50 | }); 51 | 52 | -------------------------------------------------------------------------------- /public/components/corejs-typeahead/src/typeahead/event_bus.js: -------------------------------------------------------------------------------- 1 | /* 2 | * typeahead.js 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | var EventBus = (function() { 8 | 'use strict'; 9 | 10 | var namespace, deprecationMap; 11 | 12 | namespace = 'typeahead:'; 13 | 14 | // DEPRECATED: will be remove in v1 15 | // 16 | // NOTE: there is no deprecation plan for the opened and closed event 17 | // as their behavior has changed enough that it wouldn't make sense 18 | deprecationMap = { 19 | render: 'rendered', 20 | cursorchange: 'cursorchanged', 21 | select: 'selected', 22 | autocomplete: 'autocompleted' 23 | }; 24 | 25 | // constructor 26 | // ----------- 27 | 28 | function EventBus(o) { 29 | if (!o || !o.el) { 30 | $.error('EventBus initialized without el'); 31 | } 32 | 33 | this.$el = $(o.el); 34 | } 35 | 36 | // instance methods 37 | // ---------------- 38 | 39 | _.mixin(EventBus.prototype, { 40 | 41 | // ### private 42 | 43 | _trigger: function(type, args) { 44 | var $e = $.Event(namespace + type); 45 | 46 | this.$el.trigger.call(this.$el, $e, args || []); 47 | 48 | return $e; 49 | }, 50 | 51 | // ### public 52 | 53 | before: function(type) { 54 | var args, $e; 55 | 56 | args = [].slice.call(arguments, 1); 57 | $e = this._trigger('before' + type, args); 58 | 59 | return $e.isDefaultPrevented(); 60 | }, 61 | 62 | trigger: function(type) { 63 | var deprecatedType; 64 | 65 | this._trigger(type, [].slice.call(arguments, 1)); 66 | 67 | // TODO: remove in v1 68 | if (deprecatedType = deprecationMap[type]) { 69 | this._trigger(deprecatedType, [].slice.call(arguments, 1)); 70 | } 71 | } 72 | }); 73 | 74 | return EventBus; 75 | })(); 76 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $.geocomplete() 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | Examples: 17 | Hamburg, Germany 18 | 3rr0r 19 | Hauptstraße 20 |
21 | 22 |
Log:
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /models/venue.js: -------------------------------------------------------------------------------- 1 | var db = require('../db.js'); 2 | var helpers = require('../helpers'); 3 | 4 | // create a new venue 5 | exports.create = function(user, venue, next) { 6 | db.query("SELECT * FROM venue WHERE foursquare_id = ?", venue.foursquare_id, function(err, rows) { 7 | if (err) { 8 | return next(err); 9 | } 10 | 11 | if (!rows.length) { 12 | var short_id = require('nid')({length:10}); 13 | var venue_id = short_id(); 14 | 15 | var post = { 16 | venue_id: venue_id, 17 | name: venue.name, 18 | foursquare_id: venue.foursquare_id, 19 | address: venue.address, 20 | locality: venue.locality, 21 | region: venue.region, 22 | postal_code: venue.postal_code, 23 | longitude: venue.longitude, 24 | latitude: venue.latitude, 25 | creator_user_id: user.id 26 | }; 27 | 28 | db.query('INSERT INTO venue SET created_at = NOW(), ?', post, function (err, result) { 29 | if (err) return next(err); 30 | helpers.reverse_geocode(venue_id, function (err, events) { 31 | if (err) throw err; 32 | return(venue_id); 33 | }); 34 | 35 | exports.get(venue_id, next); 36 | }); 37 | } else { 38 | next(null, rows[0]); 39 | } 40 | }); 41 | }; 42 | 43 | 44 | /* get a particular venue by its id */ 45 | exports.get = function(id, next) { 46 | var sql = 'SELECT * FROM venue WHERE venue_id = ?'; 47 | db.query(sql, id, function (err, result) { 48 | if (err) return next(err); 49 | next(null, result[0]); 50 | }); 51 | }; 52 | 53 | 54 | exports.getEvents = function(venue_id, next) { 55 | var sql = 'SELECT * FROM event ' 56 | + 'WHERE venue_id = ? ' 57 | + 'ORDER BY start_date'; 58 | db.query(sql, venue_id, function (err, rows) { 59 | if (err) return next(err); 60 | next(null, rows); 61 | }); 62 | }; 63 | -------------------------------------------------------------------------------- /public/components/jquery/src/core/parseHTML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "./var/rsingleTag", 5 | "../manipulation/buildFragment", 6 | 7 | // This is the only module that needs core/support 8 | "./support" 9 | ], function( jQuery, document, rsingleTag, buildFragment, support ) { 10 | 11 | "use strict"; 12 | 13 | // Argument "data" should be string of html 14 | // context (optional): If specified, the fragment will be created in this context, 15 | // defaults to document 16 | // keepScripts (optional): If true, will include scripts passed in the html string 17 | jQuery.parseHTML = function( data, context, keepScripts ) { 18 | if ( typeof data !== "string" ) { 19 | return []; 20 | } 21 | if ( typeof context === "boolean" ) { 22 | keepScripts = context; 23 | context = false; 24 | } 25 | 26 | var base, parsed, scripts; 27 | 28 | if ( !context ) { 29 | 30 | // Stop scripts or inline event handlers from being executed immediately 31 | // by using document.implementation 32 | if ( support.createHTMLDocument ) { 33 | context = document.implementation.createHTMLDocument( "" ); 34 | 35 | // Set the base href for the created document 36 | // so any parsed elements with URLs 37 | // are based on the document's URL (gh-2965) 38 | base = context.createElement( "base" ); 39 | base.href = document.location.href; 40 | context.head.appendChild( base ); 41 | } else { 42 | context = document; 43 | } 44 | } 45 | 46 | parsed = rsingleTag.exec( data ); 47 | scripts = !keepScripts && []; 48 | 49 | // Single tag 50 | if ( parsed ) { 51 | return [ context.createElement( parsed[ 1 ] ) ]; 52 | } 53 | 54 | parsed = buildFragment( [ data ], context, scripts ); 55 | 56 | if ( scripts && scripts.length ) { 57 | jQuery( scripts ).remove(); 58 | } 59 | 60 | return jQuery.merge( [], parsed.childNodes ); 61 | }; 62 | 63 | return jQuery.parseHTML; 64 | 65 | } ); 66 | -------------------------------------------------------------------------------- /public/components/geocomplete/examples/country_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $.geocomplete() 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 |

Try searching for somewhere. All results should be within Germany.
18 | For further details on result limiting via country: http://code.google.com/apis/maps/documentation/javascript/places.html#adding_autocomplete and read about 'componentRestrictions'.
19 | The Geocoder can also be limited by region: https://developers.google.com/maps/documentation/javascript/reference#GeocoderRequest 20 |

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 45 | 46 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/ko.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Korean [ko] 3 | //! author : Kyungwook, Park : https://github.com/kyungw00k 4 | //! author : Jeeeyul Lee 5 | 6 | import moment from '../moment'; 7 | 8 | export default moment.defineLocale('ko', { 9 | months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), 10 | monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), 11 | weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), 12 | weekdaysShort : '일_월_화_수_목_금_토'.split('_'), 13 | weekdaysMin : '일_월_화_수_목_금_토'.split('_'), 14 | longDateFormat : { 15 | LT : 'A h:mm', 16 | LTS : 'A h:mm:ss', 17 | L : 'YYYY.MM.DD', 18 | LL : 'YYYY년 MMMM D일', 19 | LLL : 'YYYY년 MMMM D일 A h:mm', 20 | LLLL : 'YYYY년 MMMM D일 dddd A h:mm', 21 | l : 'YYYY.MM.DD', 22 | ll : 'YYYY년 MMMM D일', 23 | lll : 'YYYY년 MMMM D일 A h:mm', 24 | llll : 'YYYY년 MMMM D일 dddd A h:mm' 25 | }, 26 | calendar : { 27 | sameDay : '오늘 LT', 28 | nextDay : '내일 LT', 29 | nextWeek : 'dddd LT', 30 | lastDay : '어제 LT', 31 | lastWeek : '지난주 dddd LT', 32 | sameElse : 'L' 33 | }, 34 | relativeTime : { 35 | future : '%s 후', 36 | past : '%s 전', 37 | s : '몇 초', 38 | ss : '%d초', 39 | m : '1분', 40 | mm : '%d분', 41 | h : '한 시간', 42 | hh : '%d시간', 43 | d : '하루', 44 | dd : '%d일', 45 | M : '한 달', 46 | MM : '%d달', 47 | y : '일 년', 48 | yy : '%d년' 49 | }, 50 | dayOfMonthOrdinalParse : /\d{1,2}일/, 51 | ordinal : '%d일', 52 | meridiemParse : /오전|오후/, 53 | isPM : function (token) { 54 | return token === '오후'; 55 | }, 56 | meridiem : function (hour, minute, isUpper) { 57 | return hour < 12 ? '오전' : '오후'; 58 | } 59 | }); 60 | 61 | -------------------------------------------------------------------------------- /public/components/moment/src/locale/yo.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Yoruba Nigeria [yo] 3 | //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe 4 | 5 | import moment from '../moment'; 6 | 7 | export default moment.defineLocale('yo', { 8 | months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), 9 | monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), 10 | weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), 11 | weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), 12 | weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), 13 | longDateFormat : { 14 | LT : 'h:mm A', 15 | LTS : 'h:mm:ss A', 16 | L : 'DD/MM/YYYY', 17 | LL : 'D MMMM YYYY', 18 | LLL : 'D MMMM YYYY h:mm A', 19 | LLLL : 'dddd, D MMMM YYYY h:mm A' 20 | }, 21 | calendar : { 22 | sameDay : '[Ònì ni] LT', 23 | nextDay : '[Ọ̀la ni] LT', 24 | nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', 25 | lastDay : '[Àna ni] LT', 26 | lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', 27 | sameElse : 'L' 28 | }, 29 | relativeTime : { 30 | future : 'ní %s', 31 | past : '%s kọjá', 32 | s : 'ìsẹjú aayá die', 33 | m : 'ìsẹjú kan', 34 | mm : 'ìsẹjú %d', 35 | h : 'wákati kan', 36 | hh : 'wákati %d', 37 | d : 'ọjọ́ kan', 38 | dd : 'ọjọ́ %d', 39 | M : 'osù kan', 40 | MM : 'osù %d', 41 | y : 'ọdún kan', 42 | yy : 'ọdún %d' 43 | }, 44 | dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, 45 | ordinal : 'ọjọ́ %d', 46 | week : { 47 | dow : 1, // Monday is the first day of the week. 48 | doy : 4 // The week that contains Jan 4th is the first week of the year. 49 | } 50 | }); 51 | -------------------------------------------------------------------------------- /public/components/moment/src/lib/duration/iso-string.js: -------------------------------------------------------------------------------- 1 | import absFloor from '../utils/abs-floor'; 2 | var abs = Math.abs; 3 | 4 | export function toISOString() { 5 | // for ISO strings we do not use the normal bubbling rules: 6 | // * milliseconds bubble up until they become hours 7 | // * days do not bubble at all 8 | // * months bubble up until they become years 9 | // This is because there is no context-free conversion between hours and days 10 | // (think of clock changes) 11 | // and also not between days and months (28-31 days per month) 12 | if (!this.isValid()) { 13 | return this.localeData().invalidDate(); 14 | } 15 | 16 | var seconds = abs(this._milliseconds) / 1000; 17 | var days = abs(this._days); 18 | var months = abs(this._months); 19 | var minutes, hours, years; 20 | 21 | // 3600 seconds -> 60 minutes -> 1 hour 22 | minutes = absFloor(seconds / 60); 23 | hours = absFloor(minutes / 60); 24 | seconds %= 60; 25 | minutes %= 60; 26 | 27 | // 12 months -> 1 year 28 | years = absFloor(months / 12); 29 | months %= 12; 30 | 31 | 32 | // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 33 | var Y = years; 34 | var M = months; 35 | var D = days; 36 | var h = hours; 37 | var m = minutes; 38 | var s = seconds; 39 | var total = this.asSeconds(); 40 | 41 | if (!total) { 42 | // this is the same as C#'s (Noda) and python (isodate)... 43 | // but not other JS (goog.date) 44 | return 'P0D'; 45 | } 46 | 47 | return (total < 0 ? '-' : '') + 48 | 'P' + 49 | (Y ? Y + 'Y' : '') + 50 | (M ? M + 'M' : '') + 51 | (D ? D + 'D' : '') + 52 | ((h || m || s) ? 'T' : '') + 53 | (h ? h + 'H' : '') + 54 | (m ? m + 'M' : '') + 55 | (s ? s + 'S' : ''); 56 | } 57 | --------------------------------------------------------------------------------