├── .DS_Store ├── bin ├── .DS_Store └── armeabi-v7a │ ├── gdb.setup │ ├── gdbserver │ ├── minicap │ ├── minicap-nopie │ ├── minicap.so │ └── minitouch ├── clean.sh ├── forward.sh ├── init.sh ├── libs ├── .DS_Store ├── android-10 │ └── armeabi-v7a │ │ └── minicap.so ├── android-14 │ ├── armeabi-v7a │ │ └── minicap.so │ └── x86 │ │ └── minicap.so ├── android-15 │ ├── armeabi-v7a │ │ └── minicap.so │ └── x86 │ │ └── minicap.so ├── android-16 │ ├── .DS_Store │ ├── armeabi-v7a │ │ └── minicap.so │ └── x86 │ │ └── minicap.so ├── android-17 │ ├── armeabi-v7a │ │ └── minicap.so │ └── x86 │ │ └── minicap.so ├── android-18 │ ├── armeabi-v7a │ │ └── minicap.so │ └── x86 │ │ └── minicap.so ├── android-19 │ ├── armeabi-v7a │ │ └── minicap.so │ └── x86 │ │ └── minicap.so ├── android-21 │ ├── arm64-v8a │ │ └── minicap.so │ ├── armeabi-v7a │ │ └── minicap.so │ ├── x86 │ │ └── minicap.so │ └── x86_64 │ │ └── minicap.so ├── android-22 │ ├── arm64-v8a │ │ └── minicap.so │ ├── armeabi-v7a │ │ └── minicap.so │ ├── x86 │ │ └── minicap.so │ └── x86_64 │ │ └── minicap.so ├── android-23 │ ├── .DS_Store │ ├── arm64-v8a │ │ └── minicap.so │ ├── armeabi-v7a │ │ └── minicap.so │ ├── x86 │ │ └── minicap.so │ └── x86_64 │ │ └── minicap.so ├── android-24 │ ├── arm64-v8a │ │ └── minicap.so │ ├── armeabi-v7a │ │ └── minicap.so │ ├── x86 │ │ └── minicap.so │ └── x86_64 │ │ └── minicap.so ├── android-25 │ ├── arm64-v8a │ │ └── minicap.so │ ├── armeabi-v7a │ │ └── minicap.so │ ├── x86 │ │ └── minicap.so │ └── x86_64 │ │ └── minicap.so ├── android-26 │ ├── arm64-v8a │ │ └── minicap.so │ ├── armeabi-v7a │ │ └── minicap.so │ ├── x86 │ │ └── minicap.so │ └── x86_64 │ │ └── minicap.so └── android-9 │ └── armeabi-v7a │ └── minicap.so ├── package-lock.json ├── readme.md ├── run.sh ├── start-web.sh ├── touch.sh └── web ├── .DS_Store ├── README.md ├── app.js ├── device-controller.js ├── event-emitter.js ├── node_modules ├── .bin │ └── mime ├── accepts │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── array-flatten │ ├── LICENSE │ ├── README.md │ ├── array-flatten.js │ └── package.json ├── bluebird │ ├── LICENSE │ ├── README.md │ ├── changelog.md │ ├── js │ │ ├── browser │ │ │ ├── bluebird.core.js │ │ │ ├── bluebird.core.min.js │ │ │ ├── bluebird.js │ │ │ └── bluebird.min.js │ │ └── release │ │ │ ├── any.js │ │ │ ├── assert.js │ │ │ ├── async.js │ │ │ ├── bind.js │ │ │ ├── bluebird.js │ │ │ ├── call_get.js │ │ │ ├── cancel.js │ │ │ ├── catch_filter.js │ │ │ ├── context.js │ │ │ ├── debuggability.js │ │ │ ├── direct_resolve.js │ │ │ ├── each.js │ │ │ ├── errors.js │ │ │ ├── es5.js │ │ │ ├── filter.js │ │ │ ├── finally.js │ │ │ ├── generators.js │ │ │ ├── join.js │ │ │ ├── map.js │ │ │ ├── method.js │ │ │ ├── nodeback.js │ │ │ ├── nodeify.js │ │ │ ├── promise.js │ │ │ ├── promise_array.js │ │ │ ├── promisify.js │ │ │ ├── props.js │ │ │ ├── queue.js │ │ │ ├── race.js │ │ │ ├── reduce.js │ │ │ ├── schedule.js │ │ │ ├── settle.js │ │ │ ├── some.js │ │ │ ├── synchronous_inspection.js │ │ │ ├── thenables.js │ │ │ ├── timers.js │ │ │ ├── using.js │ │ │ └── util.js │ └── package.json ├── content-disposition │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── content-type │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── cookie-signature │ ├── .npmignore │ ├── History.md │ ├── Readme.md │ ├── index.js │ └── package.json ├── cookie │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── debug │ ├── .coveralls.yml │ ├── .eslintrc │ ├── .npmignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── component.json │ ├── karma.conf.js │ ├── node.js │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── debug.js │ │ ├── index.js │ │ └── node.js ├── depd │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── browser │ │ │ └── index.js │ │ └── compat │ │ │ ├── buffer-concat.js │ │ │ ├── callsite-tostring.js │ │ │ ├── event-listener-count.js │ │ │ └── index.js │ └── package.json ├── destroy │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── ee-first │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── encodeurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── escape-html │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── etag │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── express │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── application.js │ │ ├── express.js │ │ ├── middleware │ │ │ ├── init.js │ │ │ └── query.js │ │ ├── request.js │ │ ├── response.js │ │ ├── router │ │ │ ├── index.js │ │ │ ├── layer.js │ │ │ └── route.js │ │ ├── utils.js │ │ └── view.js │ └── package.json ├── finalhandler │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── forwarded │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── fresh │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── http-errors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── inherits │ ├── LICENSE │ ├── README.md │ ├── inherits.js │ ├── inherits_browser.js │ └── package.json ├── ipaddr.js │ ├── .npmignore │ ├── .travis.yml │ ├── Cakefile │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── ipaddr.min.js │ ├── lib │ │ └── ipaddr.js │ ├── package.json │ ├── src │ │ └── ipaddr.coffee │ └── test │ │ └── ipaddr.test.coffee ├── jquery │ ├── AUTHORS.txt │ ├── LICENSE.txt │ ├── README.md │ ├── bower.json │ ├── dist │ │ ├── core.js │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map │ ├── external │ │ └── sizzle │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── sizzle.js │ │ │ ├── sizzle.min.js │ │ │ └── sizzle.min.map │ ├── package.json │ └── src │ │ ├── .eslintrc.json │ │ ├── ajax.js │ │ ├── ajax │ │ ├── jsonp.js │ │ ├── load.js │ │ ├── parseXML.js │ │ ├── script.js │ │ ├── var │ │ │ ├── location.js │ │ │ ├── nonce.js │ │ │ └── rquery.js │ │ └── xhr.js │ │ ├── attributes.js │ │ ├── attributes │ │ ├── attr.js │ │ ├── classes.js │ │ ├── prop.js │ │ ├── support.js │ │ └── val.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── core │ │ ├── DOMEval.js │ │ ├── access.js │ │ ├── init.js │ │ ├── nodeName.js │ │ ├── parseHTML.js │ │ ├── ready-no-deferred.js │ │ ├── ready.js │ │ ├── readyException.js │ │ ├── stripAndCollapse.js │ │ ├── support.js │ │ └── var │ │ │ └── rsingleTag.js │ │ ├── css.js │ │ ├── css │ │ ├── addGetHookIf.js │ │ ├── adjustCSS.js │ │ ├── curCSS.js │ │ ├── hiddenVisibleSelectors.js │ │ ├── showHide.js │ │ ├── support.js │ │ └── var │ │ │ ├── cssExpand.js │ │ │ ├── getStyles.js │ │ │ ├── isHiddenWithinTree.js │ │ │ ├── rmargin.js │ │ │ ├── rnumnonpx.js │ │ │ └── swap.js │ │ ├── data.js │ │ ├── data │ │ ├── Data.js │ │ └── var │ │ │ ├── acceptData.js │ │ │ ├── dataPriv.js │ │ │ └── dataUser.js │ │ ├── deferred.js │ │ ├── deferred │ │ └── exceptionHook.js │ │ ├── deprecated.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── effects │ │ ├── Tween.js │ │ └── animatedSelector.js │ │ ├── event.js │ │ ├── event │ │ ├── ajax.js │ │ ├── alias.js │ │ ├── focusin.js │ │ ├── support.js │ │ └── trigger.js │ │ ├── exports │ │ ├── amd.js │ │ └── global.js │ │ ├── jquery.js │ │ ├── manipulation.js │ │ ├── manipulation │ │ ├── _evalUrl.js │ │ ├── buildFragment.js │ │ ├── getAll.js │ │ ├── setGlobalEval.js │ │ ├── support.js │ │ ├── var │ │ │ ├── rcheckableType.js │ │ │ ├── rscriptType.js │ │ │ └── rtagName.js │ │ └── wrapMap.js │ │ ├── offset.js │ │ ├── queue.js │ │ ├── queue │ │ └── delay.js │ │ ├── selector-native.js │ │ ├── selector-sizzle.js │ │ ├── selector.js │ │ ├── serialize.js │ │ ├── traversing.js │ │ ├── traversing │ │ ├── findFilter.js │ │ └── var │ │ │ ├── dir.js │ │ │ ├── rneedsContext.js │ │ │ └── siblings.js │ │ ├── var │ │ ├── ObjectFunctionString.js │ │ ├── arr.js │ │ ├── class2type.js │ │ ├── concat.js │ │ ├── document.js │ │ ├── documentElement.js │ │ ├── fnToString.js │ │ ├── getProto.js │ │ ├── hasOwn.js │ │ ├── indexOf.js │ │ ├── pnum.js │ │ ├── push.js │ │ ├── rcssNum.js │ │ ├── rnothtmlwhite.js │ │ ├── slice.js │ │ ├── support.js │ │ └── toString.js │ │ └── wrap.js ├── media-typer │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── merge-descriptors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── methods │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime-db │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── db.json │ ├── index.js │ └── package.json ├── mime-types │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.js │ │ └── test.js │ ├── cli.js │ ├── mime.js │ ├── package.json │ └── types.json ├── mout │ ├── .editorconfig │ ├── .jshintrc │ ├── .npmignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── array.js │ ├── array │ │ ├── append.js │ │ ├── collect.js │ │ ├── combine.js │ │ ├── compact.js │ │ ├── contains.js │ │ ├── difference.js │ │ ├── equals.js │ │ ├── every.js │ │ ├── filter.js │ │ ├── find.js │ │ ├── findIndex.js │ │ ├── findLast.js │ │ ├── findLastIndex.js │ │ ├── flatten.js │ │ ├── forEach.js │ │ ├── groupBy.js │ │ ├── indexOf.js │ │ ├── indicesOf.js │ │ ├── insert.js │ │ ├── intersection.js │ │ ├── invoke.js │ │ ├── join.js │ │ ├── last.js │ │ ├── lastIndexOf.js │ │ ├── map.js │ │ ├── max.js │ │ ├── min.js │ │ ├── pick.js │ │ ├── pluck.js │ │ ├── range.js │ │ ├── reduce.js │ │ ├── reduceRight.js │ │ ├── reject.js │ │ ├── remove.js │ │ ├── removeAll.js │ │ ├── reverse.js │ │ ├── shuffle.js │ │ ├── slice.js │ │ ├── some.js │ │ ├── sort.js │ │ ├── sortBy.js │ │ ├── split.js │ │ ├── take.js │ │ ├── toLookup.js │ │ ├── union.js │ │ ├── unique.js │ │ ├── xor.js │ │ └── zip.js │ ├── collection.js │ ├── collection │ │ ├── contains.js │ │ ├── every.js │ │ ├── filter.js │ │ ├── find.js │ │ ├── forEach.js │ │ ├── make_.js │ │ ├── map.js │ │ ├── max.js │ │ ├── min.js │ │ ├── pluck.js │ │ ├── reduce.js │ │ ├── reject.js │ │ ├── size.js │ │ └── some.js │ ├── date.js │ ├── date │ │ ├── dayOfTheYear.js │ │ ├── diff.js │ │ ├── i18n │ │ │ ├── de-DE.js │ │ │ ├── en-US.js │ │ │ └── pt-BR.js │ │ ├── i18n_.js │ │ ├── isLeapYear.js │ │ ├── isSame.js │ │ ├── parseIso.js │ │ ├── quarter.js │ │ ├── startOf.js │ │ ├── strftime.js │ │ ├── timezoneAbbr.js │ │ ├── timezoneOffset.js │ │ ├── totalDaysInMonth.js │ │ ├── totalDaysInYear.js │ │ └── weekOfTheYear.js │ ├── doc │ │ ├── array.md │ │ ├── collection.md │ │ ├── date.md │ │ ├── function.md │ │ ├── lang.md │ │ ├── math.md │ │ ├── number.md │ │ ├── object.md │ │ ├── queryString.md │ │ ├── random.md │ │ ├── string.md │ │ └── time.md │ ├── function.js │ ├── function │ │ ├── after.js │ │ ├── awaitDelay.js │ │ ├── bind.js │ │ ├── compose.js │ │ ├── constant.js │ │ ├── debounce.js │ │ ├── func.js │ │ ├── identity.js │ │ ├── makeIterator_.js │ │ ├── memoize.js │ │ ├── partial.js │ │ ├── prop.js │ │ ├── series.js │ │ ├── throttle.js │ │ ├── timeout.js │ │ ├── times.js │ │ └── wrap.js │ ├── index.js │ ├── lang.js │ ├── lang │ │ ├── GLOBAL.js │ │ ├── clone.js │ │ ├── createObject.js │ │ ├── ctorApply.js │ │ ├── deepClone.js │ │ ├── deepEquals.js │ │ ├── defaults.js │ │ ├── inheritPrototype.js │ │ ├── is.js │ │ ├── isArguments.js │ │ ├── isArray.js │ │ ├── isBoolean.js │ │ ├── isDate.js │ │ ├── isEmpty.js │ │ ├── isFinite.js │ │ ├── isFunction.js │ │ ├── isInteger.js │ │ ├── isKind.js │ │ ├── isNaN.js │ │ ├── isNull.js │ │ ├── isNumber.js │ │ ├── isObject.js │ │ ├── isPlainObject.js │ │ ├── isPrimitive.js │ │ ├── isRegExp.js │ │ ├── isString.js │ │ ├── isUndefined.js │ │ ├── isnt.js │ │ ├── kindOf.js │ │ ├── toArray.js │ │ ├── toNumber.js │ │ └── toString.js │ ├── math.js │ ├── math │ │ ├── ceil.js │ │ ├── clamp.js │ │ ├── countSteps.js │ │ ├── floor.js │ │ ├── inRange.js │ │ ├── isNear.js │ │ ├── lerp.js │ │ ├── loop.js │ │ ├── map.js │ │ ├── norm.js │ │ ├── overflow.js │ │ └── round.js │ ├── number.js │ ├── number │ │ ├── MAX_INT.js │ │ ├── MAX_SAFE_INTEGER.js │ │ ├── MAX_UINT.js │ │ ├── MIN_INT.js │ │ ├── abbreviate.js │ │ ├── currencyFormat.js │ │ ├── enforcePrecision.js │ │ ├── isNaN.js │ │ ├── nth.js │ │ ├── ordinal.js │ │ ├── pad.js │ │ ├── rol.js │ │ ├── ror.js │ │ ├── sign.js │ │ ├── toInt.js │ │ ├── toUInt.js │ │ └── toUInt31.js │ ├── object.js │ ├── object │ │ ├── bindAll.js │ │ ├── contains.js │ │ ├── deepFillIn.js │ │ ├── deepMatches.js │ │ ├── deepMixIn.js │ │ ├── equals.js │ │ ├── every.js │ │ ├── fillIn.js │ │ ├── filter.js │ │ ├── find.js │ │ ├── flatten.js │ │ ├── forIn.js │ │ ├── forOwn.js │ │ ├── functions.js │ │ ├── get.js │ │ ├── has.js │ │ ├── hasOwn.js │ │ ├── keys.js │ │ ├── map.js │ │ ├── matches.js │ │ ├── max.js │ │ ├── merge.js │ │ ├── min.js │ │ ├── mixIn.js │ │ ├── namespace.js │ │ ├── omit.js │ │ ├── pick.js │ │ ├── pluck.js │ │ ├── reduce.js │ │ ├── reject.js │ │ ├── result.js │ │ ├── set.js │ │ ├── size.js │ │ ├── some.js │ │ ├── unset.js │ │ └── values.js │ ├── package.json │ ├── queryString.js │ ├── queryString │ │ ├── contains.js │ │ ├── decode.js │ │ ├── encode.js │ │ ├── getParam.js │ │ ├── getQuery.js │ │ ├── parse.js │ │ └── setParam.js │ ├── random.js │ ├── random │ │ ├── choice.js │ │ ├── guid.js │ │ ├── rand.js │ │ ├── randBit.js │ │ ├── randBool.js │ │ ├── randHex.js │ │ ├── randInt.js │ │ ├── randSign.js │ │ ├── randString.js │ │ └── random.js │ ├── src │ │ ├── array.js │ │ ├── array │ │ │ ├── append.js │ │ │ ├── collect.js │ │ │ ├── combine.js │ │ │ ├── compact.js │ │ │ ├── contains.js │ │ │ ├── difference.js │ │ │ ├── equals.js │ │ │ ├── every.js │ │ │ ├── filter.js │ │ │ ├── find.js │ │ │ ├── findIndex.js │ │ │ ├── findLast.js │ │ │ ├── findLastIndex.js │ │ │ ├── flatten.js │ │ │ ├── forEach.js │ │ │ ├── groupBy.js │ │ │ ├── indexOf.js │ │ │ ├── indicesOf.js │ │ │ ├── insert.js │ │ │ ├── intersection.js │ │ │ ├── invoke.js │ │ │ ├── join.js │ │ │ ├── last.js │ │ │ ├── lastIndexOf.js │ │ │ ├── map.js │ │ │ ├── max.js │ │ │ ├── min.js │ │ │ ├── pick.js │ │ │ ├── pluck.js │ │ │ ├── range.js │ │ │ ├── reduce.js │ │ │ ├── reduceRight.js │ │ │ ├── reject.js │ │ │ ├── remove.js │ │ │ ├── removeAll.js │ │ │ ├── reverse.js │ │ │ ├── shuffle.js │ │ │ ├── slice.js │ │ │ ├── some.js │ │ │ ├── sort.js │ │ │ ├── sortBy.js │ │ │ ├── split.js │ │ │ ├── take.js │ │ │ ├── toLookup.js │ │ │ ├── union.js │ │ │ ├── unique.js │ │ │ ├── xor.js │ │ │ └── zip.js │ │ ├── collection.js │ │ ├── collection │ │ │ ├── contains.js │ │ │ ├── every.js │ │ │ ├── filter.js │ │ │ ├── find.js │ │ │ ├── forEach.js │ │ │ ├── make_.js │ │ │ ├── map.js │ │ │ ├── max.js │ │ │ ├── min.js │ │ │ ├── pluck.js │ │ │ ├── reduce.js │ │ │ ├── reject.js │ │ │ ├── size.js │ │ │ └── some.js │ │ ├── date.js │ │ ├── date │ │ │ ├── dayOfTheYear.js │ │ │ ├── diff.js │ │ │ ├── i18n │ │ │ │ ├── de-DE.js │ │ │ │ ├── en-US.js │ │ │ │ └── pt-BR.js │ │ │ ├── i18n_.js │ │ │ ├── isLeapYear.js │ │ │ ├── isSame.js │ │ │ ├── parseIso.js │ │ │ ├── quarter.js │ │ │ ├── startOf.js │ │ │ ├── strftime.js │ │ │ ├── timezoneAbbr.js │ │ │ ├── timezoneOffset.js │ │ │ ├── totalDaysInMonth.js │ │ │ ├── totalDaysInYear.js │ │ │ └── weekOfTheYear.js │ │ ├── function.js │ │ ├── function │ │ │ ├── after.js │ │ │ ├── awaitDelay.js │ │ │ ├── bind.js │ │ │ ├── compose.js │ │ │ ├── constant.js │ │ │ ├── debounce.js │ │ │ ├── func.js │ │ │ ├── identity.js │ │ │ ├── makeIterator_.js │ │ │ ├── memoize.js │ │ │ ├── partial.js │ │ │ ├── prop.js │ │ │ ├── series.js │ │ │ ├── throttle.js │ │ │ ├── timeout.js │ │ │ ├── times.js │ │ │ └── wrap.js │ │ ├── index.js │ │ ├── lang.js │ │ ├── lang │ │ │ ├── GLOBAL.js │ │ │ ├── clone.js │ │ │ ├── createObject.js │ │ │ ├── ctorApply.js │ │ │ ├── deepClone.js │ │ │ ├── deepEquals.js │ │ │ ├── defaults.js │ │ │ ├── inheritPrototype.js │ │ │ ├── is.js │ │ │ ├── isArguments.js │ │ │ ├── isArray.js │ │ │ ├── isBoolean.js │ │ │ ├── isDate.js │ │ │ ├── isEmpty.js │ │ │ ├── isFinite.js │ │ │ ├── isFunction.js │ │ │ ├── isInteger.js │ │ │ ├── isKind.js │ │ │ ├── isNaN.js │ │ │ ├── isNull.js │ │ │ ├── isNumber.js │ │ │ ├── isObject.js │ │ │ ├── isPlainObject.js │ │ │ ├── isPrimitive.js │ │ │ ├── isRegExp.js │ │ │ ├── isString.js │ │ │ ├── isUndefined.js │ │ │ ├── isnt.js │ │ │ ├── kindOf.js │ │ │ ├── toArray.js │ │ │ ├── toNumber.js │ │ │ └── toString.js │ │ ├── math.js │ │ ├── math │ │ │ ├── ceil.js │ │ │ ├── clamp.js │ │ │ ├── countSteps.js │ │ │ ├── floor.js │ │ │ ├── inRange.js │ │ │ ├── isNear.js │ │ │ ├── lerp.js │ │ │ ├── loop.js │ │ │ ├── map.js │ │ │ ├── norm.js │ │ │ ├── overflow.js │ │ │ └── round.js │ │ ├── number.js │ │ ├── number │ │ │ ├── MAX_INT.js │ │ │ ├── MAX_SAFE_INTEGER.js │ │ │ ├── MAX_UINT.js │ │ │ ├── MIN_INT.js │ │ │ ├── abbreviate.js │ │ │ ├── currencyFormat.js │ │ │ ├── enforcePrecision.js │ │ │ ├── isNaN.js │ │ │ ├── nth.js │ │ │ ├── ordinal.js │ │ │ ├── pad.js │ │ │ ├── rol.js │ │ │ ├── ror.js │ │ │ ├── sign.js │ │ │ ├── toInt.js │ │ │ ├── toUInt.js │ │ │ └── toUInt31.js │ │ ├── object.js │ │ ├── object │ │ │ ├── bindAll.js │ │ │ ├── contains.js │ │ │ ├── deepFillIn.js │ │ │ ├── deepMatches.js │ │ │ ├── deepMixIn.js │ │ │ ├── equals.js │ │ │ ├── every.js │ │ │ ├── fillIn.js │ │ │ ├── filter.js │ │ │ ├── find.js │ │ │ ├── flatten.js │ │ │ ├── forIn.js │ │ │ ├── forOwn.js │ │ │ ├── functions.js │ │ │ ├── get.js │ │ │ ├── has.js │ │ │ ├── hasOwn.js │ │ │ ├── keys.js │ │ │ ├── map.js │ │ │ ├── matches.js │ │ │ ├── max.js │ │ │ ├── merge.js │ │ │ ├── min.js │ │ │ ├── mixIn.js │ │ │ ├── namespace.js │ │ │ ├── omit.js │ │ │ ├── pick.js │ │ │ ├── pluck.js │ │ │ ├── reduce.js │ │ │ ├── reject.js │ │ │ ├── result.js │ │ │ ├── set.js │ │ │ ├── size.js │ │ │ ├── some.js │ │ │ ├── unset.js │ │ │ └── values.js │ │ ├── queryString.js │ │ ├── queryString │ │ │ ├── contains.js │ │ │ ├── decode.js │ │ │ ├── encode.js │ │ │ ├── getParam.js │ │ │ ├── getQuery.js │ │ │ ├── parse.js │ │ │ └── setParam.js │ │ ├── random.js │ │ ├── random │ │ │ ├── choice.js │ │ │ ├── guid.js │ │ │ ├── rand.js │ │ │ ├── randBit.js │ │ │ ├── randBool.js │ │ │ ├── randHex.js │ │ │ ├── randInt.js │ │ │ ├── randSign.js │ │ │ ├── randString.js │ │ │ └── random.js │ │ ├── string.js │ │ ├── string │ │ │ ├── WHITE_SPACES.js │ │ │ ├── camelCase.js │ │ │ ├── contains.js │ │ │ ├── crop.js │ │ │ ├── endsWith.js │ │ │ ├── escapeHtml.js │ │ │ ├── escapeRegExp.js │ │ │ ├── escapeUnicode.js │ │ │ ├── hyphenate.js │ │ │ ├── insert.js │ │ │ ├── interpolate.js │ │ │ ├── lowerCase.js │ │ │ ├── lpad.js │ │ │ ├── ltrim.js │ │ │ ├── makePath.js │ │ │ ├── normalizeLineBreaks.js │ │ │ ├── pascalCase.js │ │ │ ├── properCase.js │ │ │ ├── removeNonASCII.js │ │ │ ├── removeNonWord.js │ │ │ ├── repeat.js │ │ │ ├── replace.js │ │ │ ├── replaceAccents.js │ │ │ ├── rpad.js │ │ │ ├── rtrim.js │ │ │ ├── sentenceCase.js │ │ │ ├── slugify.js │ │ │ ├── startsWith.js │ │ │ ├── stripHtmlTags.js │ │ │ ├── trim.js │ │ │ ├── truncate.js │ │ │ ├── typecast.js │ │ │ ├── unCamelCase.js │ │ │ ├── underscore.js │ │ │ ├── unescapeHtml.js │ │ │ ├── unescapeUnicode.js │ │ │ ├── unhyphenate.js │ │ │ └── upperCase.js │ │ ├── time.js │ │ └── time │ │ │ ├── convert.js │ │ │ ├── now.js │ │ │ ├── parseMs.js │ │ │ └── toTimeString.js │ ├── string.js │ ├── string │ │ ├── WHITE_SPACES.js │ │ ├── camelCase.js │ │ ├── contains.js │ │ ├── crop.js │ │ ├── endsWith.js │ │ ├── escapeHtml.js │ │ ├── escapeRegExp.js │ │ ├── escapeUnicode.js │ │ ├── hyphenate.js │ │ ├── insert.js │ │ ├── interpolate.js │ │ ├── lowerCase.js │ │ ├── lpad.js │ │ ├── ltrim.js │ │ ├── makePath.js │ │ ├── normalizeLineBreaks.js │ │ ├── pascalCase.js │ │ ├── properCase.js │ │ ├── removeNonASCII.js │ │ ├── removeNonWord.js │ │ ├── repeat.js │ │ ├── replace.js │ │ ├── replaceAccents.js │ │ ├── rpad.js │ │ ├── rtrim.js │ │ ├── sentenceCase.js │ │ ├── slugify.js │ │ ├── startsWith.js │ │ ├── stripHtmlTags.js │ │ ├── trim.js │ │ ├── truncate.js │ │ ├── typecast.js │ │ ├── unCamelCase.js │ │ ├── underscore.js │ │ ├── unescapeHtml.js │ │ ├── unescapeUnicode.js │ │ ├── unhyphenate.js │ │ └── upperCase.js │ ├── time.js │ └── time │ │ ├── convert.js │ │ ├── now.js │ │ ├── parseMs.js │ │ └── toTimeString.js ├── ms │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md ├── negotiator │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── charset.js │ │ ├── encoding.js │ │ ├── language.js │ │ └── mediaType.js │ └── package.json ├── on-finished │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── options │ ├── .npmignore │ ├── Makefile │ ├── README.md │ ├── lib │ │ └── options.js │ └── package.json ├── parseurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── path-to-regexp │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── proxy-addr │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── qs │ ├── .eslintignore │ ├── .eslintrc │ ├── .jscs.json │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ └── qs.js │ ├── lib │ │ ├── formats.js │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js │ ├── package.json │ └── test │ │ ├── .eslintrc │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js ├── range-parser │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── send │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── serve-static │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── setprototypeof │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── statuses │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── codes.json │ ├── index.js │ └── package.json ├── type-is │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── uclass │ ├── .npmignore │ ├── README.md │ ├── events │ │ └── index.js │ ├── implement.js │ ├── license │ ├── options │ │ └── index.js │ ├── package.json │ ├── static │ │ └── index.js │ └── uClass.js ├── ultron │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── unpipe │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── utils-merge │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── vary │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json └── ws │ ├── .npmignore │ ├── .travis.yml │ ├── Makefile │ ├── README.md │ ├── index.js │ ├── lib │ ├── BufferPool.js │ ├── BufferUtil.fallback.js │ ├── BufferUtil.js │ ├── ErrorCodes.js │ ├── Extensions.js │ ├── PerMessageDeflate.js │ ├── Receiver.hixie.js │ ├── Receiver.js │ ├── Sender.hixie.js │ ├── Sender.js │ ├── Validation.fallback.js │ ├── Validation.js │ ├── WebSocket.js │ ├── WebSocketServer.js │ └── browser.js │ └── package.json ├── package-lock.json ├── package.json └── public ├── .DS_Store ├── event-emitter.js ├── index.html ├── lib ├── bootstrap.min.css ├── bootstrap.min.js └── jquery.min.js ├── main.js └── touch.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/.DS_Store -------------------------------------------------------------------------------- /bin/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/bin/.DS_Store -------------------------------------------------------------------------------- /bin/armeabi-v7a/gdbserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/bin/armeabi-v7a/gdbserver -------------------------------------------------------------------------------- /bin/armeabi-v7a/minicap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/bin/armeabi-v7a/minicap -------------------------------------------------------------------------------- /bin/armeabi-v7a/minicap-nopie: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/bin/armeabi-v7a/minicap-nopie -------------------------------------------------------------------------------- /bin/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/bin/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /bin/armeabi-v7a/minitouch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/bin/armeabi-v7a/minitouch -------------------------------------------------------------------------------- /clean.sh: -------------------------------------------------------------------------------- 1 | CAP_PIDS=$(adb shell ps|grep mini|awk '{print $2}') 2 | for cap_pid in $CAP_PIDS 3 | do 4 | adb shell kill -9 $cap_pid 5 | done 6 | LIST=$(ps c|grep node|awk '{print $1}') 7 | echo $LIST 8 | for pid in $LIST 9 | do 10 | kill -9 $pid 11 | done 12 | 13 | -------------------------------------------------------------------------------- /forward.sh: -------------------------------------------------------------------------------- 1 | adb forward tcp:1717 localabstract:minicap -------------------------------------------------------------------------------- /libs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/.DS_Store -------------------------------------------------------------------------------- /libs/android-10/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-10/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-14/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-14/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-14/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-14/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-15/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-15/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-15/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-15/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-16/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-16/.DS_Store -------------------------------------------------------------------------------- /libs/android-16/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-16/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-16/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-16/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-17/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-17/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-17/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-17/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-18/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-18/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-18/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-18/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-19/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-19/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-19/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-19/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-21/arm64-v8a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-21/arm64-v8a/minicap.so -------------------------------------------------------------------------------- /libs/android-21/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-21/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-21/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-21/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-21/x86_64/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-21/x86_64/minicap.so -------------------------------------------------------------------------------- /libs/android-22/arm64-v8a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-22/arm64-v8a/minicap.so -------------------------------------------------------------------------------- /libs/android-22/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-22/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-22/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-22/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-22/x86_64/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-22/x86_64/minicap.so -------------------------------------------------------------------------------- /libs/android-23/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-23/.DS_Store -------------------------------------------------------------------------------- /libs/android-23/arm64-v8a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-23/arm64-v8a/minicap.so -------------------------------------------------------------------------------- /libs/android-23/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-23/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-23/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-23/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-23/x86_64/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-23/x86_64/minicap.so -------------------------------------------------------------------------------- /libs/android-24/arm64-v8a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-24/arm64-v8a/minicap.so -------------------------------------------------------------------------------- /libs/android-24/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-24/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-24/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-24/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-24/x86_64/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-24/x86_64/minicap.so -------------------------------------------------------------------------------- /libs/android-25/arm64-v8a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-25/arm64-v8a/minicap.so -------------------------------------------------------------------------------- /libs/android-25/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-25/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-25/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-25/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-25/x86_64/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-25/x86_64/minicap.so -------------------------------------------------------------------------------- /libs/android-26/arm64-v8a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-26/arm64-v8a/minicap.so -------------------------------------------------------------------------------- /libs/android-26/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-26/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /libs/android-26/x86/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-26/x86/minicap.so -------------------------------------------------------------------------------- /libs/android-26/x86_64/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-26/x86_64/minicap.so -------------------------------------------------------------------------------- /libs/android-9/armeabi-v7a/minicap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/libs/android-9/armeabi-v7a/minicap.so -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | sh clean.sh && sh init.sh & { 2 | sleep 1 3 | sh forward.sh 4 | } & { 5 | sleep 2 6 | sh start-web.sh 7 | } & { 8 | sleep 1 9 | sh touch.sh 10 | } 11 | -------------------------------------------------------------------------------- /start-web.sh: -------------------------------------------------------------------------------- 1 | node web/app.js 2 | -------------------------------------------------------------------------------- /touch.sh: -------------------------------------------------------------------------------- 1 | adb shell /data/local/tmp/minitouch & { 2 | sleep 1 3 | adb forward tcp:1718 localabstract:minitouch 4 | } 5 | -------------------------------------------------------------------------------- /web/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/web/.DS_Store -------------------------------------------------------------------------------- /web/node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | ../mime/cli.js -------------------------------------------------------------------------------- /web/node_modules/bluebird/changelog.md: -------------------------------------------------------------------------------- 1 | [http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html) 2 | -------------------------------------------------------------------------------- /web/node_modules/bluebird/js/release/any.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = function(Promise) { 3 | var SomePromiseArray = Promise._SomePromiseArray; 4 | function any(promises) { 5 | var ret = new SomePromiseArray(promises); 6 | var promise = ret.promise(); 7 | ret.setHowMany(1); 8 | ret.setUnwrap(); 9 | ret.init(); 10 | return promise; 11 | } 12 | 13 | Promise.any = function (promises) { 14 | return any(promises); 15 | }; 16 | 17 | Promise.prototype.any = function () { 18 | return any(this); 19 | }; 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /web/node_modules/bluebird/js/release/bluebird.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var old; 3 | if (typeof Promise !== "undefined") old = Promise; 4 | function noConflict() { 5 | try { if (Promise === bluebird) Promise = old; } 6 | catch (e) {} 7 | return bluebird; 8 | } 9 | var bluebird = require("./promise")(); 10 | bluebird.noConflict = noConflict; 11 | module.exports = bluebird; 12 | -------------------------------------------------------------------------------- /web/node_modules/bluebird/js/release/filter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = function(Promise, INTERNAL) { 3 | var PromiseMap = Promise.map; 4 | 5 | Promise.prototype.filter = function (fn, options) { 6 | return PromiseMap(this, fn, options, INTERNAL); 7 | }; 8 | 9 | Promise.filter = function (promises, fn, options) { 10 | return PromiseMap(promises, fn, options, INTERNAL); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /web/node_modules/content-type/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2016-05-09 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.1 / 2015-02-13 7 | ================== 8 | 9 | * Improve missing `Content-Type` header error message 10 | 11 | 1.0.0 / 2015-02-01 12 | ================== 13 | 14 | * Initial implementation, derived from `media-typer@0.3.0` 15 | -------------------------------------------------------------------------------- /web/node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /web/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /web/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": 0, 8 | "no-empty": [1, { "allowEmptyCatch": true }] 9 | }, 10 | "extends": "eslint:recommended" 11 | } 12 | -------------------------------------------------------------------------------- /web/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /web/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "5" 6 | - "4" 7 | 8 | install: 9 | - make node_modules 10 | 11 | script: 12 | - make lint 13 | - make test 14 | - make coveralls 15 | -------------------------------------------------------------------------------- /web/node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.6.7", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "src/browser.js", 12 | "scripts": [ 13 | "src/browser.js", 14 | "src/debug.js" 15 | ], 16 | "dependencies": { 17 | "rauchg/ms.js": "0.7.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /web/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /web/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process !== 'undefined' && process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /web/node_modules/depd/lib/compat/event-listener-count.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = eventListenerCount 15 | 16 | /** 17 | * Get the count of listeners on an event emitter of a specific type. 18 | */ 19 | 20 | function eventListenerCount(emitter, type) { 21 | return emitter.listeners(type).length 22 | } 23 | -------------------------------------------------------------------------------- /web/node_modules/encodeurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2016-06-09 2 | ================== 3 | 4 | * Fix encoding unpaired surrogates at start/end of string 5 | 6 | 1.0.0 / 2016-06-08 7 | ================== 8 | 9 | * Initial release 10 | -------------------------------------------------------------------------------- /web/node_modules/express/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * express 3 | * Copyright(c) 2009-2013 TJ Holowaychuk 4 | * Copyright(c) 2013 Roman Shtylman 5 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./lib/express'); 12 | -------------------------------------------------------------------------------- /web/node_modules/forwarded/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.1.0 / 2014-09-21 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /web/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | if (typeof util.inherits !== 'function') throw ''; 4 | module.exports = util.inherits; 5 | } catch (e) { 6 | module.exports = require('./inherits_browser.js'); 7 | } 8 | -------------------------------------------------------------------------------- /web/node_modules/ipaddr.js/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /web/node_modules/ipaddr.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | - "0.11" 6 | - "0.12" 7 | - "4.0" 8 | - "4.1" 9 | - "4.2" 10 | - "5" 11 | -------------------------------------------------------------------------------- /web/node_modules/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 | } -------------------------------------------------------------------------------- /web/node_modules/jquery/src/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "../.eslintrc-browser.json" 5 | } 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/ajax/var/location.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.location; 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/ajax/var/nonce.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | "use strict"; 5 | 6 | return jQuery.now(); 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/ajax/var/rquery.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /\?/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/css/var/cssExpand.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return [ "Top", "Right", "Bottom", "Left" ]; 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/css/var/rmargin.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^margin/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/data/var/dataPriv.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/data/var/dataUser.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/manipulation/var/rcheckableType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^(?:checkbox|radio)$/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/manipulation/var/rscriptType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^$|\/(?:java|ecma)script/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/selector.js: -------------------------------------------------------------------------------- 1 | define( [ "./selector-sizzle" ], function() { 2 | "use strict"; 3 | } ); 4 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/ObjectFunctionString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./fnToString" 3 | ], function( fnToString ) { 4 | "use strict"; 5 | 6 | return fnToString.call( Object ); 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/arr.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return []; 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/class2type.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // [[Class]] -> type pairs 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/concat.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.concat; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/document.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.document; 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/documentElement.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | return document.documentElement; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/fnToString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./hasOwn" 3 | ], function( hasOwn ) { 4 | "use strict"; 5 | 6 | return hasOwn.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/getProto.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return Object.getPrototypeOf; 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/hasOwn.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.hasOwnProperty; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/indexOf.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.indexOf; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/pnum.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 5 | } ); 6 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/push.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.push; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/slice.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.slice; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/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 | -------------------------------------------------------------------------------- /web/node_modules/jquery/src/var/toString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /web/node_modules/media-typer/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | * Throw error when parameter format invalid on parse 6 | 7 | 0.2.0 / 2014-06-18 8 | ================== 9 | 10 | * Add `typer.format()` to format media types 11 | 12 | 0.1.0 / 2014-06-17 13 | ================== 14 | 15 | * Accept `req` as argument to `parse` 16 | * Accept `res` as argument to `parse` 17 | * Parse media type with extra LWS between type and first parameter 18 | 19 | 0.0.0 / 2014-06-13 20 | ================== 21 | 22 | * Initial implementation 23 | -------------------------------------------------------------------------------- /web/node_modules/merge-descriptors/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.0 / 2015-03-01 7 | ================== 8 | 9 | * Add option to only add new descriptors 10 | * Add simple argument validation 11 | * Add jsdoc to source file 12 | 13 | 0.0.2 / 2013-12-14 14 | ================== 15 | 16 | * Move repository to `component` organization 17 | 18 | 0.0.1 / 2013-10-29 19 | ================== 20 | 21 | * Initial release 22 | -------------------------------------------------------------------------------- /web/node_modules/methods/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.1.2 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.1.1 / 2014-12-30 7 | ================== 8 | 9 | * Improve `browserify` support 10 | 11 | 1.1.0 / 2014-07-05 12 | ================== 13 | 14 | * Add `CONNECT` method 15 | 16 | 1.0.1 / 2014-06-02 17 | ================== 18 | 19 | * Fix module to work with harmony transform 20 | 21 | 1.0.0 / 2014-05-08 22 | ================== 23 | 24 | * Add `PURGE` method 25 | 26 | 0.1.0 / 2013-10-28 27 | ================== 28 | 29 | * Add `http.METHODS` support 30 | -------------------------------------------------------------------------------- /web/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /web/node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/web/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /web/node_modules/mime/build/build.js: -------------------------------------------------------------------------------- 1 | var db = require('mime-db'); 2 | 3 | var mapByType = {}; 4 | Object.keys(db).forEach(function(key) { 5 | var extensions = db[key].extensions; 6 | if (extensions) { 7 | mapByType[key] = extensions; 8 | } 9 | }); 10 | 11 | console.log(JSON.stringify(mapByType)); 12 | -------------------------------------------------------------------------------- /web/node_modules/mime/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mime = require('./mime.js'); 4 | var file = process.argv[2]; 5 | var type = mime.lookup(file); 6 | 7 | process.stdout.write(type + '\n'); 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/.editorconfig: -------------------------------------------------------------------------------- 1 | ; EditorConfig is awesome: http://EditorConfig.org 2 | 3 | ; top-most EditorConfig file 4 | root = true 5 | 6 | ; base rules 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = false 10 | indent_style = space 11 | indent_size = 4 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | 15 | ; The default indent on package.json is 2 spaces, better to keep it so we can 16 | ; use `npm install --save` and other features that rewrites the package.json 17 | ; file automatically 18 | [{bower,package}.json] 19 | indent_style = space 20 | indent_size = 2 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "iojs" 4 | - "0.10" 5 | - "0.12" 6 | script: 7 | - "npm test --coverage" 8 | - "jshint src" 9 | notifications: 10 | irc: 11 | channels: 12 | - "irc.freenode.org#moutjs" 13 | on_success: change 14 | on_failure: always 15 | use_notice: true 16 | skip_join: true 17 | git: 18 | depth: 10 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/append.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Appends an array to the end of another. 5 | * The first array will be modified. 6 | */ 7 | function append(arr1, arr2) { 8 | if (arr2 == null) { 9 | return arr1; 10 | } 11 | 12 | var pad = arr1.length, 13 | i = -1, 14 | len = arr2.length; 15 | while (++i < len) { 16 | arr1[pad + i] = arr2[i]; 17 | } 18 | return arr1; 19 | } 20 | module.exports = append; 21 | 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/compact.js: -------------------------------------------------------------------------------- 1 | var filter = require('./filter'); 2 | 3 | /** 4 | * Remove all null/undefined items from array. 5 | */ 6 | function compact(arr) { 7 | return filter(arr, function(val){ 8 | return (val != null); 9 | }); 10 | } 11 | 12 | module.exports = compact; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/contains.js: -------------------------------------------------------------------------------- 1 | var indexOf = require('./indexOf'); 2 | 3 | /** 4 | * If array contains values. 5 | */ 6 | function contains(arr, val) { 7 | return indexOf(arr, val) !== -1; 8 | } 9 | module.exports = contains; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/find.js: -------------------------------------------------------------------------------- 1 | var findIndex = require('./findIndex'); 2 | 3 | /** 4 | * Returns first item that matches criteria 5 | */ 6 | function find(arr, iterator, thisObj){ 7 | var idx = findIndex(arr, iterator, thisObj); 8 | return idx >= 0? arr[idx] : void(0); 9 | } 10 | 11 | module.exports = find; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/findLast.js: -------------------------------------------------------------------------------- 1 | var findLastIndex = require('./findLastIndex'); 2 | 3 | /** 4 | * Returns last item that matches criteria 5 | */ 6 | function findLast(arr, iterator, thisObj){ 7 | var idx = findLastIndex(arr, iterator, thisObj); 8 | return idx >= 0? arr[idx] : void(0); 9 | } 10 | 11 | module.exports = findLast; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/insert.js: -------------------------------------------------------------------------------- 1 | var difference = require('./difference'); 2 | var slice = require('./slice'); 3 | 4 | /** 5 | * Insert item into array if not already present. 6 | */ 7 | function insert(arr, rest_items) { 8 | var diff = difference(slice(arguments, 1), arr); 9 | if (diff.length) { 10 | Array.prototype.push.apply(arr, diff); 11 | } 12 | return arr.length; 13 | } 14 | module.exports = insert; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/join.js: -------------------------------------------------------------------------------- 1 | var filter = require('./filter'); 2 | 3 | function isValidString(val) { 4 | return (val != null && val !== ''); 5 | } 6 | 7 | /** 8 | * Joins strings with the specified separator inserted between each value. 9 | * Null values and empty strings will be excluded. 10 | */ 11 | function join(items, separator) { 12 | separator = separator || ''; 13 | return filter(items, isValidString).join(separator); 14 | } 15 | 16 | module.exports = join; 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/last.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns last element of array. 5 | */ 6 | function last(arr){ 7 | if (arr == null || arr.length < 1) { 8 | return undefined; 9 | } 10 | 11 | return arr[arr.length - 1]; 12 | } 13 | 14 | module.exports = last; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/map.js: -------------------------------------------------------------------------------- 1 | var makeIterator = require('../function/makeIterator_'); 2 | 3 | /** 4 | * Array map 5 | */ 6 | function map(arr, callback, thisObj) { 7 | callback = makeIterator(callback, thisObj); 8 | var results = []; 9 | if (arr == null){ 10 | return results; 11 | } 12 | 13 | var i = -1, len = arr.length; 14 | while (++i < len) { 15 | results[i] = callback(arr[i], i, arr); 16 | } 17 | 18 | return results; 19 | } 20 | 21 | module.exports = map; 22 | 23 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/pluck.js: -------------------------------------------------------------------------------- 1 | var map = require('./map'); 2 | 3 | /** 4 | * Extract a list of property values. 5 | */ 6 | function pluck(arr, propName){ 7 | return map(arr, propName); 8 | } 9 | 10 | module.exports = pluck; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/remove.js: -------------------------------------------------------------------------------- 1 | var indexOf = require('./indexOf'); 2 | 3 | /** 4 | * Remove a single item from the array. 5 | * (it won't remove duplicates, just a single item) 6 | */ 7 | function remove(arr, item){ 8 | var idx = indexOf(arr, item); 9 | if (idx !== -1) arr.splice(idx, 1); 10 | } 11 | 12 | module.exports = remove; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/removeAll.js: -------------------------------------------------------------------------------- 1 | var indexOf = require('./indexOf'); 2 | 3 | /** 4 | * Remove all instances of an item from array. 5 | */ 6 | function removeAll(arr, item){ 7 | var idx = indexOf(arr, item); 8 | while (idx !== -1) { 9 | arr.splice(idx, 1); 10 | idx = indexOf(arr, item, idx); 11 | } 12 | } 13 | 14 | module.exports = removeAll; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/reverse.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns a copy of the array in reversed order. 5 | */ 6 | function reverse(array) { 7 | var copy = array.slice(); 8 | copy.reverse(); 9 | return copy; 10 | } 11 | 12 | module.exports = reverse; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/sortBy.js: -------------------------------------------------------------------------------- 1 | var sort = require('./sort'); 2 | var makeIterator = require('../function/makeIterator_'); 3 | 4 | /* 5 | * Sort array by the result of the callback 6 | */ 7 | function sortBy(arr, callback, context){ 8 | callback = makeIterator(callback, context); 9 | 10 | return sort(arr, function(a, b) { 11 | a = callback(a); 12 | b = callback(b); 13 | return (a < b) ? -1 : ((a > b) ? 1 : 0); 14 | }); 15 | } 16 | 17 | module.exports = sortBy; 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/take.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Iterates over a callback a set amount of times 5 | * returning the results 6 | */ 7 | function take(n, callback, thisObj){ 8 | var i = -1; 9 | var arr = []; 10 | if( !thisObj ){ 11 | while(++i < n){ 12 | arr[i] = callback(i, n); 13 | } 14 | } else { 15 | while(++i < n){ 16 | arr[i] = callback.call(thisObj, i, n); 17 | } 18 | } 19 | return arr; 20 | } 21 | 22 | module.exports = take; 23 | 24 | 25 | -------------------------------------------------------------------------------- /web/node_modules/mout/array/union.js: -------------------------------------------------------------------------------- 1 | var unique = require('./unique'); 2 | var append = require('./append'); 3 | 4 | /** 5 | * Concat multiple arrays and remove duplicates 6 | */ 7 | function union(arrs) { 8 | var results = []; 9 | var i = -1, len = arguments.length; 10 | while (++i < len) { 11 | append(results, arguments[i]); 12 | } 13 | 14 | return unique(results); 15 | } 16 | 17 | module.exports = union; 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/contains.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrContains = require('../array/contains'); 3 | var objContains = require('../object/contains'); 4 | 5 | /** 6 | */ 7 | module.exports = make(arrContains, objContains); 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/every.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrEvery = require('../array/every'); 3 | var objEvery = require('../object/every'); 4 | 5 | /** 6 | */ 7 | module.exports = make(arrEvery, objEvery); 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/find.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrFind = require('../array/find'); 3 | var objFind = require('../object/find'); 4 | 5 | /** 6 | * Find value that returns true on iterator check. 7 | */ 8 | module.exports = make(arrFind, objFind); 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/forEach.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrForEach = require('../array/forEach'); 3 | var objForEach = require('../object/forOwn'); 4 | 5 | /** 6 | */ 7 | module.exports = make(arrForEach, objForEach); 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/max.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrMax = require('../array/max'); 3 | var objMax = require('../object/max'); 4 | 5 | /** 6 | * Get maximum value inside collection 7 | */ 8 | module.exports = make(arrMax, objMax); 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/min.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrMin = require('../array/min'); 3 | var objMin = require('../object/min'); 4 | 5 | /** 6 | * Get minimum value inside collection. 7 | */ 8 | module.exports = make(arrMin, objMin); 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/pluck.js: -------------------------------------------------------------------------------- 1 | var map = require('./map'); 2 | 3 | /** 4 | * Extract a list of property values. 5 | */ 6 | function pluck(list, key) { 7 | return map(list, function(value) { 8 | return value[key]; 9 | }); 10 | } 11 | 12 | module.exports = pluck; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/reduce.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrReduce = require('../array/reduce'); 3 | var objReduce = require('../object/reduce'); 4 | 5 | /** 6 | */ 7 | module.exports = make(arrReduce, objReduce); 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/reject.js: -------------------------------------------------------------------------------- 1 | var filter = require('./filter'); 2 | var makeIterator = require('../function/makeIterator_'); 3 | 4 | /** 5 | * Inverse or collection/filter 6 | */ 7 | function reject(list, iterator, thisObj) { 8 | iterator = makeIterator(iterator, thisObj); 9 | return filter(list, function(value, index, list) { 10 | return !iterator(value, index, list); 11 | }, thisObj); 12 | } 13 | 14 | module.exports = reject; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/size.js: -------------------------------------------------------------------------------- 1 | var isArray = require('../lang/isArray'); 2 | var objSize = require('../object/size'); 3 | 4 | /** 5 | * Get collection size 6 | */ 7 | function size(list) { 8 | if (!list) { 9 | return 0; 10 | } 11 | if (isArray(list)) { 12 | return list.length; 13 | } 14 | return objSize(list); 15 | } 16 | 17 | module.exports = size; 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/collection/some.js: -------------------------------------------------------------------------------- 1 | var make = require('./make_'); 2 | var arrSome = require('../array/some'); 3 | var objSome = require('../object/some'); 4 | 5 | /** 6 | */ 7 | module.exports = make(arrSome, objSome); 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/dayOfTheYear.js: -------------------------------------------------------------------------------- 1 | var isDate = require('../lang/isDate'); 2 | 3 | /** 4 | * return the day of the year (1..366) 5 | */ 6 | function dayOfTheYear(date){ 7 | return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - 8 | Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; 9 | } 10 | 11 | module.exports = dayOfTheYear; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/i18n_.js: -------------------------------------------------------------------------------- 1 | var mixIn = require('../object/mixIn'); 2 | var enUS = require('./i18n/en-US'); 3 | 4 | // we also use mixIn to make sure we don't affect the original locale 5 | var activeLocale = mixIn({}, enUS, { 6 | // we expose a "set" method to allow overriding the global locale 7 | set : function(localeData){ 8 | mixIn(activeLocale, localeData); 9 | } 10 | }); 11 | 12 | module.exports = activeLocale; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/isLeapYear.js: -------------------------------------------------------------------------------- 1 | var isDate = require('../lang/isDate'); 2 | 3 | /** 4 | * checks if it's a leap year 5 | */ 6 | function isLeapYear(fullYear){ 7 | if (isDate(fullYear)) { 8 | fullYear = fullYear.getFullYear(); 9 | } 10 | return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); 11 | } 12 | 13 | module.exports = isLeapYear; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/isSame.js: -------------------------------------------------------------------------------- 1 | var startOf = require('./startOf'); 2 | 3 | /** 4 | * Check if date is "same" with optional period 5 | */ 6 | function isSame(date1, date2, period){ 7 | if (period) { 8 | date1 = startOf(date1, period); 9 | date2 = startOf(date2, period); 10 | } 11 | return Number(date1) === Number(date2); 12 | } 13 | 14 | module.exports = isSame; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/quarter.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * gets date quarter 5 | */ 6 | function quarter(date){ 7 | var month = date.getMonth(); 8 | if (month < 3) return 1; 9 | if (month < 6) return 2; 10 | if (month < 9) return 3; 11 | return 4; 12 | } 13 | 14 | module.exports = quarter; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/timezoneOffset.js: -------------------------------------------------------------------------------- 1 | var pad = require('../number/pad'); 2 | 3 | /** 4 | * time zone as hour and minute offset from UTC (e.g. +0900) 5 | */ 6 | function timezoneOffset(date){ 7 | var offset = date.getTimezoneOffset(); 8 | var abs = Math.abs(offset); 9 | var h = pad(Math.floor(abs / 60), 2); 10 | var m = pad(abs % 60, 2); 11 | return (offset > 0? '-' : '+') + h + m; 12 | } 13 | 14 | module.exports = timezoneOffset; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/totalDaysInYear.js: -------------------------------------------------------------------------------- 1 | var isLeapYear = require('./isLeapYear'); 2 | 3 | /** 4 | * return the amount of days in the year following the gregorian calendar 5 | * and leap years 6 | */ 7 | function totalDaysInYear(fullYear){ 8 | return isLeapYear(fullYear)? 366 : 365; 9 | } 10 | 11 | module.exports = totalDaysInYear; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/date/weekOfTheYear.js: -------------------------------------------------------------------------------- 1 | var dayOfTheYear = require('./dayOfTheYear'); 2 | 3 | /** 4 | * Return the week of the year based on given firstDayOfWeek 5 | */ 6 | function weekOfTheYear(date, firstDayOfWeek){ 7 | firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; 8 | var doy = dayOfTheYear(date); 9 | var dow = (7 + date.getDay() - firstDayOfWeek) % 7; 10 | var relativeWeekDay = 6 - firstDayOfWeek - dow; 11 | return Math.floor((doy + relativeWeekDay) / 7); 12 | } 13 | 14 | module.exports = weekOfTheYear; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/after.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Calls closure only after callback is called x times 5 | */ 6 | function after(closure, times){ 7 | return function () { 8 | if (--times <= 0) closure(); 9 | }; 10 | } 11 | 12 | module.exports = after; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/constant.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns a new function that will return the value 5 | */ 6 | function constant(value){ 7 | return function() { 8 | return value; 9 | }; 10 | } 11 | 12 | module.exports = constant; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/func.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns a function that call a method on the passed object 5 | */ 6 | function func(name){ 7 | return function(obj){ 8 | return obj[name](); 9 | }; 10 | } 11 | 12 | module.exports = func; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/identity.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns the first argument provided to it. 5 | */ 6 | function identity(val){ 7 | return val; 8 | } 9 | 10 | module.exports = identity; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/prop.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns a function that gets a property of the passed object 5 | */ 6 | function prop(name){ 7 | return function(obj){ 8 | return obj[name]; 9 | }; 10 | } 11 | 12 | module.exports = prop; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/series.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns a function that will execute a list of functions in sequence 5 | * passing the same arguments to each one. (useful for batch processing 6 | * items during a forEach loop) 7 | */ 8 | function series(){ 9 | var fns = arguments; 10 | return function(){ 11 | var i = 0, 12 | n = fns.length; 13 | while (i < n) { 14 | fns[i].apply(this, arguments); 15 | i += 1; 16 | } 17 | }; 18 | } 19 | 20 | module.exports = series; 21 | 22 | 23 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/timeout.js: -------------------------------------------------------------------------------- 1 | var slice = require('../array/slice'); 2 | 3 | /** 4 | * Delays the call of a function within a given context. 5 | */ 6 | function timeout(fn, millis, context){ 7 | 8 | var args = slice(arguments, 3); 9 | 10 | return setTimeout(function() { 11 | fn.apply(context, args); 12 | }, millis); 13 | } 14 | 15 | module.exports = timeout; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/times.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Iterates over a callback a set amount of times 5 | */ 6 | function times(n, callback, thisObj){ 7 | var i = -1; 8 | while (++i < n) { 9 | if ( callback.call(thisObj, i) === false ) { 10 | break; 11 | } 12 | } 13 | } 14 | 15 | module.exports = times; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/function/wrap.js: -------------------------------------------------------------------------------- 1 | var partial = require('./partial'); 2 | 3 | /** 4 | * Returns the first function passed as an argument to the second, 5 | * allowing you to adjust arguments, run code before and after, and 6 | * conditionally execute the original function. 7 | */ 8 | function wrap(fn, wrapper){ 9 | return partial(wrapper, fn); 10 | } 11 | 12 | module.exports = wrap; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/GLOBAL.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Reference to the global context (works on ES3 and ES5-strict mode) 4 | //jshint -W061, -W064 5 | module.exports = Function('return this')(); 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/ctorApply.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | function F(){} 4 | 5 | /** 6 | * Do fn.apply on a constructor. 7 | */ 8 | function ctorApply(ctor, args) { 9 | F.prototype = ctor.prototype; 10 | var instance = new F(); 11 | ctor.apply(instance, args); 12 | return instance; 13 | } 14 | 15 | module.exports = ctorApply; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/defaults.js: -------------------------------------------------------------------------------- 1 | var toArray = require('./toArray'); 2 | var find = require('../array/find'); 3 | 4 | /** 5 | * Return first non void argument 6 | */ 7 | function defaults(var_args){ 8 | return find(toArray(arguments), nonVoid); 9 | } 10 | 11 | function nonVoid(val){ 12 | return val != null; 13 | } 14 | 15 | module.exports = defaults; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isArguments.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | 3 | /** 4 | */ 5 | var isArgs = isKind(arguments, 'Arguments')? 6 | function(val){ 7 | return isKind(val, 'Arguments'); 8 | } : 9 | function(val){ 10 | // Arguments is an Object on IE7 11 | return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); 12 | }; 13 | 14 | module.exports = isArgs; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isArray.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | var isArray = Array.isArray || function (val) { 5 | return isKind(val, 'Array'); 6 | }; 7 | module.exports = isArray; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isBoolean.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isBoolean(val) { 5 | return isKind(val, 'Boolean'); 6 | } 7 | module.exports = isBoolean; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isDate.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isDate(val) { 5 | return isKind(val, 'Date'); 6 | } 7 | module.exports = isDate; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isFinite.js: -------------------------------------------------------------------------------- 1 | var isNumber = require('./isNumber'); 2 | var GLOBAL = require('./GLOBAL'); 3 | 4 | /** 5 | * Check if value is finite 6 | */ 7 | function isFinite(val){ 8 | var is = false; 9 | if (typeof val === 'string' && val !== '') { 10 | is = GLOBAL.isFinite( parseFloat(val) ); 11 | } else if (isNumber(val)){ 12 | // need to use isNumber because of Number constructor 13 | is = GLOBAL.isFinite( val ); 14 | } 15 | return is; 16 | } 17 | 18 | module.exports = isFinite; 19 | 20 | 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isFunction.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isFunction(val) { 5 | return isKind(val, 'Function'); 6 | } 7 | module.exports = isFunction; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isInteger.js: -------------------------------------------------------------------------------- 1 | var isNumber = require('./isNumber'); 2 | 3 | /** 4 | * Check if value is an integer 5 | */ 6 | function isInteger(val){ 7 | return isNumber(val) && (val % 1 === 0); 8 | } 9 | 10 | module.exports = isInteger; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isKind.js: -------------------------------------------------------------------------------- 1 | var kindOf = require('./kindOf'); 2 | /** 3 | * Check if value is from a specific "kind". 4 | */ 5 | function isKind(val, kind){ 6 | return kindOf(val) === kind; 7 | } 8 | module.exports = isKind; 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isNaN.js: -------------------------------------------------------------------------------- 1 | var isNumber = require('./isNumber'); 2 | var $isNaN = require('../number/isNaN'); 3 | 4 | /** 5 | * Check if value is NaN for realz 6 | */ 7 | function isNaN(val){ 8 | // based on the fact that NaN !== NaN 9 | // need to check if it's a number to avoid conflicts with host objects 10 | // also need to coerce ToNumber to avoid edge case `new Number(NaN)` 11 | return !isNumber(val) || $isNaN(Number(val)); 12 | } 13 | 14 | module.exports = isNaN; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isNull.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | */ 4 | function isNull(val){ 5 | return val === null; 6 | } 7 | module.exports = isNull; 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isNumber.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isNumber(val) { 5 | return isKind(val, 'Number'); 6 | } 7 | module.exports = isNumber; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isObject.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isObject(val) { 5 | return isKind(val, 'Object'); 6 | } 7 | module.exports = isObject; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isPlainObject.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Checks if the value is created by the `Object` constructor. 5 | */ 6 | function isPlainObject(value) { 7 | return (!!value && typeof value === 'object' && 8 | value.constructor === Object); 9 | } 10 | 11 | module.exports = isPlainObject; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isPrimitive.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Checks if the object is a primitive 5 | */ 6 | function isPrimitive(value) { 7 | // Using switch fallthrough because it's simple to read and is 8 | // generally fast: http://jsperf.com/testing-value-is-primitive/5 9 | switch (typeof value) { 10 | case "string": 11 | case "number": 12 | case "boolean": 13 | return true; 14 | } 15 | 16 | return value == null; 17 | } 18 | 19 | module.exports = isPrimitive; 20 | 21 | 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isRegExp.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isRegExp(val) { 5 | return isKind(val, 'RegExp'); 6 | } 7 | module.exports = isRegExp; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isString.js: -------------------------------------------------------------------------------- 1 | var isKind = require('./isKind'); 2 | /** 3 | */ 4 | function isString(val) { 5 | return isKind(val, 'String'); 6 | } 7 | module.exports = isString; 8 | 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isUndefined.js: -------------------------------------------------------------------------------- 1 | 2 | var UNDEF; 3 | 4 | /** 5 | */ 6 | function isUndef(val){ 7 | return val === UNDEF; 8 | } 9 | module.exports = isUndef; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/isnt.js: -------------------------------------------------------------------------------- 1 | var is = require('./is'); 2 | 3 | /** 4 | * Check if both values are not identical/egal 5 | */ 6 | function isnt(x, y){ 7 | return !is(x, y); 8 | } 9 | 10 | module.exports = isnt; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/kindOf.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var _rKind = /^\[object (.*)\]$/, 4 | _toString = Object.prototype.toString, 5 | UNDEF; 6 | 7 | /** 8 | * Gets the "kind" of value. (e.g. "String", "Number", etc) 9 | */ 10 | function kindOf(val) { 11 | if (val === null) { 12 | return 'Null'; 13 | } else if (val === UNDEF) { 14 | return 'Undefined'; 15 | } else { 16 | return _rKind.exec( _toString.call(val) )[1]; 17 | } 18 | } 19 | module.exports = kindOf; 20 | 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/lang/toString.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Typecast a value to a String, using an empty string value for null or 5 | * undefined. 6 | */ 7 | function toString(val){ 8 | return val == null ? '' : val.toString(); 9 | } 10 | 11 | module.exports = toString; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/ceil.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Round value up with a custom radix. 4 | */ 5 | function ceil(val, step){ 6 | step = Math.abs(step || 1); 7 | return Math.ceil(val / step) * step; 8 | } 9 | 10 | module.exports = ceil; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/clamp.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Clamps value inside range. 4 | */ 5 | function clamp(val, min, max){ 6 | return val < min? min : (val > max? max : val); 7 | } 8 | module.exports = clamp; 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/countSteps.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Count number of full steps. 4 | */ 5 | function countSteps(val, step, overflow){ 6 | val = Math.floor(val / step); 7 | 8 | if (overflow) { 9 | return val % overflow; 10 | } 11 | 12 | return val; 13 | } 14 | 15 | module.exports = countSteps; 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/floor.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Floor value to full steps. 4 | */ 5 | function floor(val, step){ 6 | step = Math.abs(step || 1); 7 | return Math.floor(val / step) * step; 8 | } 9 | module.exports = floor; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/inRange.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Checks if value is inside the range. 4 | */ 5 | function inRange(val, min, max, threshold){ 6 | threshold = threshold || 0; 7 | return (val + threshold >= min && val - threshold <= max); 8 | } 9 | 10 | module.exports = inRange; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/isNear.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Check if value is close to target. 4 | */ 5 | function isNear(val, target, threshold){ 6 | return (Math.abs(val - target) <= threshold); 7 | } 8 | module.exports = isNear; 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/lerp.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Linear interpolation. 4 | * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE 5 | */ 6 | function lerp(ratio, start, end){ 7 | return start + (end - start) * ratio; 8 | } 9 | 10 | module.exports = lerp; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/loop.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Loops value inside range. 4 | */ 5 | function loop(val, min, max){ 6 | return val < min? max : (val > max? min : val); 7 | } 8 | 9 | module.exports = loop; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/map.js: -------------------------------------------------------------------------------- 1 | var lerp = require('./lerp'); 2 | var norm = require('./norm'); 3 | /** 4 | * Maps a number from one scale to another. 5 | * @example map(3, 0, 4, -1, 1) -> 0.5 6 | */ 7 | function map(val, min1, max1, min2, max2){ 8 | return lerp( norm(val, min1, max1), min2, max2 ); 9 | } 10 | module.exports = map; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/norm.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Gets normalized ratio of value inside range. 4 | */ 5 | function norm(val, min, max){ 6 | if (val < min || val > max) { 7 | throw new RangeError('value (' + val + ') must be between ' + min + ' and ' + max); 8 | } 9 | 10 | return val === max ? 1 : (val - min) / (max - min); 11 | } 12 | module.exports = norm; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/overflow.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Wraps number within bounds both positive and negative 5 | */ 6 | function overflow(number, min, max){ 7 | if ( max === undefined ) { 8 | max = min; 9 | min = 0; 10 | } 11 | 12 | var difference = max - min; 13 | 14 | if ( number < min ) { 15 | number += difference * ( ~~( ( min - number ) / difference ) + 1 ); 16 | } 17 | 18 | return min + ( number - min ) % difference; 19 | } 20 | 21 | module.exports = overflow; 22 | 23 | 24 | -------------------------------------------------------------------------------- /web/node_modules/mout/math/round.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Round number to a specific radix 4 | */ 5 | function round(value, radix){ 6 | radix = radix || 1; // default round 1 7 | return Math.round(value / radix) * radix; 8 | } 9 | 10 | module.exports = round; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/MAX_INT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constant Maximum 32-bit signed integer value. (2^31 - 1) 3 | */ 4 | 5 | module.exports = 2147483647; 6 | 7 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/MAX_SAFE_INTEGER.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | // maximum safe integer (Math.pow(2, 53) - 1) 4 | // see: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer 5 | module.exports = 9007199254740991; 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/MAX_UINT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constant Maximum 32-bit unsigned integet value (2^32 - 1) 3 | */ 4 | 5 | module.exports = 4294967295; 6 | 7 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/MIN_INT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constant Minimum 32-bit signed integer value (-2^31). 3 | */ 4 | 5 | module.exports = -2147483648; 6 | 7 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/enforcePrecision.js: -------------------------------------------------------------------------------- 1 | var toNumber = require('../lang/toNumber'); 2 | /** 3 | * Enforce a specific amount of decimal digits and also fix floating 4 | * point rounding issues. 5 | */ 6 | function enforcePrecision(val, nDecimalDigits){ 7 | val = toNumber(val); 8 | var pow = Math.pow(10, nDecimalDigits); 9 | return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); 10 | } 11 | module.exports = enforcePrecision; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/isNaN.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * ES6 Number.isNaN 5 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN 6 | */ 7 | function isNaN(val){ 8 | // jshint eqeqeq:false 9 | return typeof val === 'number' && val != val; 10 | } 11 | 12 | module.exports = isNaN; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/nth.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Returns "nth" of number (1 = "st", 2 = "nd", 3 = "rd", 4..10 = "th", ...) 5 | */ 6 | function nth(i) { 7 | var t = (i % 100); 8 | if (t >= 10 && t <= 20) { 9 | return 'th'; 10 | } 11 | switch(i % 10) { 12 | case 1: 13 | return 'st'; 14 | case 2: 15 | return 'nd'; 16 | case 3: 17 | return 'rd'; 18 | default: 19 | return 'th'; 20 | } 21 | } 22 | 23 | module.exports = nth; 24 | 25 | 26 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/ordinal.js: -------------------------------------------------------------------------------- 1 | var toInt = require('./toInt'); 2 | var nth = require('./nth'); 3 | 4 | /** 5 | * converts number into ordinal form (1st, 2nd, 3rd, 4th, ...) 6 | */ 7 | function ordinal(n){ 8 | n = toInt(n); 9 | return n + nth(n); 10 | } 11 | 12 | module.exports = ordinal; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/pad.js: -------------------------------------------------------------------------------- 1 | var lpad = require('../string/lpad'); 2 | var toNumber = require('../lang/toNumber'); 3 | 4 | /** 5 | * Add padding zeros if n.length < minLength. 6 | */ 7 | function pad(n, minLength, char){ 8 | n = toNumber(n); 9 | return lpad(''+ n, minLength, char || '0'); 10 | } 11 | 12 | module.exports = pad; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/rol.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Bitwise circular shift left 4 | * http://en.wikipedia.org/wiki/Circular_shift 5 | */ 6 | function rol(val, shift){ 7 | return (val << shift) | (val >> (32 - shift)); 8 | } 9 | module.exports = rol; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/ror.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Bitwise circular shift right 4 | * http://en.wikipedia.org/wiki/Circular_shift 5 | */ 6 | function ror(val, shift){ 7 | return (val >> shift) | (val << (32 - shift)); 8 | } 9 | module.exports = ror; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/sign.js: -------------------------------------------------------------------------------- 1 | var toNumber = require('../lang/toNumber'); 2 | 3 | /** 4 | * Get sign of the value. 5 | */ 6 | function sign(val) { 7 | var num = toNumber(val); 8 | if (num === 0) return num; // +0 and +0 === 0 9 | if (isNaN(num)) return num; // NaN 10 | return num < 0? -1 : 1; 11 | } 12 | 13 | module.exports = sign; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/toInt.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * "Convert" value into an 32-bit integer. 5 | * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. 6 | * IMPORTANT: val will wrap at 2^31 and -2^31. 7 | * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 8 | */ 9 | function toInt(val){ 10 | // we do not use lang/toNumber because of perf and also because it 11 | // doesn't break the functionality 12 | return ~~val; 13 | } 14 | 15 | module.exports = toInt; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/toUInt.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * "Convert" value into a 32-bit unsigned integer. 5 | * IMPORTANT: Value will wrap at 2^32. 6 | */ 7 | function toUInt(val){ 8 | // we do not use lang/toNumber because of perf and also because it 9 | // doesn't break the functionality 10 | return val >>> 0; 11 | } 12 | 13 | module.exports = toUInt; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/number/toUInt31.js: -------------------------------------------------------------------------------- 1 | var MAX_INT = require('./MAX_INT'); 2 | 3 | /** 4 | * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). 5 | * IMPORTANT: value wil wrap at 2^31, if negative will return 0. 6 | */ 7 | function toUInt31(val){ 8 | // we do not use lang/toNumber because of perf and also because it 9 | // doesn't break the functionality 10 | return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); 11 | } 12 | 13 | module.exports = toUInt31; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/contains.js: -------------------------------------------------------------------------------- 1 | var some = require('./some'); 2 | 3 | /** 4 | * Check if object contains value 5 | */ 6 | function contains(obj, needle) { 7 | return some(obj, function(val) { 8 | return (val === needle); 9 | }); 10 | } 11 | module.exports = contains; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/functions.js: -------------------------------------------------------------------------------- 1 | var forIn = require('./forIn'); 2 | 3 | /** 4 | * return a list of all enumerable properties that have function values 5 | */ 6 | function functions(obj){ 7 | var keys = []; 8 | forIn(obj, function(val, key){ 9 | if (typeof val === 'function'){ 10 | keys.push(key); 11 | } 12 | }); 13 | return keys.sort(); 14 | } 15 | 16 | module.exports = functions; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/get.js: -------------------------------------------------------------------------------- 1 | var isPrimitive = require('../lang/isPrimitive'); 2 | 3 | /** 4 | * get "nested" object property 5 | */ 6 | function get(obj, prop){ 7 | var parts = prop.split('.'), 8 | last = parts.pop(); 9 | 10 | while (prop = parts.shift()) { 11 | obj = obj[prop]; 12 | if (obj == null) return; 13 | } 14 | 15 | return obj[last]; 16 | } 17 | 18 | module.exports = get; 19 | 20 | 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/has.js: -------------------------------------------------------------------------------- 1 | var get = require('./get'); 2 | 3 | var UNDEF; 4 | 5 | /** 6 | * Check if object has nested property. 7 | */ 8 | function has(obj, prop){ 9 | return get(obj, prop) !== UNDEF; 10 | } 11 | 12 | module.exports = has; 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/hasOwn.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Safer Object.hasOwnProperty 5 | */ 6 | function hasOwn(obj, prop){ 7 | return Object.prototype.hasOwnProperty.call(obj, prop); 8 | } 9 | 10 | module.exports = hasOwn; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/keys.js: -------------------------------------------------------------------------------- 1 | var forOwn = require('./forOwn'); 2 | 3 | /** 4 | * Get object keys 5 | */ 6 | var keys = Object.keys || function (obj) { 7 | var keys = []; 8 | forOwn(obj, function(val, key){ 9 | keys.push(key); 10 | }); 11 | return keys; 12 | }; 13 | 14 | module.exports = keys; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/map.js: -------------------------------------------------------------------------------- 1 | var forOwn = require('./forOwn'); 2 | var makeIterator = require('../function/makeIterator_'); 3 | 4 | /** 5 | * Creates a new object where all the values are the result of calling 6 | * `callback`. 7 | */ 8 | function mapValues(obj, callback, thisObj) { 9 | callback = makeIterator(callback, thisObj); 10 | var output = {}; 11 | forOwn(obj, function(val, key, obj) { 12 | output[key] = callback(val, key, obj); 13 | }); 14 | 15 | return output; 16 | } 17 | module.exports = mapValues; 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/matches.js: -------------------------------------------------------------------------------- 1 | var forOwn = require('./forOwn'); 2 | 3 | /** 4 | * checks if a object contains all given properties/values 5 | */ 6 | function matches(target, props){ 7 | // can't use "object/every" because of circular dependency 8 | var result = true; 9 | forOwn(props, function(val, key){ 10 | if (target[key] !== val) { 11 | // break loop at first difference 12 | return (result = false); 13 | } 14 | }); 15 | return result; 16 | } 17 | 18 | module.exports = matches; 19 | 20 | 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/max.js: -------------------------------------------------------------------------------- 1 | var arrMax = require('../array/max'); 2 | var values = require('./values'); 3 | 4 | /** 5 | * Returns maximum value inside object. 6 | */ 7 | function max(obj, compareFn) { 8 | return arrMax(values(obj), compareFn); 9 | } 10 | 11 | module.exports = max; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/min.js: -------------------------------------------------------------------------------- 1 | var arrMin = require('../array/min'); 2 | var values = require('./values'); 3 | 4 | /** 5 | * Returns minimum value inside object. 6 | */ 7 | function min(obj, iterator) { 8 | return arrMin(values(obj), iterator); 9 | } 10 | 11 | module.exports = min; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/namespace.js: -------------------------------------------------------------------------------- 1 | var forEach = require('../array/forEach'); 2 | 3 | /** 4 | * Create nested object if non-existent 5 | */ 6 | function namespace(obj, path){ 7 | if (!path) return obj; 8 | forEach(path.split('.'), function(key){ 9 | if (!obj[key]) { 10 | obj[key] = {}; 11 | } 12 | obj = obj[key]; 13 | }); 14 | return obj; 15 | } 16 | 17 | module.exports = namespace; 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/pick.js: -------------------------------------------------------------------------------- 1 | var slice = require('../array/slice'); 2 | 3 | /** 4 | * Return a copy of the object, filtered to only have values for the whitelisted keys. 5 | */ 6 | function pick(obj, var_keys){ 7 | var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), 8 | out = {}, 9 | i = 0, key; 10 | while (key = keys[i++]) { 11 | out[key] = obj[key]; 12 | } 13 | return out; 14 | } 15 | 16 | module.exports = pick; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/pluck.js: -------------------------------------------------------------------------------- 1 | var map = require('./map'); 2 | var prop = require('../function/prop'); 3 | 4 | /** 5 | * Extract a list of property values. 6 | */ 7 | function pluck(obj, propName){ 8 | return map(obj, prop(propName)); 9 | } 10 | 11 | module.exports = pluck; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/reject.js: -------------------------------------------------------------------------------- 1 | var filter = require('./filter'); 2 | var makeIterator = require('../function/makeIterator_'); 3 | 4 | /** 5 | * Object reject 6 | */ 7 | function reject(obj, callback, thisObj) { 8 | callback = makeIterator(callback, thisObj); 9 | return filter(obj, function(value, index, obj) { 10 | return !callback(value, index, obj); 11 | }, thisObj); 12 | } 13 | 14 | module.exports = reject; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/result.js: -------------------------------------------------------------------------------- 1 | var isFunction = require('../lang/isFunction'); 2 | 3 | function result(obj, prop) { 4 | var property = obj[prop]; 5 | 6 | if(property === undefined) { 7 | return; 8 | } 9 | 10 | return isFunction(property) ? property.call(obj) : property; 11 | } 12 | 13 | module.exports = result; 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/set.js: -------------------------------------------------------------------------------- 1 | var namespace = require('./namespace'); 2 | 3 | /** 4 | * set "nested" object property 5 | */ 6 | function set(obj, prop, val){ 7 | var parts = (/^(.+)\.(.+)$/).exec(prop); 8 | if (parts){ 9 | namespace(obj, parts[1])[parts[2]] = val; 10 | } else { 11 | obj[prop] = val; 12 | } 13 | } 14 | 15 | module.exports = set; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/size.js: -------------------------------------------------------------------------------- 1 | var forOwn = require('./forOwn'); 2 | 3 | /** 4 | * Get object size 5 | */ 6 | function size(obj) { 7 | var count = 0; 8 | forOwn(obj, function(){ 9 | count++; 10 | }); 11 | return count; 12 | } 13 | 14 | module.exports = size; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/some.js: -------------------------------------------------------------------------------- 1 | var forOwn = require('./forOwn'); 2 | var makeIterator = require('../function/makeIterator_'); 3 | 4 | /** 5 | * Object some 6 | */ 7 | function some(obj, callback, thisObj) { 8 | callback = makeIterator(callback, thisObj); 9 | var result = false; 10 | forOwn(obj, function(val, key) { 11 | if (callback(val, key, obj)) { 12 | result = true; 13 | return false; // break 14 | } 15 | }); 16 | return result; 17 | } 18 | 19 | module.exports = some; 20 | 21 | 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/unset.js: -------------------------------------------------------------------------------- 1 | var has = require('./has'); 2 | 3 | /** 4 | * Unset object property. 5 | */ 6 | function unset(obj, prop){ 7 | if (has(obj, prop)) { 8 | var parts = prop.split('.'), 9 | last = parts.pop(); 10 | while (prop = parts.shift()) { 11 | obj = obj[prop]; 12 | } 13 | return (delete obj[last]); 14 | 15 | } else { 16 | // if property doesn't exist treat as deleted 17 | return true; 18 | } 19 | } 20 | 21 | module.exports = unset; 22 | 23 | 24 | -------------------------------------------------------------------------------- /web/node_modules/mout/object/values.js: -------------------------------------------------------------------------------- 1 | var forOwn = require('./forOwn'); 2 | 3 | /** 4 | * Get object values 5 | */ 6 | function values(obj) { 7 | var vals = []; 8 | forOwn(obj, function(val, key){ 9 | vals.push(val); 10 | }); 11 | return vals; 12 | } 13 | 14 | module.exports = values; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/queryString.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | //automatically generated, do not edit! 4 | //run `node build` instead 5 | module.exports = { 6 | 'contains' : require('./queryString/contains'), 7 | 'decode' : require('./queryString/decode'), 8 | 'encode' : require('./queryString/encode'), 9 | 'getParam' : require('./queryString/getParam'), 10 | 'getQuery' : require('./queryString/getQuery'), 11 | 'parse' : require('./queryString/parse'), 12 | 'setParam' : require('./queryString/setParam') 13 | }; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/queryString/contains.js: -------------------------------------------------------------------------------- 1 | var getQuery = require('./getQuery'); 2 | 3 | /** 4 | * Checks if query string contains parameter. 5 | */ 6 | function contains(url, paramName) { 7 | var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` 8 | return regex.test(getQuery(url)); 9 | } 10 | 11 | module.exports = contains; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/queryString/getParam.js: -------------------------------------------------------------------------------- 1 | var typecast = require('../string/typecast'); 2 | var getQuery = require('./getQuery'); 3 | 4 | /** 5 | * Get query parameter value. 6 | */ 7 | function getParam(url, param, shouldTypecast){ 8 | var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 9 | result = regexp.exec( getQuery(url) ), 10 | val = (result && result[2])? result[2] : null; 11 | return shouldTypecast === false? val : typecast(val); 12 | } 13 | 14 | module.exports = getParam; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/queryString/getQuery.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Gets full query as string with all special chars decoded. 5 | */ 6 | function getQuery(url) { 7 | // url = url.replace(/#.*\?/, '?'); //removes hash (to avoid getting hash query) 8 | var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt 9 | return (queryString)? decodeURIComponent(queryString[0].replace(/\+/g,' ')) : ''; 10 | } 11 | 12 | module.exports = getQuery; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/queryString/parse.js: -------------------------------------------------------------------------------- 1 | var decode = require('./decode'); 2 | var getQuery = require('./getQuery'); 3 | 4 | /** 5 | * Get query string, parses and decodes it. 6 | */ 7 | function parse(url, shouldTypecast) { 8 | return decode(getQuery(url), shouldTypecast); 9 | } 10 | 11 | module.exports = parse; 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/choice.js: -------------------------------------------------------------------------------- 1 | var randInt = require('./randInt'); 2 | var isArray = require('../lang/isArray'); 3 | 4 | /** 5 | * Returns a random element from the supplied arguments 6 | * or from the array (if single argument is an array). 7 | */ 8 | function choice(items) { 9 | var target = (arguments.length === 1 && isArray(items))? items : arguments; 10 | return target[ randInt(0, target.length - 1) ]; 11 | } 12 | 13 | module.exports = choice; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/rand.js: -------------------------------------------------------------------------------- 1 | var random = require('./random'); 2 | var MIN_INT = require('../number/MIN_INT'); 3 | var MAX_INT = require('../number/MAX_INT'); 4 | 5 | /** 6 | * Returns random number inside range 7 | */ 8 | function rand(min, max){ 9 | min = min == null? MIN_INT : min; 10 | max = max == null? MAX_INT : max; 11 | return min + (max - min) * random(); 12 | } 13 | 14 | module.exports = rand; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/randBit.js: -------------------------------------------------------------------------------- 1 | var randBool = require('./randBool'); 2 | 3 | /** 4 | * Returns random bit (0 or 1) 5 | */ 6 | function randomBit() { 7 | return randBool()? 1 : 0; 8 | } 9 | 10 | module.exports = randomBit; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/randBool.js: -------------------------------------------------------------------------------- 1 | var random = require('./random'); 2 | 3 | /** 4 | * returns a random boolean value (true or false) 5 | */ 6 | function randBool(){ 7 | return random() >= 0.5; 8 | } 9 | 10 | module.exports = randBool; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/randHex.js: -------------------------------------------------------------------------------- 1 | var choice = require('./choice'); 2 | 3 | var _chars = '0123456789abcdef'.split(''); 4 | 5 | /** 6 | * Returns a random hexadecimal string 7 | */ 8 | function randHex(size){ 9 | size = size && size > 0? size : 6; 10 | var str = ''; 11 | while (size--) { 12 | str += choice(_chars); 13 | } 14 | return str; 15 | } 16 | 17 | module.exports = randHex; 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/randSign.js: -------------------------------------------------------------------------------- 1 | var randBool = require('./randBool'); 2 | 3 | /** 4 | * Returns random sign (-1 or 1) 5 | */ 6 | function randomSign() { 7 | return randBool()? 1 : -1; 8 | } 9 | 10 | module.exports = randomSign; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/random/random.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Just a wrapper to Math.random. No methods inside mout/random should call 5 | * Math.random() directly so we can inject the pseudo-random number 6 | * generator if needed (ie. in case we need a seeded random or a better 7 | * algorithm than the native one) 8 | */ 9 | function random(){ 10 | return random.get(); 11 | } 12 | 13 | // we expose the method so it can be swapped if needed 14 | random.get = Math.random; 15 | 16 | module.exports = random; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/append.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Appends an array to the end of another. 5 | * The first array will be modified. 6 | */ 7 | function append(arr1, arr2) { 8 | if (arr2 == null) { 9 | return arr1; 10 | } 11 | 12 | var pad = arr1.length, 13 | i = -1, 14 | len = arr2.length; 15 | while (++i < len) { 16 | arr1[pad + i] = arr2[i]; 17 | } 18 | return arr1; 19 | } 20 | return append; 21 | }); 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/compact.js: -------------------------------------------------------------------------------- 1 | define(['./filter'], function (filter) { 2 | 3 | /** 4 | * Remove all null/undefined items from array. 5 | */ 6 | function compact(arr) { 7 | return filter(arr, function(val){ 8 | return (val != null); 9 | }); 10 | } 11 | 12 | return compact; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/contains.js: -------------------------------------------------------------------------------- 1 | define(['./indexOf'], function (indexOf) { 2 | 3 | /** 4 | * If array contains values. 5 | */ 6 | function contains(arr, val) { 7 | return indexOf(arr, val) !== -1; 8 | } 9 | return contains; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/find.js: -------------------------------------------------------------------------------- 1 | define(['./findIndex'], function (findIndex) { 2 | 3 | /** 4 | * Returns first item that matches criteria 5 | */ 6 | function find(arr, iterator, thisObj){ 7 | var idx = findIndex(arr, iterator, thisObj); 8 | return idx >= 0? arr[idx] : void(0); 9 | } 10 | 11 | return find; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/findLast.js: -------------------------------------------------------------------------------- 1 | define(['./findLastIndex'], function (findLastIndex) { 2 | 3 | /** 4 | * Returns last item that matches criteria 5 | */ 6 | function findLast(arr, iterator, thisObj){ 7 | var idx = findLastIndex(arr, iterator, thisObj); 8 | return idx >= 0? arr[idx] : void(0); 9 | } 10 | 11 | return findLast; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/insert.js: -------------------------------------------------------------------------------- 1 | define(['./difference', './slice'], function (difference, slice) { 2 | 3 | /** 4 | * Insert item into array if not already present. 5 | */ 6 | function insert(arr, rest_items) { 7 | var diff = difference(slice(arguments, 1), arr); 8 | if (diff.length) { 9 | Array.prototype.push.apply(arr, diff); 10 | } 11 | return arr.length; 12 | } 13 | return insert; 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/join.js: -------------------------------------------------------------------------------- 1 | define(['./filter'], function(filter) { 2 | 3 | function isValidString(val) { 4 | return (val != null && val !== ''); 5 | } 6 | 7 | /** 8 | * Joins strings with the specified separator inserted between each value. 9 | * Null values and empty strings will be excluded. 10 | */ 11 | function join(items, separator) { 12 | separator = separator || ''; 13 | return filter(items, isValidString).join(separator); 14 | } 15 | 16 | return join; 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/last.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Returns last element of array. 5 | */ 6 | function last(arr){ 7 | if (arr == null || arr.length < 1) { 8 | return undefined; 9 | } 10 | 11 | return arr[arr.length - 1]; 12 | } 13 | 14 | return last; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/map.js: -------------------------------------------------------------------------------- 1 | define(['../function/makeIterator_'], function (makeIterator) { 2 | 3 | /** 4 | * Array map 5 | */ 6 | function map(arr, callback, thisObj) { 7 | callback = makeIterator(callback, thisObj); 8 | var results = []; 9 | if (arr == null){ 10 | return results; 11 | } 12 | 13 | var i = -1, len = arr.length; 14 | while (++i < len) { 15 | results[i] = callback(arr[i], i, arr); 16 | } 17 | 18 | return results; 19 | } 20 | 21 | return map; 22 | }); 23 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/pluck.js: -------------------------------------------------------------------------------- 1 | define(['./map'], function (map) { 2 | 3 | /** 4 | * Extract a list of property values. 5 | */ 6 | function pluck(arr, propName){ 7 | return map(arr, propName); 8 | } 9 | 10 | return pluck; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/remove.js: -------------------------------------------------------------------------------- 1 | define(['./indexOf'], function(indexOf){ 2 | 3 | /** 4 | * Remove a single item from the array. 5 | * (it won't remove duplicates, just a single item) 6 | */ 7 | function remove(arr, item){ 8 | var idx = indexOf(arr, item); 9 | if (idx !== -1) arr.splice(idx, 1); 10 | } 11 | 12 | return remove; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/removeAll.js: -------------------------------------------------------------------------------- 1 | define(['./indexOf'], function(indexOf){ 2 | 3 | /** 4 | * Remove all instances of an item from array. 5 | */ 6 | function removeAll(arr, item){ 7 | var idx = indexOf(arr, item); 8 | while (idx !== -1) { 9 | arr.splice(idx, 1); 10 | idx = indexOf(arr, item, idx); 11 | } 12 | } 13 | 14 | return removeAll; 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/reverse.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Returns a copy of the array in reversed order. 5 | */ 6 | function reverse(array) { 7 | var copy = array.slice(); 8 | copy.reverse(); 9 | return copy; 10 | } 11 | 12 | return reverse; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/sortBy.js: -------------------------------------------------------------------------------- 1 | define(['./sort', '../function/makeIterator_'], function (sort, makeIterator) { 2 | 3 | /* 4 | * Sort array by the result of the callback 5 | */ 6 | function sortBy(arr, callback, context){ 7 | callback = makeIterator(callback, context); 8 | 9 | return sort(arr, function(a, b) { 10 | a = callback(a); 11 | b = callback(b); 12 | return (a < b) ? -1 : ((a > b) ? 1 : 0); 13 | }); 14 | } 15 | 16 | return sortBy; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/take.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Iterates over a callback a set amount of times 5 | * returning the results 6 | */ 7 | function take(n, callback, thisObj){ 8 | var i = -1; 9 | var arr = []; 10 | if( !thisObj ){ 11 | while(++i < n){ 12 | arr[i] = callback(i, n); 13 | } 14 | } else { 15 | while(++i < n){ 16 | arr[i] = callback.call(thisObj, i, n); 17 | } 18 | } 19 | return arr; 20 | } 21 | 22 | return take; 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/array/union.js: -------------------------------------------------------------------------------- 1 | define(['./unique', './append'], function (unique, append) { 2 | 3 | /** 4 | * Concat multiple arrays and remove duplicates 5 | */ 6 | function union(arrs) { 7 | var results = []; 8 | var i = -1, len = arguments.length; 9 | while (++i < len) { 10 | append(results, arguments[i]); 11 | } 12 | 13 | return unique(results); 14 | } 15 | 16 | return union; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/contains.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { 2 | 3 | /** 4 | */ 5 | return make(arrContains, objContains); 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/every.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { 2 | 3 | /** 4 | */ 5 | return make(arrEvery, objEvery); 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/find.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { 2 | 3 | /** 4 | * Find value that returns true on iterator check. 5 | */ 6 | return make(arrFind, objFind); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/forEach.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { 2 | 3 | /** 4 | */ 5 | return make(arrForEach, objForEach); 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/max.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { 2 | 3 | /** 4 | * Get maximum value inside collection 5 | */ 6 | return make(arrMax, objMax); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/min.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { 2 | 3 | /** 4 | * Get minimum value inside collection. 5 | */ 6 | return make(arrMin, objMin); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/pluck.js: -------------------------------------------------------------------------------- 1 | define(['./map'], function (map) { 2 | 3 | /** 4 | * Extract a list of property values. 5 | */ 6 | function pluck(list, key) { 7 | return map(list, function(value) { 8 | return value[key]; 9 | }); 10 | } 11 | 12 | return pluck; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/reduce.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { 2 | 3 | /** 4 | */ 5 | return make(arrReduce, objReduce); 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/reject.js: -------------------------------------------------------------------------------- 1 | define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { 2 | 3 | /** 4 | * Inverse or collection/filter 5 | */ 6 | function reject(list, iterator, thisObj) { 7 | iterator = makeIterator(iterator, thisObj); 8 | return filter(list, function(value, index, list) { 9 | return !iterator(value, index, list); 10 | }, thisObj); 11 | } 12 | 13 | return reject; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/size.js: -------------------------------------------------------------------------------- 1 | define(['../lang/isArray', '../object/size'], function (isArray, objSize) { 2 | 3 | /** 4 | * Get collection size 5 | */ 6 | function size(list) { 7 | if (!list) { 8 | return 0; 9 | } 10 | if (isArray(list)) { 11 | return list.length; 12 | } 13 | return objSize(list); 14 | } 15 | 16 | return size; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/collection/some.js: -------------------------------------------------------------------------------- 1 | define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { 2 | 3 | /** 4 | */ 5 | return make(arrSome, objSome); 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/dayOfTheYear.js: -------------------------------------------------------------------------------- 1 | define(['../lang/isDate'], function (isDate) { 2 | 3 | /** 4 | * return the day of the year (1..366) 5 | */ 6 | function dayOfTheYear(date){ 7 | return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - 8 | Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; 9 | } 10 | 11 | return dayOfTheYear; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/i18n_.js: -------------------------------------------------------------------------------- 1 | define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ 2 | 3 | // we also use mixIn to make sure we don't affect the original locale 4 | var activeLocale = mixIn({}, enUS, { 5 | // we expose a "set" method to allow overriding the global locale 6 | set : function(localeData){ 7 | mixIn(activeLocale, localeData); 8 | } 9 | }); 10 | 11 | return activeLocale; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/isLeapYear.js: -------------------------------------------------------------------------------- 1 | define(['../lang/isDate'], function (isDate) { 2 | 3 | /** 4 | * checks if it's a leap year 5 | */ 6 | function isLeapYear(fullYear){ 7 | if (isDate(fullYear)) { 8 | fullYear = fullYear.getFullYear(); 9 | } 10 | return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); 11 | } 12 | 13 | return isLeapYear; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/isSame.js: -------------------------------------------------------------------------------- 1 | define(['./startOf'], function (startOf) { 2 | 3 | /** 4 | * Check if date is "same" with optional period 5 | */ 6 | function isSame(date1, date2, period){ 7 | if (period) { 8 | date1 = startOf(date1, period); 9 | date2 = startOf(date2, period); 10 | } 11 | return Number(date1) === Number(date2); 12 | } 13 | 14 | return isSame; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/quarter.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * gets date quarter 5 | */ 6 | function quarter(date){ 7 | var month = date.getMonth(); 8 | if (month < 3) return 1; 9 | if (month < 6) return 2; 10 | if (month < 9) return 3; 11 | return 4; 12 | } 13 | 14 | return quarter; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/timezoneOffset.js: -------------------------------------------------------------------------------- 1 | define(['../number/pad'], function (pad) { 2 | 3 | /** 4 | * time zone as hour and minute offset from UTC (e.g. +0900) 5 | */ 6 | function timezoneOffset(date){ 7 | var offset = date.getTimezoneOffset(); 8 | var abs = Math.abs(offset); 9 | var h = pad(Math.floor(abs / 60), 2); 10 | var m = pad(abs % 60, 2); 11 | return (offset > 0? '-' : '+') + h + m; 12 | } 13 | 14 | return timezoneOffset; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/totalDaysInYear.js: -------------------------------------------------------------------------------- 1 | define(['./isLeapYear'], function (isLeapYear) { 2 | 3 | /** 4 | * return the amount of days in the year following the gregorian calendar 5 | * and leap years 6 | */ 7 | function totalDaysInYear(fullYear){ 8 | return isLeapYear(fullYear)? 366 : 365; 9 | } 10 | 11 | return totalDaysInYear; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/date/weekOfTheYear.js: -------------------------------------------------------------------------------- 1 | define(['./dayOfTheYear'], function (dayOfTheYear) { 2 | 3 | /** 4 | * Return the week of the year based on given firstDayOfWeek 5 | */ 6 | function weekOfTheYear(date, firstDayOfWeek){ 7 | firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; 8 | var doy = dayOfTheYear(date); 9 | var dow = (7 + date.getDay() - firstDayOfWeek) % 7; 10 | var relativeWeekDay = 6 - firstDayOfWeek - dow; 11 | return Math.floor((doy + relativeWeekDay) / 7); 12 | } 13 | 14 | return weekOfTheYear; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/after.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Calls closure only after callback is called x times 5 | */ 6 | function after(closure, times){ 7 | return function () { 8 | if (--times <= 0) closure(); 9 | }; 10 | } 11 | 12 | return after; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/constant.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Returns a new function that will return the value 5 | */ 6 | function constant(value){ 7 | return function() { 8 | return value; 9 | }; 10 | } 11 | 12 | return constant; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/func.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Returns a function that call a method on the passed object 5 | */ 6 | function func(name){ 7 | return function(obj){ 8 | return obj[name](); 9 | }; 10 | } 11 | 12 | return func; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/identity.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Returns the first argument provided to it. 5 | */ 6 | function identity(val){ 7 | return val; 8 | } 9 | 10 | return identity; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/prop.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Returns a function that gets a property of the passed object 5 | */ 6 | function prop(name){ 7 | return function(obj){ 8 | return obj[name]; 9 | }; 10 | } 11 | 12 | return prop; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/timeout.js: -------------------------------------------------------------------------------- 1 | define(['../array/slice'], function (slice) { 2 | 3 | /** 4 | * Delays the call of a function within a given context. 5 | */ 6 | function timeout(fn, millis, context){ 7 | 8 | var args = slice(arguments, 3); 9 | 10 | return setTimeout(function() { 11 | fn.apply(context, args); 12 | }, millis); 13 | } 14 | 15 | return timeout; 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/times.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Iterates over a callback a set amount of times 5 | */ 6 | function times(n, callback, thisObj){ 7 | var i = -1; 8 | while (++i < n) { 9 | if ( callback.call(thisObj, i) === false ) { 10 | break; 11 | } 12 | } 13 | } 14 | 15 | return times; 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/function/wrap.js: -------------------------------------------------------------------------------- 1 | define(['./partial'], function (partial) { 2 | 3 | /** 4 | * Returns the first function passed as an argument to the second, 5 | * allowing you to adjust arguments, run code before and after, and 6 | * conditionally execute the original function. 7 | */ 8 | function wrap(fn, wrapper){ 9 | return partial(wrapper, fn); 10 | } 11 | 12 | return wrap; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/GLOBAL.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | // Reference to the global context (works on ES3 and ES5-strict mode) 4 | //jshint -W061, -W064 5 | return Function('return this')(); 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/ctorApply.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | function F(){} 4 | 5 | /** 6 | * Do fn.apply on a constructor. 7 | */ 8 | function ctorApply(ctor, args) { 9 | F.prototype = ctor.prototype; 10 | var instance = new F(); 11 | ctor.apply(instance, args); 12 | return instance; 13 | } 14 | 15 | return ctorApply; 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/defaults.js: -------------------------------------------------------------------------------- 1 | define(['./toArray', '../array/find'], function (toArray, find) { 2 | 3 | /** 4 | * Return first non void argument 5 | */ 6 | function defaults(var_args){ 7 | return find(toArray(arguments), nonVoid); 8 | } 9 | 10 | function nonVoid(val){ 11 | return val != null; 12 | } 13 | 14 | return defaults; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isArguments.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | 3 | /** 4 | */ 5 | var isArgs = isKind(arguments, 'Arguments')? 6 | function(val){ 7 | return isKind(val, 'Arguments'); 8 | } : 9 | function(val){ 10 | // Arguments is an Object on IE7 11 | return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); 12 | }; 13 | 14 | return isArgs; 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isArray.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | var isArray = Array.isArray || function (val) { 5 | return isKind(val, 'Array'); 6 | }; 7 | return isArray; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isBoolean.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isBoolean(val) { 5 | return isKind(val, 'Boolean'); 6 | } 7 | return isBoolean; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isDate.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isDate(val) { 5 | return isKind(val, 'Date'); 6 | } 7 | return isDate; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isFinite.js: -------------------------------------------------------------------------------- 1 | define(['./isNumber', './GLOBAL'], function (isNumber, GLOBAL) { 2 | 3 | /** 4 | * Check if value is finite 5 | */ 6 | function isFinite(val){ 7 | var is = false; 8 | if (typeof val === 'string' && val !== '') { 9 | is = GLOBAL.isFinite( parseFloat(val) ); 10 | } else if (isNumber(val)){ 11 | // need to use isNumber because of Number constructor 12 | is = GLOBAL.isFinite( val ); 13 | } 14 | return is; 15 | } 16 | 17 | return isFinite; 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isFunction.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isFunction(val) { 5 | return isKind(val, 'Function'); 6 | } 7 | return isFunction; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isInteger.js: -------------------------------------------------------------------------------- 1 | define(['./isNumber'], function (isNumber) { 2 | 3 | /** 4 | * Check if value is an integer 5 | */ 6 | function isInteger(val){ 7 | return isNumber(val) && (val % 1 === 0); 8 | } 9 | 10 | return isInteger; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isKind.js: -------------------------------------------------------------------------------- 1 | define(['./kindOf'], function (kindOf) { 2 | /** 3 | * Check if value is from a specific "kind". 4 | */ 5 | function isKind(val, kind){ 6 | return kindOf(val) === kind; 7 | } 8 | return isKind; 9 | }); 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isNaN.js: -------------------------------------------------------------------------------- 1 | define(['./isNumber', '../number/isNaN'], function (isNumber, $isNaN) { 2 | 3 | /** 4 | * Check if value is NaN for realz 5 | */ 6 | function isNaN(val){ 7 | // based on the fact that NaN !== NaN 8 | // need to check if it's a number to avoid conflicts with host objects 9 | // also need to coerce ToNumber to avoid edge case `new Number(NaN)` 10 | return !isNumber(val) || $isNaN(Number(val)); 11 | } 12 | 13 | return isNaN; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isNull.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | /** 3 | */ 4 | function isNull(val){ 5 | return val === null; 6 | } 7 | return isNull; 8 | }); 9 | 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isNumber.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isNumber(val) { 5 | return isKind(val, 'Number'); 6 | } 7 | return isNumber; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isObject.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isObject(val) { 5 | return isKind(val, 'Object'); 6 | } 7 | return isObject; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isPlainObject.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Checks if the value is created by the `Object` constructor. 5 | */ 6 | function isPlainObject(value) { 7 | return (!!value && typeof value === 'object' && 8 | value.constructor === Object); 9 | } 10 | 11 | return isPlainObject; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isPrimitive.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | 3 | /** 4 | * Checks if the object is a primitive 5 | */ 6 | function isPrimitive(value) { 7 | // Using switch fallthrough because it's simple to read and is 8 | // generally fast: http://jsperf.com/testing-value-is-primitive/5 9 | switch (typeof value) { 10 | case "string": 11 | case "number": 12 | case "boolean": 13 | return true; 14 | } 15 | 16 | return value == null; 17 | } 18 | 19 | return isPrimitive; 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isRegExp.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isRegExp(val) { 5 | return isKind(val, 'RegExp'); 6 | } 7 | return isRegExp; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isString.js: -------------------------------------------------------------------------------- 1 | define(['./isKind'], function (isKind) { 2 | /** 3 | */ 4 | function isString(val) { 5 | return isKind(val, 'String'); 6 | } 7 | return isString; 8 | }); 9 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isUndefined.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | var UNDEF; 3 | 4 | /** 5 | */ 6 | function isUndef(val){ 7 | return val === UNDEF; 8 | } 9 | return isUndef; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/isnt.js: -------------------------------------------------------------------------------- 1 | define(['./is'], function (is) { 2 | 3 | /** 4 | * Check if both values are not identical/egal 5 | */ 6 | function isnt(x, y){ 7 | return !is(x, y); 8 | } 9 | 10 | return isnt; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/kindOf.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | var _rKind = /^\[object (.*)\]$/, 4 | _toString = Object.prototype.toString, 5 | UNDEF; 6 | 7 | /** 8 | * Gets the "kind" of value. (e.g. "String", "Number", etc) 9 | */ 10 | function kindOf(val) { 11 | if (val === null) { 12 | return 'Null'; 13 | } else if (val === UNDEF) { 14 | return 'Undefined'; 15 | } else { 16 | return _rKind.exec( _toString.call(val) )[1]; 17 | } 18 | } 19 | return kindOf; 20 | }); 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/lang/toString.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Typecast a value to a String, using an empty string value for null or 5 | * undefined. 6 | */ 7 | function toString(val){ 8 | return val == null ? '' : val.toString(); 9 | } 10 | 11 | return toString; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/ceil.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Round value up with a custom radix. 4 | */ 5 | function ceil(val, step){ 6 | step = Math.abs(step || 1); 7 | return Math.ceil(val / step) * step; 8 | } 9 | 10 | return ceil; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/clamp.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Clamps value inside range. 4 | */ 5 | function clamp(val, min, max){ 6 | return val < min? min : (val > max? max : val); 7 | } 8 | return clamp; 9 | }); 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/countSteps.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Count number of full steps. 4 | */ 5 | function countSteps(val, step, overflow){ 6 | val = Math.floor(val / step); 7 | 8 | if (overflow) { 9 | return val % overflow; 10 | } 11 | 12 | return val; 13 | } 14 | 15 | return countSteps; 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/floor.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Floor value to full steps. 4 | */ 5 | function floor(val, step){ 6 | step = Math.abs(step || 1); 7 | return Math.floor(val / step) * step; 8 | } 9 | return floor; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/inRange.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Checks if value is inside the range. 4 | */ 5 | function inRange(val, min, max, threshold){ 6 | threshold = threshold || 0; 7 | return (val + threshold >= min && val - threshold <= max); 8 | } 9 | 10 | return inRange; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/isNear.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Check if value is close to target. 4 | */ 5 | function isNear(val, target, threshold){ 6 | return (Math.abs(val - target) <= threshold); 7 | } 8 | return isNear; 9 | }); 10 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/lerp.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Linear interpolation. 4 | * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE 5 | */ 6 | function lerp(ratio, start, end){ 7 | return start + (end - start) * ratio; 8 | } 9 | 10 | return lerp; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/loop.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Loops value inside range. 4 | */ 5 | function loop(val, min, max){ 6 | return val < min? max : (val > max? min : val); 7 | } 8 | 9 | return loop; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/map.js: -------------------------------------------------------------------------------- 1 | define(['./lerp', './norm'], function(lerp, norm){ 2 | /** 3 | * Maps a number from one scale to another. 4 | * @example map(3, 0, 4, -1, 1) -> 0.5 5 | */ 6 | function map(val, min1, max1, min2, max2){ 7 | return lerp( norm(val, min1, max1), min2, max2 ); 8 | } 9 | return map; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/norm.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Gets normalized ratio of value inside range. 4 | */ 5 | function norm(val, min, max){ 6 | if (val < min || val > max) { 7 | throw new RangeError('value (' + val + ') must be between ' + min + ' and ' + max); 8 | } 9 | 10 | return val === max ? 1 : (val - min) / (max - min); 11 | } 12 | return norm; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/overflow.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Wraps number within bounds both positive and negative 5 | */ 6 | function overflow(number, min, max){ 7 | if ( max === undefined ) { 8 | max = min; 9 | min = 0; 10 | } 11 | 12 | var difference = max - min; 13 | 14 | if ( number < min ) { 15 | number += difference * ( ~~( ( min - number ) / difference ) + 1 ); 16 | } 17 | 18 | return min + ( number - min ) % difference; 19 | } 20 | 21 | return overflow; 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/math/round.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | /** 3 | * Round number to a specific radix 4 | */ 5 | function round(value, radix){ 6 | radix = radix || 1; // default round 1 7 | return Math.round(value / radix) * radix; 8 | } 9 | 10 | return round; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/MAX_INT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constant Maximum 32-bit signed integer value. (2^31 - 1) 3 | */ 4 | define(function(){ 5 | return 2147483647; 6 | }); 7 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/MAX_SAFE_INTEGER.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | // maximum safe integer (Math.pow(2, 53) - 1) 4 | // see: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer 5 | return 9007199254740991; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/MAX_UINT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constant Maximum 32-bit unsigned integet value (2^32 - 1) 3 | */ 4 | define(function(){ 5 | return 4294967295; 6 | }); 7 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/MIN_INT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constant Minimum 32-bit signed integer value (-2^31). 3 | */ 4 | define(function(){ 5 | return -2147483648; 6 | }); 7 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/enforcePrecision.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toNumber'], function(toNumber){ 2 | /** 3 | * Enforce a specific amount of decimal digits and also fix floating 4 | * point rounding issues. 5 | */ 6 | function enforcePrecision(val, nDecimalDigits){ 7 | val = toNumber(val); 8 | var pow = Math.pow(10, nDecimalDigits); 9 | return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); 10 | } 11 | return enforcePrecision; 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/isNaN.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * ES6 Number.isNaN 5 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN 6 | */ 7 | function isNaN(val){ 8 | // jshint eqeqeq:false 9 | return typeof val === 'number' && val != val; 10 | } 11 | 12 | return isNaN; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/ordinal.js: -------------------------------------------------------------------------------- 1 | define(['./toInt', './nth'], function (toInt, nth) { 2 | 3 | /** 4 | * converts number into ordinal form (1st, 2nd, 3rd, 4th, ...) 5 | */ 6 | function ordinal(n){ 7 | n = toInt(n); 8 | return n + nth(n); 9 | } 10 | 11 | return ordinal; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/pad.js: -------------------------------------------------------------------------------- 1 | define(['../string/lpad', '../lang/toNumber'], function(lpad, toNumber){ 2 | 3 | /** 4 | * Add padding zeros if n.length < minLength. 5 | */ 6 | function pad(n, minLength, char){ 7 | n = toNumber(n); 8 | return lpad(''+ n, minLength, char || '0'); 9 | } 10 | 11 | return pad; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/rol.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Bitwise circular shift left 4 | * http://en.wikipedia.org/wiki/Circular_shift 5 | */ 6 | function rol(val, shift){ 7 | return (val << shift) | (val >> (32 - shift)); 8 | } 9 | return rol; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/ror.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | /** 3 | * Bitwise circular shift right 4 | * http://en.wikipedia.org/wiki/Circular_shift 5 | */ 6 | function ror(val, shift){ 7 | return (val >> shift) | (val << (32 - shift)); 8 | } 9 | return ror; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/sign.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toNumber'], function (toNumber) { 2 | 3 | /** 4 | * Get sign of the value. 5 | */ 6 | function sign(val) { 7 | var num = toNumber(val); 8 | if (num === 0) return num; // +0 and +0 === 0 9 | if (isNaN(num)) return num; // NaN 10 | return num < 0? -1 : 1; 11 | } 12 | 13 | return sign; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/toInt.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | 3 | /** 4 | * "Convert" value into an 32-bit integer. 5 | * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. 6 | * IMPORTANT: val will wrap at 2^31 and -2^31. 7 | * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 8 | */ 9 | function toInt(val){ 10 | // we do not use lang/toNumber because of perf and also because it 11 | // doesn't break the functionality 12 | return ~~val; 13 | } 14 | 15 | return toInt; 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/toUInt.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * "Convert" value into a 32-bit unsigned integer. 5 | * IMPORTANT: Value will wrap at 2^32. 6 | */ 7 | function toUInt(val){ 8 | // we do not use lang/toNumber because of perf and also because it 9 | // doesn't break the functionality 10 | return val >>> 0; 11 | } 12 | 13 | return toUInt; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/number/toUInt31.js: -------------------------------------------------------------------------------- 1 | define(['./MAX_INT'], function(MAX_INT){ 2 | 3 | /** 4 | * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). 5 | * IMPORTANT: value wil wrap at 2^31, if negative will return 0. 6 | */ 7 | function toUInt31(val){ 8 | // we do not use lang/toNumber because of perf and also because it 9 | // doesn't break the functionality 10 | return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); 11 | } 12 | 13 | return toUInt31; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/bindAll.js: -------------------------------------------------------------------------------- 1 | define(['./functions', '../function/bind', '../array/forEach', '../array/slice'], function (functions, bind, forEach, slice) { 2 | 3 | /** 4 | * Binds methods of the object to be run in it's own context. 5 | */ 6 | function bindAll(obj, rest_methodNames){ 7 | var keys = arguments.length > 1? 8 | slice(arguments, 1) : functions(obj); 9 | forEach(keys, function(key){ 10 | obj[key] = bind(obj[key], obj); 11 | }); 12 | } 13 | 14 | return bindAll; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/contains.js: -------------------------------------------------------------------------------- 1 | define(['./some'], function (some) { 2 | 3 | /** 4 | * Check if object contains value 5 | */ 6 | function contains(obj, needle) { 7 | return some(obj, function(val) { 8 | return (val === needle); 9 | }); 10 | } 11 | return contains; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/fillIn.js: -------------------------------------------------------------------------------- 1 | define(['../array/forEach', '../array/slice', './forOwn'], function (forEach, slice, forOwn) { 2 | 3 | /** 4 | * Copy missing properties in the obj from the defaults. 5 | */ 6 | function fillIn(obj, var_defaults){ 7 | forEach(slice(arguments, 1), function(base){ 8 | forOwn(base, function(val, key){ 9 | if (obj[key] == null) { 10 | obj[key] = val; 11 | } 12 | }); 13 | }); 14 | return obj; 15 | } 16 | 17 | return fillIn; 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/find.js: -------------------------------------------------------------------------------- 1 | define(['./some', '../function/makeIterator_'], function(some, makeIterator) { 2 | 3 | /** 4 | * Returns first item that matches criteria 5 | */ 6 | function find(obj, callback, thisObj) { 7 | callback = makeIterator(callback, thisObj); 8 | var result; 9 | some(obj, function(value, key, obj) { 10 | if (callback(value, key, obj)) { 11 | result = value; 12 | return true; //break 13 | } 14 | }); 15 | return result; 16 | } 17 | 18 | return find; 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/forOwn.js: -------------------------------------------------------------------------------- 1 | define(['./hasOwn', './forIn'], function (hasOwn, forIn) { 2 | 3 | /** 4 | * Similar to Array/forEach but works over object properties and fixes Don't 5 | * Enum bug on IE. 6 | * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation 7 | */ 8 | function forOwn(obj, fn, thisObj){ 9 | forIn(obj, function(val, key){ 10 | if (hasOwn(obj, key)) { 11 | return fn.call(thisObj, obj[key], key, obj); 12 | } 13 | }); 14 | } 15 | 16 | return forOwn; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/functions.js: -------------------------------------------------------------------------------- 1 | define(['./forIn'], function (forIn) { 2 | 3 | /** 4 | * return a list of all enumerable properties that have function values 5 | */ 6 | function functions(obj){ 7 | var keys = []; 8 | forIn(obj, function(val, key){ 9 | if (typeof val === 'function'){ 10 | keys.push(key); 11 | } 12 | }); 13 | return keys.sort(); 14 | } 15 | 16 | return functions; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/get.js: -------------------------------------------------------------------------------- 1 | define(['../lang/isPrimitive'], function (isPrimitive) { 2 | 3 | /** 4 | * get "nested" object property 5 | */ 6 | function get(obj, prop){ 7 | var parts = prop.split('.'), 8 | last = parts.pop(); 9 | 10 | while (prop = parts.shift()) { 11 | obj = obj[prop]; 12 | if (obj == null) return; 13 | } 14 | 15 | return obj[last]; 16 | } 17 | 18 | return get; 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/has.js: -------------------------------------------------------------------------------- 1 | define(['./get'], function (get) { 2 | 3 | var UNDEF; 4 | 5 | /** 6 | * Check if object has nested property. 7 | */ 8 | function has(obj, prop){ 9 | return get(obj, prop) !== UNDEF; 10 | } 11 | 12 | return has; 13 | 14 | }); 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/hasOwn.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Safer Object.hasOwnProperty 5 | */ 6 | function hasOwn(obj, prop){ 7 | return Object.prototype.hasOwnProperty.call(obj, prop); 8 | } 9 | 10 | return hasOwn; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/keys.js: -------------------------------------------------------------------------------- 1 | define(['./forOwn'], function (forOwn) { 2 | 3 | /** 4 | * Get object keys 5 | */ 6 | var keys = Object.keys || function (obj) { 7 | var keys = []; 8 | forOwn(obj, function(val, key){ 9 | keys.push(key); 10 | }); 11 | return keys; 12 | }; 13 | 14 | return keys; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/map.js: -------------------------------------------------------------------------------- 1 | define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { 2 | 3 | /** 4 | * Creates a new object where all the values are the result of calling 5 | * `callback`. 6 | */ 7 | function mapValues(obj, callback, thisObj) { 8 | callback = makeIterator(callback, thisObj); 9 | var output = {}; 10 | forOwn(obj, function(val, key, obj) { 11 | output[key] = callback(val, key, obj); 12 | }); 13 | 14 | return output; 15 | } 16 | return mapValues; 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/max.js: -------------------------------------------------------------------------------- 1 | define(['../array/max', './values'], function(arrMax, values) { 2 | 3 | /** 4 | * Returns maximum value inside object. 5 | */ 6 | function max(obj, compareFn) { 7 | return arrMax(values(obj), compareFn); 8 | } 9 | 10 | return max; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/min.js: -------------------------------------------------------------------------------- 1 | define(['../array/min', './values'], function(arrMin, values) { 2 | 3 | /** 4 | * Returns minimum value inside object. 5 | */ 6 | function min(obj, iterator) { 7 | return arrMin(values(obj), iterator); 8 | } 9 | 10 | return min; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/namespace.js: -------------------------------------------------------------------------------- 1 | define(['../array/forEach'], function (forEach) { 2 | 3 | /** 4 | * Create nested object if non-existent 5 | */ 6 | function namespace(obj, path){ 7 | if (!path) return obj; 8 | forEach(path.split('.'), function(key){ 9 | if (!obj[key]) { 10 | obj[key] = {}; 11 | } 12 | obj = obj[key]; 13 | }); 14 | return obj; 15 | } 16 | 17 | return namespace; 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/pick.js: -------------------------------------------------------------------------------- 1 | define(['../array/slice'], function(slice){ 2 | 3 | /** 4 | * Return a copy of the object, filtered to only have values for the whitelisted keys. 5 | */ 6 | function pick(obj, var_keys){ 7 | var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), 8 | out = {}, 9 | i = 0, key; 10 | while (key = keys[i++]) { 11 | out[key] = obj[key]; 12 | } 13 | return out; 14 | } 15 | 16 | return pick; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/pluck.js: -------------------------------------------------------------------------------- 1 | define(['./map', '../function/prop'], function (map, prop) { 2 | 3 | /** 4 | * Extract a list of property values. 5 | */ 6 | function pluck(obj, propName){ 7 | return map(obj, prop(propName)); 8 | } 9 | 10 | return pluck; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/reject.js: -------------------------------------------------------------------------------- 1 | define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { 2 | 3 | /** 4 | * Object reject 5 | */ 6 | function reject(obj, callback, thisObj) { 7 | callback = makeIterator(callback, thisObj); 8 | return filter(obj, function(value, index, obj) { 9 | return !callback(value, index, obj); 10 | }, thisObj); 11 | } 12 | 13 | return reject; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/result.js: -------------------------------------------------------------------------------- 1 | define(['../lang/isFunction'], function (isFunction) { 2 | 3 | function result(obj, prop) { 4 | var property = obj[prop]; 5 | 6 | if(property === undefined) { 7 | return; 8 | } 9 | 10 | return isFunction(property) ? property.call(obj) : property; 11 | } 12 | 13 | return result; 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/set.js: -------------------------------------------------------------------------------- 1 | define(['./namespace'], function (namespace) { 2 | 3 | /** 4 | * set "nested" object property 5 | */ 6 | function set(obj, prop, val){ 7 | var parts = (/^(.+)\.(.+)$/).exec(prop); 8 | if (parts){ 9 | namespace(obj, parts[1])[parts[2]] = val; 10 | } else { 11 | obj[prop] = val; 12 | } 13 | } 14 | 15 | return set; 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/size.js: -------------------------------------------------------------------------------- 1 | define(['./forOwn'], function (forOwn) { 2 | 3 | /** 4 | * Get object size 5 | */ 6 | function size(obj) { 7 | var count = 0; 8 | forOwn(obj, function(){ 9 | count++; 10 | }); 11 | return count; 12 | } 13 | 14 | return size; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/some.js: -------------------------------------------------------------------------------- 1 | define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { 2 | 3 | /** 4 | * Object some 5 | */ 6 | function some(obj, callback, thisObj) { 7 | callback = makeIterator(callback, thisObj); 8 | var result = false; 9 | forOwn(obj, function(val, key) { 10 | if (callback(val, key, obj)) { 11 | result = true; 12 | return false; // break 13 | } 14 | }); 15 | return result; 16 | } 17 | 18 | return some; 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/unset.js: -------------------------------------------------------------------------------- 1 | define(['./has'], function (has) { 2 | 3 | /** 4 | * Unset object property. 5 | */ 6 | function unset(obj, prop){ 7 | if (has(obj, prop)) { 8 | var parts = prop.split('.'), 9 | last = parts.pop(); 10 | while (prop = parts.shift()) { 11 | obj = obj[prop]; 12 | } 13 | return (delete obj[last]); 14 | 15 | } else { 16 | // if property doesn't exist treat as deleted 17 | return true; 18 | } 19 | } 20 | 21 | return unset; 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/object/values.js: -------------------------------------------------------------------------------- 1 | define(['./forOwn'], function (forOwn) { 2 | 3 | /** 4 | * Get object values 5 | */ 6 | function values(obj) { 7 | var vals = []; 8 | forOwn(obj, function(val, key){ 9 | vals.push(val); 10 | }); 11 | return vals; 12 | } 13 | 14 | return values; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/queryString.js: -------------------------------------------------------------------------------- 1 | define(function(require){ 2 | 3 | //automatically generated, do not edit! 4 | //run `node build` instead 5 | return { 6 | 'contains' : require('./queryString/contains'), 7 | 'decode' : require('./queryString/decode'), 8 | 'encode' : require('./queryString/encode'), 9 | 'getParam' : require('./queryString/getParam'), 10 | 'getQuery' : require('./queryString/getQuery'), 11 | 'parse' : require('./queryString/parse'), 12 | 'setParam' : require('./queryString/setParam') 13 | }; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/queryString/contains.js: -------------------------------------------------------------------------------- 1 | define(['./getQuery'], function (getQuery) { 2 | 3 | /** 4 | * Checks if query string contains parameter. 5 | */ 6 | function contains(url, paramName) { 7 | var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` 8 | return regex.test(getQuery(url)); 9 | } 10 | 11 | return contains; 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/queryString/getParam.js: -------------------------------------------------------------------------------- 1 | define(['../string/typecast', './getQuery'], function (typecast, getQuery) { 2 | 3 | /** 4 | * Get query parameter value. 5 | */ 6 | function getParam(url, param, shouldTypecast){ 7 | var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 8 | result = regexp.exec( getQuery(url) ), 9 | val = (result && result[2])? result[2] : null; 10 | return shouldTypecast === false? val : typecast(val); 11 | } 12 | 13 | return getParam; 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/queryString/getQuery.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Gets full query as string with all special chars decoded. 5 | */ 6 | function getQuery(url) { 7 | // url = url.replace(/#.*\?/, '?'); //removes hash (to avoid getting hash query) 8 | var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt 9 | return (queryString)? decodeURIComponent(queryString[0].replace(/\+/g,' ')) : ''; 10 | } 11 | 12 | return getQuery; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/queryString/parse.js: -------------------------------------------------------------------------------- 1 | define(['./decode', './getQuery'], function (decode, getQuery) { 2 | 3 | /** 4 | * Get query string, parses and decodes it. 5 | */ 6 | function parse(url, shouldTypecast) { 7 | return decode(getQuery(url), shouldTypecast); 8 | } 9 | 10 | return parse; 11 | }); 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/choice.js: -------------------------------------------------------------------------------- 1 | define(['./randInt', '../lang/isArray'], function (randInt, isArray) { 2 | 3 | /** 4 | * Returns a random element from the supplied arguments 5 | * or from the array (if single argument is an array). 6 | */ 7 | function choice(items) { 8 | var target = (arguments.length === 1 && isArray(items))? items : arguments; 9 | return target[ randInt(0, target.length - 1) ]; 10 | } 11 | 12 | return choice; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/rand.js: -------------------------------------------------------------------------------- 1 | define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ 2 | 3 | /** 4 | * Returns random number inside range 5 | */ 6 | function rand(min, max){ 7 | min = min == null? MIN_INT : min; 8 | max = max == null? MAX_INT : max; 9 | return min + (max - min) * random(); 10 | } 11 | 12 | return rand; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/randBit.js: -------------------------------------------------------------------------------- 1 | define(['./randBool'], function (randBool) { 2 | 3 | /** 4 | * Returns random bit (0 or 1) 5 | */ 6 | function randomBit() { 7 | return randBool()? 1 : 0; 8 | } 9 | 10 | return randomBit; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/randBool.js: -------------------------------------------------------------------------------- 1 | define(['./random'], function (random) { 2 | 3 | /** 4 | * returns a random boolean value (true or false) 5 | */ 6 | function randBool(){ 7 | return random() >= 0.5; 8 | } 9 | 10 | return randBool; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/randHex.js: -------------------------------------------------------------------------------- 1 | define(['./choice'], function (choice) { 2 | 3 | var _chars = '0123456789abcdef'.split(''); 4 | 5 | /** 6 | * Returns a random hexadecimal string 7 | */ 8 | function randHex(size){ 9 | size = size && size > 0? size : 6; 10 | var str = ''; 11 | while (size--) { 12 | str += choice(_chars); 13 | } 14 | return str; 15 | } 16 | 17 | return randHex; 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/randSign.js: -------------------------------------------------------------------------------- 1 | define(['./randBool'], function (randBool) { 2 | 3 | /** 4 | * Returns random sign (-1 or 1) 5 | */ 6 | function randomSign() { 7 | return randBool()? 1 : -1; 8 | } 9 | 10 | return randomSign; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/random/random.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Just a wrapper to Math.random. No methods inside mout/random should call 5 | * Math.random() directly so we can inject the pseudo-random number 6 | * generator if needed (ie. in case we need a seeded random or a better 7 | * algorithm than the native one) 8 | */ 9 | function random(){ 10 | return random.get(); 11 | } 12 | 13 | // we expose the method so it can be swapped if needed 14 | random.get = Math.random; 15 | 16 | return random; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/WHITE_SPACES.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | /** 3 | * Contains all Unicode white-spaces. Taken from 4 | * http://en.wikipedia.org/wiki/Whitespace_character. 5 | */ 6 | return [ 7 | ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', 8 | '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', 9 | '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', 10 | '\u205F', '\u3000' 11 | ]; 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/contains.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString) { 2 | 3 | /** 4 | * Searches for a given substring 5 | */ 6 | function contains(str, substring, fromIndex){ 7 | str = toString(str); 8 | substring = toString(substring); 9 | return str.indexOf(substring, fromIndex) !== -1; 10 | } 11 | 12 | return contains; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/crop.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './truncate'], function (toString, truncate) { 2 | /** 3 | * Truncate string at full words. 4 | */ 5 | function crop(str, maxChars, append) { 6 | str = toString(str); 7 | return truncate(str, maxChars, append, true); 8 | } 9 | 10 | return crop; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/endsWith.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString) { 2 | /** 3 | * Checks if string ends with specified suffix. 4 | */ 5 | function endsWith(str, suffix) { 6 | str = toString(str); 7 | suffix = toString(suffix); 8 | 9 | return str.indexOf(suffix, str.length - suffix.length) !== -1; 10 | } 11 | 12 | return endsWith; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/escapeHtml.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString) { 2 | 3 | /** 4 | * Escapes a string for insertion into HTML. 5 | */ 6 | function escapeHtml(str){ 7 | str = toString(str) 8 | .replace(/&/g, '&') 9 | .replace(//g, '>') 11 | .replace(/'/g, ''') 12 | .replace(/"/g, '"'); 13 | return str; 14 | } 15 | 16 | return escapeHtml; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/escapeRegExp.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString) { 2 | 3 | /** 4 | * Escape RegExp string chars. 5 | */ 6 | function escapeRegExp(str) { 7 | return toString(str).replace(/\W/g,'\\$&'); 8 | } 9 | 10 | return escapeRegExp; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/hyphenate.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ 2 | /** 3 | * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. 4 | */ 5 | function hyphenate(str){ 6 | str = toString(str); 7 | str = unCamelCase(str); 8 | return slugify(str, "-"); 9 | } 10 | 11 | return hyphenate; 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/insert.js: -------------------------------------------------------------------------------- 1 | define(['../math/clamp', '../lang/toString'], function (clamp, toString) { 2 | 3 | /** 4 | * Inserts a string at a given index. 5 | */ 6 | function insert(string, index, partial){ 7 | string = toString(string); 8 | 9 | if (index < 0) { 10 | index = string.length + index; 11 | } 12 | 13 | index = clamp(index, 0, string.length); 14 | 15 | return string.substr(0, index) + partial + string.substr(index); 16 | } 17 | 18 | return insert; 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/interpolate.js: -------------------------------------------------------------------------------- 1 | define([ 2 | '../lang/toString', 3 | '../object/get' 4 | ], function(toString, get) { 5 | 6 | var stache = /\{\{([^\}]+)\}\}/g; //mustache-like 7 | 8 | /** 9 | * String interpolation 10 | */ 11 | function interpolate(template, replacements, syntax){ 12 | template = toString(template); 13 | var replaceFn = function(match, prop){ 14 | return toString( get(replacements, prop) ); 15 | }; 16 | return template.replace(syntax || stache, replaceFn); 17 | } 18 | 19 | return interpolate; 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/lowerCase.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString){ 2 | /** 3 | * "Safer" String.toLowerCase() 4 | */ 5 | function lowerCase(str){ 6 | str = toString(str); 7 | return str.toLowerCase(); 8 | } 9 | 10 | return lowerCase; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/lpad.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './repeat'], function(toString, repeat) { 2 | 3 | /** 4 | * Pad string with `char` if its' length is smaller than `minLen` 5 | */ 6 | function lpad(str, minLen, ch) { 7 | str = toString(str); 8 | ch = ch || ' '; 9 | 10 | return (str.length < minLen) ? 11 | repeat(ch, minLen - str.length) + str : str; 12 | } 13 | 14 | return lpad; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/makePath.js: -------------------------------------------------------------------------------- 1 | define(['../array/join', '../array/slice'], function(join, slice){ 2 | 3 | /** 4 | * Group arguments as path segments, if any of the args is `null` or an 5 | * empty string it will be ignored from resulting path. 6 | */ 7 | function makePath(var_args){ 8 | var result = join(slice(arguments), '/'); 9 | // need to disconsider duplicate '/' after protocol (eg: 'http://') 10 | return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); 11 | } 12 | 13 | return makePath; 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/normalizeLineBreaks.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function (toString) { 2 | 3 | /** 4 | * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) 5 | */ 6 | function normalizeLineBreaks(str, lineEnd) { 7 | str = toString(str); 8 | lineEnd = lineEnd || '\n'; 9 | 10 | return str 11 | .replace(/\r\n/g, lineEnd) // DOS 12 | .replace(/\r/g, lineEnd) // Mac 13 | .replace(/\n/g, lineEnd); // Unix 14 | } 15 | 16 | return normalizeLineBreaks; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/pascalCase.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ 2 | /** 3 | * camelCase + UPPERCASE first char 4 | */ 5 | function pascalCase(str){ 6 | str = toString(str); 7 | return camelCase(str).replace(/^[a-z]/, upperCase); 8 | } 9 | 10 | return pascalCase; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/properCase.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ 2 | /** 3 | * UPPERCASE first char of each word. 4 | */ 5 | function properCase(str){ 6 | str = toString(str); 7 | return lowerCase(str).replace(/^\w|\s\w/g, upperCase); 8 | } 9 | 10 | return properCase; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/removeNonASCII.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString){ 2 | /** 3 | * Remove non-printable ASCII chars 4 | */ 5 | function removeNonASCII(str){ 6 | str = toString(str); 7 | 8 | // Matches non-printable ASCII chars - 9 | // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters 10 | return str.replace(/[^\x20-\x7E]/g, ''); 11 | } 12 | 13 | return removeNonASCII; 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/removeNonWord.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString){ 2 | // This pattern is generated by the _build/pattern-removeNonWord.js script 3 | var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g; 4 | 5 | /** 6 | * Remove non-word chars. 7 | */ 8 | function removeNonWord(str){ 9 | str = toString(str); 10 | return str.replace(PATTERN, ''); 11 | } 12 | 13 | return removeNonWord; 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/rpad.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './repeat'], function (toString, repeat) { 2 | 3 | /** 4 | * Pad string with `char` if its' length is smaller than `minLen` 5 | */ 6 | function rpad(str, minLen, ch) { 7 | str = toString(str); 8 | ch = ch || ' '; 9 | return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; 10 | } 11 | 12 | return rpad; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/sentenceCase.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ 2 | /** 3 | * UPPERCASE first char of each sentence and lowercase other chars. 4 | */ 5 | function sentenceCase(str){ 6 | str = toString(str); 7 | 8 | // Replace first char of each sentence (new line or after '.\s+') to 9 | // UPPERCASE 10 | return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); 11 | } 12 | return sentenceCase; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/startsWith.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function (toString) { 2 | /** 3 | * Checks if string starts with specified prefix. 4 | */ 5 | function startsWith(str, prefix) { 6 | str = toString(str); 7 | prefix = toString(prefix); 8 | 9 | return str.indexOf(prefix) === 0; 10 | } 11 | 12 | return startsWith; 13 | }); 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/stripHtmlTags.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString){ 2 | /** 3 | * Remove HTML tags from string. 4 | */ 5 | function stripHtmlTags(str){ 6 | str = toString(str); 7 | 8 | return str.replace(/<[^>]*>/g, ''); 9 | } 10 | return stripHtmlTags; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/trim.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ 2 | /** 3 | * Remove white-spaces from beginning and end of string. 4 | */ 5 | function trim(str, chars) { 6 | str = toString(str); 7 | chars = chars || WHITE_SPACES; 8 | return ltrim(rtrim(str, chars), chars); 9 | } 10 | 11 | return trim; 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/underscore.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ 2 | /** 3 | * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. 4 | */ 5 | function underscore(str){ 6 | str = toString(str); 7 | str = unCamelCase(str); 8 | return slugify(str, "_"); 9 | } 10 | return underscore; 11 | }); 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/unescapeHtml.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function (toString) { 2 | 3 | /** 4 | * Unescapes HTML special chars 5 | */ 6 | function unescapeHtml(str){ 7 | str = toString(str) 8 | .replace(/&/g , '&') 9 | .replace(/</g , '<') 10 | .replace(/>/g , '>') 11 | .replace(/�*39;/g , "'") 12 | .replace(/"/g, '"'); 13 | return str; 14 | } 15 | 16 | return unescapeHtml; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/unescapeUnicode.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString) { 2 | 3 | /** 4 | * Unescape unicode char sequences 5 | */ 6 | function unescapeUnicode(str){ 7 | str = toString(str); 8 | return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ 9 | var code = parseInt(ch.slice(2), 16); 10 | return String.fromCharCode(code); 11 | }); 12 | } 13 | 14 | return unescapeUnicode; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/unhyphenate.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString){ 2 | /** 3 | * Replaces hyphens with spaces. (only hyphens between word chars) 4 | */ 5 | function unhyphenate(str){ 6 | str = toString(str); 7 | return str.replace(/(\w)(-)(\w)/g, '$1 $3'); 8 | } 9 | return unhyphenate; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/string/upperCase.js: -------------------------------------------------------------------------------- 1 | define(['../lang/toString'], function(toString){ 2 | /** 3 | * "Safer" String.toUpperCase() 4 | */ 5 | function upperCase(str){ 6 | str = toString(str); 7 | return str.toUpperCase(); 8 | } 9 | return upperCase; 10 | }); 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/time.js: -------------------------------------------------------------------------------- 1 | define(function(require){ 2 | 3 | //automatically generated, do not edit! 4 | //run `node build` instead 5 | return { 6 | 'convert' : require('./time/convert'), 7 | 'now' : require('./time/now'), 8 | 'parseMs' : require('./time/parseMs'), 9 | 'toTimeString' : require('./time/toTimeString') 10 | }; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/time/now.js: -------------------------------------------------------------------------------- 1 | define(function () { 2 | 3 | /** 4 | * Get current time in miliseconds 5 | */ 6 | function now(){ 7 | // yes, we defer the work to another function to allow mocking it 8 | // during the tests 9 | return now.get(); 10 | } 11 | 12 | now.get = (typeof Date.now === 'function')? Date.now : function(){ 13 | return +(new Date()); 14 | }; 15 | 16 | return now; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/src/time/parseMs.js: -------------------------------------------------------------------------------- 1 | define(['../math/countSteps'], function(countSteps){ 2 | 3 | /** 4 | * Parse timestamp into an object. 5 | */ 6 | function parseMs(ms){ 7 | return { 8 | milliseconds : countSteps(ms, 1, 1000), 9 | seconds : countSteps(ms, 1000, 60), 10 | minutes : countSteps(ms, 60000, 60), 11 | hours : countSteps(ms, 3600000, 24), 12 | days : countSteps(ms, 86400000) 13 | }; 14 | } 15 | 16 | return parseMs; 17 | }); 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/WHITE_SPACES.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Contains all Unicode white-spaces. Taken from 4 | * http://en.wikipedia.org/wiki/Whitespace_character. 5 | */ 6 | module.exports = [ 7 | ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', 8 | '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', 9 | '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', 10 | '\u205F', '\u3000' 11 | ]; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/contains.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | 3 | /** 4 | * Searches for a given substring 5 | */ 6 | function contains(str, substring, fromIndex){ 7 | str = toString(str); 8 | substring = toString(substring); 9 | return str.indexOf(substring, fromIndex) !== -1; 10 | } 11 | 12 | module.exports = contains; 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/crop.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var truncate = require('./truncate'); 3 | /** 4 | * Truncate string at full words. 5 | */ 6 | function crop(str, maxChars, append) { 7 | str = toString(str); 8 | return truncate(str, maxChars, append, true); 9 | } 10 | 11 | module.exports = crop; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/endsWith.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * Checks if string ends with specified suffix. 4 | */ 5 | function endsWith(str, suffix) { 6 | str = toString(str); 7 | suffix = toString(suffix); 8 | 9 | return str.indexOf(suffix, str.length - suffix.length) !== -1; 10 | } 11 | 12 | module.exports = endsWith; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/escapeHtml.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | 3 | /** 4 | * Escapes a string for insertion into HTML. 5 | */ 6 | function escapeHtml(str){ 7 | str = toString(str) 8 | .replace(/&/g, '&') 9 | .replace(//g, '>') 11 | .replace(/'/g, ''') 12 | .replace(/"/g, '"'); 13 | return str; 14 | } 15 | 16 | module.exports = escapeHtml; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/escapeRegExp.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | 3 | /** 4 | * Escape RegExp string chars. 5 | */ 6 | function escapeRegExp(str) { 7 | return toString(str).replace(/\W/g,'\\$&'); 8 | } 9 | 10 | module.exports = escapeRegExp; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/hyphenate.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var slugify = require('./slugify'); 3 | var unCamelCase = require('./unCamelCase'); 4 | /** 5 | * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. 6 | */ 7 | function hyphenate(str){ 8 | str = toString(str); 9 | str = unCamelCase(str); 10 | return slugify(str, "-"); 11 | } 12 | 13 | module.exports = hyphenate; 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/insert.js: -------------------------------------------------------------------------------- 1 | var clamp = require('../math/clamp'); 2 | var toString = require('../lang/toString'); 3 | 4 | /** 5 | * Inserts a string at a given index. 6 | */ 7 | function insert(string, index, partial){ 8 | string = toString(string); 9 | 10 | if (index < 0) { 11 | index = string.length + index; 12 | } 13 | 14 | index = clamp(index, 0, string.length); 15 | 16 | return string.substr(0, index) + partial + string.substr(index); 17 | } 18 | 19 | module.exports = insert; 20 | 21 | 22 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/interpolate.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var get = require('../object/get'); 3 | 4 | var stache = /\{\{([^\}]+)\}\}/g; //mustache-like 5 | 6 | /** 7 | * String interpolation 8 | */ 9 | function interpolate(template, replacements, syntax){ 10 | template = toString(template); 11 | var replaceFn = function(match, prop){ 12 | return toString( get(replacements, prop) ); 13 | }; 14 | return template.replace(syntax || stache, replaceFn); 15 | } 16 | 17 | module.exports = interpolate; 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/lowerCase.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * "Safer" String.toLowerCase() 4 | */ 5 | function lowerCase(str){ 6 | str = toString(str); 7 | return str.toLowerCase(); 8 | } 9 | 10 | module.exports = lowerCase; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/lpad.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var repeat = require('./repeat'); 3 | 4 | /** 5 | * Pad string with `char` if its' length is smaller than `minLen` 6 | */ 7 | function lpad(str, minLen, ch) { 8 | str = toString(str); 9 | ch = ch || ' '; 10 | 11 | return (str.length < minLen) ? 12 | repeat(ch, minLen - str.length) + str : str; 13 | } 14 | 15 | module.exports = lpad; 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/makePath.js: -------------------------------------------------------------------------------- 1 | var join = require('../array/join'); 2 | var slice = require('../array/slice'); 3 | 4 | /** 5 | * Group arguments as path segments, if any of the args is `null` or an 6 | * empty string it will be ignored from resulting path. 7 | */ 8 | function makePath(var_args){ 9 | var result = join(slice(arguments), '/'); 10 | // need to disconsider duplicate '/' after protocol (eg: 'http://') 11 | return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); 12 | } 13 | 14 | module.exports = makePath; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/normalizeLineBreaks.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | 3 | /** 4 | * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) 5 | */ 6 | function normalizeLineBreaks(str, lineEnd) { 7 | str = toString(str); 8 | lineEnd = lineEnd || '\n'; 9 | 10 | return str 11 | .replace(/\r\n/g, lineEnd) // DOS 12 | .replace(/\r/g, lineEnd) // Mac 13 | .replace(/\n/g, lineEnd); // Unix 14 | } 15 | 16 | module.exports = normalizeLineBreaks; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/pascalCase.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var camelCase = require('./camelCase'); 3 | var upperCase = require('./upperCase'); 4 | /** 5 | * camelCase + UPPERCASE first char 6 | */ 7 | function pascalCase(str){ 8 | str = toString(str); 9 | return camelCase(str).replace(/^[a-z]/, upperCase); 10 | } 11 | 12 | module.exports = pascalCase; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/properCase.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var lowerCase = require('./lowerCase'); 3 | var upperCase = require('./upperCase'); 4 | /** 5 | * UPPERCASE first char of each word. 6 | */ 7 | function properCase(str){ 8 | str = toString(str); 9 | return lowerCase(str).replace(/^\w|\s\w/g, upperCase); 10 | } 11 | 12 | module.exports = properCase; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/removeNonASCII.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * Remove non-printable ASCII chars 4 | */ 5 | function removeNonASCII(str){ 6 | str = toString(str); 7 | 8 | // Matches non-printable ASCII chars - 9 | // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters 10 | return str.replace(/[^\x20-\x7E]/g, ''); 11 | } 12 | 13 | module.exports = removeNonASCII; 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/removeNonWord.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | // This pattern is generated by the _build/pattern-removeNonWord.js script 3 | var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g; 4 | 5 | /** 6 | * Remove non-word chars. 7 | */ 8 | function removeNonWord(str){ 9 | str = toString(str); 10 | return str.replace(PATTERN, ''); 11 | } 12 | 13 | module.exports = removeNonWord; 14 | 15 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/rpad.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var repeat = require('./repeat'); 3 | 4 | /** 5 | * Pad string with `char` if its' length is smaller than `minLen` 6 | */ 7 | function rpad(str, minLen, ch) { 8 | str = toString(str); 9 | ch = ch || ' '; 10 | return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; 11 | } 12 | 13 | module.exports = rpad; 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/sentenceCase.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var lowerCase = require('./lowerCase'); 3 | var upperCase = require('./upperCase'); 4 | /** 5 | * UPPERCASE first char of each sentence and lowercase other chars. 6 | */ 7 | function sentenceCase(str){ 8 | str = toString(str); 9 | 10 | // Replace first char of each sentence (new line or after '.\s+') to 11 | // UPPERCASE 12 | return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); 13 | } 14 | module.exports = sentenceCase; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/startsWith.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * Checks if string starts with specified prefix. 4 | */ 5 | function startsWith(str, prefix) { 6 | str = toString(str); 7 | prefix = toString(prefix); 8 | 9 | return str.indexOf(prefix) === 0; 10 | } 11 | 12 | module.exports = startsWith; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/stripHtmlTags.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * Remove HTML tags from string. 4 | */ 5 | function stripHtmlTags(str){ 6 | str = toString(str); 7 | 8 | return str.replace(/<[^>]*>/g, ''); 9 | } 10 | module.exports = stripHtmlTags; 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/trim.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var WHITE_SPACES = require('./WHITE_SPACES'); 3 | var ltrim = require('./ltrim'); 4 | var rtrim = require('./rtrim'); 5 | /** 6 | * Remove white-spaces from beginning and end of string. 7 | */ 8 | function trim(str, chars) { 9 | str = toString(str); 10 | chars = chars || WHITE_SPACES; 11 | return ltrim(rtrim(str, chars), chars); 12 | } 13 | 14 | module.exports = trim; 15 | 16 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/underscore.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | var slugify = require('./slugify'); 3 | var unCamelCase = require('./unCamelCase'); 4 | /** 5 | * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. 6 | */ 7 | function underscore(str){ 8 | str = toString(str); 9 | str = unCamelCase(str); 10 | return slugify(str, "_"); 11 | } 12 | module.exports = underscore; 13 | 14 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/unescapeHtml.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | 3 | /** 4 | * Unescapes HTML special chars 5 | */ 6 | function unescapeHtml(str){ 7 | str = toString(str) 8 | .replace(/&/g , '&') 9 | .replace(/</g , '<') 10 | .replace(/>/g , '>') 11 | .replace(/�*39;/g , "'") 12 | .replace(/"/g, '"'); 13 | return str; 14 | } 15 | 16 | module.exports = unescapeHtml; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/unescapeUnicode.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | 3 | /** 4 | * Unescape unicode char sequences 5 | */ 6 | function unescapeUnicode(str){ 7 | str = toString(str); 8 | return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ 9 | var code = parseInt(ch.slice(2), 16); 10 | return String.fromCharCode(code); 11 | }); 12 | } 13 | 14 | module.exports = unescapeUnicode; 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/unhyphenate.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * Replaces hyphens with spaces. (only hyphens between word chars) 4 | */ 5 | function unhyphenate(str){ 6 | str = toString(str); 7 | return str.replace(/(\w)(-)(\w)/g, '$1 $3'); 8 | } 9 | module.exports = unhyphenate; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/string/upperCase.js: -------------------------------------------------------------------------------- 1 | var toString = require('../lang/toString'); 2 | /** 3 | * "Safer" String.toUpperCase() 4 | */ 5 | function upperCase(str){ 6 | str = toString(str); 7 | return str.toUpperCase(); 8 | } 9 | module.exports = upperCase; 10 | 11 | -------------------------------------------------------------------------------- /web/node_modules/mout/time.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | //automatically generated, do not edit! 4 | //run `node build` instead 5 | module.exports = { 6 | 'convert' : require('./time/convert'), 7 | 'now' : require('./time/now'), 8 | 'parseMs' : require('./time/parseMs'), 9 | 'toTimeString' : require('./time/toTimeString') 10 | }; 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/mout/time/now.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Get current time in miliseconds 5 | */ 6 | function now(){ 7 | // yes, we defer the work to another function to allow mocking it 8 | // during the tests 9 | return now.get(); 10 | } 11 | 12 | now.get = (typeof Date.now === 'function')? Date.now : function(){ 13 | return +(new Date()); 14 | }; 15 | 16 | module.exports = now; 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/node_modules/mout/time/parseMs.js: -------------------------------------------------------------------------------- 1 | var countSteps = require('../math/countSteps'); 2 | 3 | /** 4 | * Parse timestamp into an object. 5 | */ 6 | function parseMs(ms){ 7 | return { 8 | milliseconds : countSteps(ms, 1, 1000), 9 | seconds : countSteps(ms, 1000, 60), 10 | minutes : countSteps(ms, 60000, 60), 11 | hours : countSteps(ms, 3600000, 24), 12 | days : countSteps(ms, 86400000) 13 | }; 14 | } 15 | 16 | module.exports = parseMs; 17 | 18 | -------------------------------------------------------------------------------- /web/node_modules/options/.npmignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | node_modules 3 | .*.swp 4 | .lock-* 5 | build/ 6 | 7 | test 8 | -------------------------------------------------------------------------------- /web/node_modules/options/Makefile: -------------------------------------------------------------------------------- 1 | ALL_TESTS = $(shell find test/ -name '*.test.js') 2 | 3 | run-tests: 4 | @./node_modules/.bin/mocha \ 5 | -t 2000 \ 6 | $(TESTFLAGS) \ 7 | $(TESTS) 8 | 9 | test: 10 | @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests 11 | 12 | .PHONY: test 13 | -------------------------------------------------------------------------------- /web/node_modules/qs/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /web/node_modules/qs/lib/formats.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replace = String.prototype.replace; 4 | var percentTwenties = /%20/g; 5 | 6 | module.exports = { 7 | 'default': 'RFC3986', 8 | formatters: { 9 | RFC1738: function (value) { 10 | return replace.call(value, percentTwenties, '+'); 11 | }, 12 | RFC3986: function (value) { 13 | return value; 14 | } 15 | }, 16 | RFC1738: 'RFC1738', 17 | RFC3986: 'RFC3986' 18 | }; 19 | -------------------------------------------------------------------------------- /web/node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringify = require('./stringify'); 4 | var parse = require('./parse'); 5 | var formats = require('./formats'); 6 | 7 | module.exports = { 8 | formats: formats, 9 | parse: parse, 10 | stringify: stringify 11 | }; 12 | -------------------------------------------------------------------------------- /web/node_modules/qs/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "consistent-return": 2, 4 | "max-lines": 0, 5 | "max-nested-callbacks": [2, 3], 6 | "max-statements": 0, 7 | "no-extend-native": 0, 8 | "no-magic-numbers": 0, 9 | "sort-keys": 0 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /web/node_modules/qs/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./parse'); 4 | 5 | require('./stringify'); 6 | 7 | require('./utils'); 8 | -------------------------------------------------------------------------------- /web/node_modules/setprototypeof/README.md: -------------------------------------------------------------------------------- 1 | # Polyfill for `Object.setPrototypeOf` 2 | 3 | A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. 4 | 5 | ## Usage: 6 | 7 | ``` 8 | $ npm install --save setprototypeof 9 | ``` 10 | 11 | ```javascript 12 | var setPrototypeOf = require('setprototypeof'); 13 | 14 | var obj = {}; 15 | setPrototypeOf(obj, { 16 | foo: function() { 17 | return 'bar'; 18 | } 19 | }); 20 | obj.foo(); // bar 21 | ``` 22 | -------------------------------------------------------------------------------- /web/node_modules/setprototypeof/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); 2 | 3 | function setProtoOf(obj, proto) { 4 | obj.__proto__ = proto; 5 | return obj; 6 | } 7 | 8 | function mixinProperties(obj, proto) { 9 | for (var prop in proto) { 10 | if (!obj.hasOwnProperty(prop)) { 11 | obj[prop] = proto[prop]; 12 | } 13 | } 14 | return obj; 15 | } 16 | -------------------------------------------------------------------------------- /web/node_modules/uclass/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | node_modules 3 | coverage 4 | -------------------------------------------------------------------------------- /web/node_modules/uclass/implement.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var verbs = /^Implements|Extends|Binds$/ 4 | 5 | module.exports = function(ctx, obj){ 6 | for(var key in obj) { 7 | if(key.match(verbs)) continue; 8 | if((typeof obj[key] == 'function') && obj[key].$static) 9 | ctx[key] = obj[key]; 10 | else 11 | ctx.prototype[key] = obj[key]; 12 | } 13 | return ctx; 14 | } -------------------------------------------------------------------------------- /web/node_modules/uclass/static/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function(func){ 4 | func.$static = true; 5 | return func; 6 | } 7 | -------------------------------------------------------------------------------- /web/node_modules/ultron/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .tern-port 4 | -------------------------------------------------------------------------------- /web/node_modules/ultron/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "0.12" 5 | - "0.10" 6 | - "0.8" 7 | - "iojs" 8 | before_install: 9 | - 'if [ "${TRAVIS_NODE_VERSION}" == "0.8" ]; then npm install -g npm@2.11.1; fi' 10 | script: 11 | - "npm run test-travis" 12 | after_script: 13 | - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls" 14 | matrix: 15 | fast_finish: true 16 | notifications: 17 | irc: 18 | channels: 19 | - "irc.freenode.org#unshift" 20 | on_success: change 21 | on_failure: change 22 | -------------------------------------------------------------------------------- /web/node_modules/unpipe/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2015-06-14 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /web/node_modules/utils-merge/.travis.yml: -------------------------------------------------------------------------------- 1 | language: "node_js" 2 | node_js: 3 | - "0.4" 4 | - "0.6" 5 | - "0.8" 6 | - "0.10" 7 | -------------------------------------------------------------------------------- /web/node_modules/utils-merge/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Merge object b with object a. 3 | * 4 | * var a = { foo: 'bar' } 5 | * , b = { bar: 'baz' }; 6 | * 7 | * merge(a, b); 8 | * // => { foo: 'bar', bar: 'baz' } 9 | * 10 | * @param {Object} a 11 | * @param {Object} b 12 | * @return {Object} 13 | * @api public 14 | */ 15 | 16 | exports = module.exports = function(a, b){ 17 | if (a && b) { 18 | for (var key in b) { 19 | a[key] = b[key]; 20 | } 21 | } 22 | return a; 23 | }; 24 | -------------------------------------------------------------------------------- /web/node_modules/ws/.npmignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | node_modules 3 | .*.swp 4 | .lock-* 5 | build 6 | 7 | bench 8 | doc 9 | examples 10 | test 11 | 12 | -------------------------------------------------------------------------------- /web/node_modules/ws/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | npm_args: --ws:native 3 | node_js: 4 | - "0.12" 5 | - "0.11" 6 | - "0.10" 7 | - "0.9" 8 | - "0.8" 9 | - "iojs-v1.1" 10 | - "iojs-v1.0" 11 | - "iojs-v2.0" 12 | before_install: 13 | - "npm install -g npm@2.1.18" 14 | matrix: 15 | fast_finish: true 16 | allow_failures: 17 | - node_js: "0.11" 18 | - node_js: "0.9" 19 | - node_js: "iojs-v1.1" 20 | - node_js: "iojs-v1.0" 21 | - node_js: "iojs-v2.0" 22 | -------------------------------------------------------------------------------- /web/node_modules/ws/lib/BufferUtil.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ws: a node.js websocket client 5 | * Copyright(c) 2011 Einar Otto Stangvik 6 | * MIT Licensed 7 | */ 8 | 9 | try { 10 | module.exports = require('bufferutil'); 11 | } catch (e) { 12 | module.exports = require('./BufferUtil.fallback'); 13 | } 14 | -------------------------------------------------------------------------------- /web/node_modules/ws/lib/Validation.fallback.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ws: a node.js websocket client 3 | * Copyright(c) 2011 Einar Otto Stangvik 4 | * MIT Licensed 5 | */ 6 | 7 | module.exports.Validation = { 8 | isValidUTF8: function(buffer) { 9 | return true; 10 | } 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /web/node_modules/ws/lib/Validation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ws: a node.js websocket client 5 | * Copyright(c) 2011 Einar Otto Stangvik 6 | * MIT Licensed 7 | */ 8 | 9 | try { 10 | module.exports = require('utf-8-validate'); 11 | } catch (e) { 12 | module.exports = require('./Validation.fallback'); 13 | } 14 | -------------------------------------------------------------------------------- /web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "bluebird": "^3.5.0", 4 | "express": "^4.12.3", 5 | "jquery": "^3.2.1", 6 | "uclass": "^2.4.0", 7 | "ws": "^0.7.2" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /web/public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bstonl/cap-android/7a6d7610d063b5934706232d7d0146265926b590/web/public/.DS_Store --------------------------------------------------------------------------------